This is how all colors work. For example, a blue object absorbs all wavelengths of light except for blue light, which is why we see it as blue.
The same principle applies to other objects, such as clothing, cars, and buildings. The color of an object is determined by the wavelengths of light that it absorbs and reflects.