Skip to main content
23 votes
Accepted

Why do red, green, and blue make up all the colors?

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 ...
Julien Guertault's user avatar
20 votes

Why do red, green, and blue make up all the colors?

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 ...
Eric Duminil's user avatar
17 votes

Why do red, green, and blue make up all the colors?

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 ...
ratchet freak's user avatar
16 votes
Accepted

"Light intensity" of an RGB value

The short answer: no, but if you are interested in details, please keep reading (: About lighting units Light “brightness” is indeed quite poor/ambiguous layman’s definition for brightness of a ...
JarkkoL's user avatar
  • 3,646
7 votes
Accepted

How much precision (half, float, double, etc) is enough for a Color class?

Colors shown on your display or saved to standard image file formats use 8 bits per component. So to store these colors it suffices to use four bytes (unsigned char)...
Nathan Reed's user avatar
  • 25.1k
7 votes
Accepted

Applying correct light physics to gaussian blur formulas for glow

Yes, your theory is correct. A gamma-correct blur entails converting the input pixels to linear color space, performing the blur weighting and accumulation in that space, and then converting back to ...
Nathan Reed's user avatar
  • 25.1k
7 votes
Accepted

What is the most physically accurate representation of color possible in computer graphics?

The most physically accurate way would be to have a $l(\theta)$ which for each possible color frequency has a certain value. Converting to RGB would then need a frequency responce function for each ...
ratchet freak's user avatar
6 votes

What is the most physically accurate representation of color possible in computer graphics?

There is spectral rendering, where you can quantize the visible wavelengths from ~390nm to ~700nm to N discrete wavelengths instead of the standard 3 for RGB. Then if you had to model say a prism, you ...
JarkkoL's user avatar
  • 3,646
5 votes
Accepted

Generating and Combining Spectral Colors

Your way of calculating XYZ functions is probably the most efficient way to go about calculating accurate colors from a spectrum. It is standard practice afaik, for examples the books Physically Based ...
Tare's user avatar
  • 1,566
5 votes
Accepted

Calculate an equally bright grey to a linear RGB colour

The easiest way to get the perceived brightness of a color is to calculate the Luma. Finding the grey color with the same luma is easy - just set all of the RGB components to the desired luma value. ...
Quinchilion's user avatar
5 votes

What wavelengths(dominant) the primary RGB colors are supposed to be in sRGB color space in nanometers?

The primaries of sRGB are not pure wavelengths, they are color mixtures. Their true definition is in terms of CIE chromaticity coordinates. That said, for sRGB, the red primary is close-ish to 610nm, ...
Nathan Reed's user avatar
  • 25.1k
5 votes

Does CMYK values provide more colors than RGB?

You are focusing far too much on the number of color codes in common implementations. There is no reason that RGB must have 256 values per component, and no reason that CMYK must have 101 values per ...
Kevin Reid's user avatar
  • 1,206
4 votes

Why are RGB tertiary colors so similar to RGB primary colors?

Likely a gamma correction issue. Tertiary colours are some permutation of (1, 0.5, 0) in RGB, right? So the issue arises because without applying gamma, 0.5 appears less than half as bright as 1, so ...
russ's user avatar
  • 2,402
4 votes
Accepted

What determines the color gamut of a display?

The physical imaging elements of your monitor define your gamut. So things like how bright the elements can be as well as the color spectra of the color elements define the gamut. But, thats quite the ...
joojaa's user avatar
  • 8,437
4 votes

Why do red, green, and blue make up all the colors?

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 ...
R.. GitHub STOP HELPING ICE's user avatar
4 votes

Why do red, green, and blue make up all the colors?

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 ...
Jennifer's user avatar
  • 141
4 votes

Strange stripes on the gradient

The non smooth appearance, or visual stripes you see, is called color banding. (Wikipedia) It is produced since the medium, in this case your screen, is only capable of producing a finite array of ...
i am xoph's user avatar
4 votes
Accepted

Strange stripes on the gradient

The 'jumps' to 'a bit darker' are an optical illusion due to how human perception works. Check out Mach bands in wikipedia. Now as for why you get a step function even though you have a smooth ...
lightxbulb's user avatar
  • 2,226
3 votes

Can someone explain this formula for parse RGB to HSL?

First it converts the red, green, and blue values from the 8-bit unsigned integer range to floating point values between 0 and 1. It then figures out which component is the maximum, which is the ...
user1118321's user avatar
  • 3,421
3 votes

What would be the correct way to calculate saturation in this case?

The XYZ and xyY models are extremely useful for certain operations such as manipulating RGB colour spaces to another RGB encoded colour space. However, XYZ and xyY fail quite quickly in other ...
troy_s's user avatar
  • 318
3 votes
Accepted

Why is there a difference between the CIE XYZ colour gamut vs CIE RGB?

Correct, the missing curvy section in the green-cyan-blue area represents where the red component would have to go negative to express those colors in CIE RGB coordinates. RGB and XYZ are, at one ...
Nathan Reed's user avatar
  • 25.1k
3 votes
Accepted

splitting hue & saturating and leaving value behind

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 ...
Nathan Reed's user avatar
  • 25.1k
3 votes

Why are YCbCr transforms defined in terms of gamma-corrected RGB?

Report ITU-R BT.2246-8 discusses this in extensive detail, starting in section 2.3 of Annex 2. The authors discuss the advantages of a YCbCr model operating on linear color (referred to as CL, or ...
colinmarc's user avatar
  • 151
2 votes

Pixel density / color channel depth ratio for dithered gradients

There has been quite some research into this using Barten contrast sensitivity function. It is the current formula behind the Dolby Perceptual Quantizer as featured in SMPTE 2084 and HDR10. This, ...
troy_s's user avatar
  • 318
2 votes
Accepted

How do I calculate average hue, since the numbers loop around?

How do I calculate average hue, since the numbers loop around? I will get silly answers sometimes. For example, in HSB/HSL, the average of hue=10 (slightly orange red) and hue=350 (slightly blue red) ...
Rob's user avatar
  • 256
2 votes

Would there be a point in creating monitors that have more than the regular RGB color channels?

Has such a thing been considered? Can it be done? Would it be useful? Has it already been done? The answer, I believe, would be YES | YES | Not really | YES. You can search for Sharp AQUOS Quattron - ...
Enigmatisms's user avatar
  • 1,087
1 vote
Accepted

What is the relation between colour spaces and what is actually displayed on our screens?

Several reasons. Im listing them in random order There are entire industries that do other things than display things on computer screens. If you were to print a booklet, make a package, movie ...
1 vote
Accepted

Determine paint color from a photo

In theory yes, but practically speaking, I doubt it would be very easy. First, the color may not be representable by the color space that your camera of choice produces images in. We've recently ...
user1118321's user avatar
  • 3,421
1 vote

YUV to HSV to RGB issues

Think about it this way. To calculate YCbCr of (1, 0, 0), you'll end up with Y = 0.299, Cb = -0.16873, Cr = 0.5. If you take the magnitude of the chroma channels (...
user1118321's user avatar
  • 3,421
1 vote

Accurately printed CIE diagram

Its not actually possible to do. Because that paper you print on needs to have properties not avalialbe. The color on the edge are very pure and can not be mixed. I dont also see any way they could be ...
joojaa's user avatar
  • 8,437

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