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
15 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,596
12 votes
Accepted

How are we supposed to fix brightness with square roots?

What the video is talking about is called gamma correction and it's a very familiar topic for graphics programmers. The first 30 minutes of John Hable's talk on Uncharted 2 rendering is my favorite ...
Nathan Reed's user avatar
  • 24.7k
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
  • 24.7k
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
  • 24.7k
7 votes

Spectral path tracing - image color/brightness incorrect

The problem lies mainly in CIE1931XYZ::tristimulusValues() function, where you normalize the resulting color to the luminance of your illuminant which causes that ...
ivokabel's user avatar
  • 1,424
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,596
5 votes
Accepted

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

There is unfortunately no good answer to this question. Simply it wont work. There is no good way to define colorful, it this context. Cie is trying to capture the physical measurement. It however ...
joojaa's user avatar
  • 8,367
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
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,501
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,367
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

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,342
4 votes

Change particular color in an image

In order to replace a color with another color, you need some sort of distance metric between the colors and a function for calculating the blending based on that distance. Finding a distance ...
user1118321's user avatar
  • 3,391
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,041
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

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
  • 24.7k
4 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
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

Why is the CMYK space four sided in chromaticity charts

There are two aspects to this: The traditional chromaticity graph is actually a two-dimensional slice of a three-dimensional volume. The slice usually used is one that matches up (more or less) to ...
Mark's user avatar
  • 1,592
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,391
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
  • 24.7k
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
  • 24.7k
2 votes
Accepted

Why is the CMYK space four sided in chromaticity charts

It turns out that the chromaticity chart is harder to read than I anticipated. The CMYK slice is actually triangular of sorts its just that the chromaticity chart is not really linear. The ...
joojaa's user avatar
  • 8,367
2 votes

How is spectral rendering handled?

The most common way I saw is to have photons of several different wavelengths. One then renders with each wavelength and blends the results into the final image. "Existing work": Psychopath Renderer ...
Ecir Hana's user avatar
  • 1,459
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

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