23

Let's reminds ourselves what light is. Radio waves, micro waves, X rays and gamma rays are all electromagnetic radiation and they only differ by their frequency. It just so happens that the human eye is able to detect electromagnetic radiation between ~400nm and ~800nm, which we perceive as light. The 400nm end is perceived as violet and the 800nm end is ...


20

They don't. The problem with the diagrams representing the visible and RGB gamuts is that they're presented on RGB displays. They obviously cannot show you what they cannot show you : the area inside the parabola but outside of the triangle. The region outside of the triangle cannot be shown on your screen in a faithful way. For example, RGB cannot display ...


17

Humans are trichromatic, which means we have 3 different kinds of color receptors (better known as cone cells), each sensitive to a different set of wavelengths: Image source: wikipedia So it only takes 3 different monochromatic stimuli to fool our eye into thinking it sees a color that is the same as another. Red, green, and blue are good fits to the ...


5

The mathematical approach to this is to represent the other colors/light sources in terms of your standard primaries in the color space. Represent your target color and available light sources as vectors with, say, the RGB color space as the basis. Figuring out how to display your target color using your available sources then becomes a change of basis, a ...


4

They don't. Aside from what others have said about the physical reasons not, from a practical computer graphics standpoint, representing either surface pigments or light sources with RGB color is insufficient to model colored lighting of a scene. For example there is no way to represent a material which is translucent or reflective only in a narrow band; you ...


4

One more thing: "violet" and "purple" are not the same color. Violet is a pure color around 400 nm; but purple is a combination of red and blue. To our not-quite-perfect human eyes they look the same. If you pass a beam of pure violet through a triangular prism, the light will be bent but not broken up into components. If you then shine a beam of purple ...


3

Removing hue and saturation ("desaturating") leads to a grayscale image with the same luminance as the original colors, for instance: (source: my own photo) It is not possible to remove hue alone without removing saturation, as any saturated color must be saturated in some direction (hue). Nor is it possible to "split" the image into HSV ...


2

I think your answer is a little off. When the saturation is 0, the hue is basically undefined. It has some numerical value, but that value is ignored. Saturation of 0 means achromatic, or uncolored. So it can only be a shade of gray. Saturation is unrelated to value in HSV. You can have all of the following: dark unsaturated colors (basically dark grays ...


1

The technique is called halftone. Achieving continuity must be done through subsampling / super-sampling, but the essence of the algorithm goes like this. Imagine walking across a horizontal line of the image accumulating energy from each input pixel as you go. Once you have accumulated some threshold amount of energy in the accumulator, emit a single ...


1

In the end I decided to use Leon Sorokin's RGBQuant.js for quantization, because it offered better flexibility over the color histogram/clustering method. I'm probably going to convert the quantized palette RGB output to HSV and implement custom clustering that picks out the "highlight" colors, favoring diversity of hue for colors with high value and ...


Only top voted, non community-wiki answers of a minimum length are eligible