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 ...
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 ...
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 ...
13
votes
Accepted
For shader math, why should linear RGB keep the gamut of sRGB?
Talking about Linear RGB must be avoided because it does not tell you anything about the RGB colourspace intrinsics, i.e., Primaries, Whitepoint and Colour Component Transfer Functions. A few years ...
11
votes
Accepted
Why does checkerboard pattern on a computer screen appear with a yellowish tint?
Because your monitor is not properly calibrated.
On my screen at home the top and bottom parts have the same hue. At my office though, the top part tends to looks a bit yellow compared to the bottom ...
11
votes
Accepted
What does "muted" mean in the context of color?
In terms of the HSV color space, "muted" colors are those with lower saturation and/or value.
"Deep" colors are saturated but not too high in value (e.g. deep red) while colors with both high ...
9
votes
Why does the 1/r² term appear with point sources?
The concept of a point source is an approximation. Physically, light sources are extended objects and emit light from every point on their surface; but when you're far enough away (i.e. the distance ...
9
votes
Accepted
Actual vs Perceived Brightness of RGB Colour
Two different effects are causing the observation mentioned in the video.
On one side, the vast majority of screens have a non linear response: if the RGB value is half as much, the emitted light ...
8
votes
Accepted
Function to convert HSV angle to RYB angle
I just discovered that Adobe color source includes HSV-RYB hue mapping functions (replicated in Ben Knight's Kuler-d3). Apparently Adobe uses uses piecewise linear gradients rather than the polynomial ...
8
votes
Accepted
Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams
I think that there is a bit of confusion in terminology. My understanding is that only the initially colored points, before step 1, are called seeds.
Maybe this helps clarify the algorithm as well. ...
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 ...
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)...
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 ...
6
votes
Accepted
Is there a way to interpolate color across the line with only integer calculation ?`
Yes, it is possible to use only integer calculations. I will describe how, but bear in mind that the difference in speed between integer arithmetic and floating point arithmetic is not as great as it ...
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 ...
6
votes
How do you deal with clipping when rendering to a limited colorspace?
Effectively, before you start to think about clipping/clamping, you'll need a general approach to map the much wider color range you are working in onto the [0,1] triplets you want to output. There ...
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 ...
5
votes
Why does the 1/r² term appear with point sources?
It is the inverse square law of light for a pure point light.
$E = \frac{I}{r^2}$
Where E is illuminance and I is pointance or power/flux per unit solid angle.
5
votes
Accepted
Encode two R11G11B10F buffers into one using Y'CbCr?
You might want to look at The Compact YCoCg Framebuffer. It uses a 2-channel buffer to store luminance for every pixel and the two chroma components in half the pixels each, forming a checkerboard. It ...
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. ...
5
votes
Why would a 4d texture be used for color conversion?
I think your quote refers to conversion between color spaces, rather than color grading. 4d textures could be used as lookup tables to convert color spaces like CMYK to some other space. Since CMYK ...
5
votes
Accepted
RGB nonlinear, what does it mean?
In general, non-linear function would mean that an increase in an input does not produce a proportional increase or decrease in output. Mathematically, any function that relates one value to another ...
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 ...
5
votes
Accepted
Calculate the average color of an image
Averaging RGB should be correct assuming you do it in linear RGB. If your images are in sRGB, you can remove the gamma correction by doing something like the following for each of the R, G, and B ...
5
votes
For shader math, why should linear RGB keep the gamut of sRGB?
In practice, when we say "linear RGB," we mean "sRGB without the gamma correction."
It would be more correct to say that there is the "sRGB colorspace" and the "linearized sRGB colorspace", with the ...
5
votes
Accepted
"whiteness" in center of bright colored lights - what is it called?
In general this is caused by HDR tone mapping. Tonemap curves typically decrease saturation as the input light gets brighter, so that very bright lights are rendered closer to white on the display. If ...
5
votes
Accepted
How do I add two color values containing alpha?
First, you have to consider what having an alpha value less than one means. You can consider an RGBA colour like $(1,0,0,0.5)$ as "a red object that is 50% transparent"; but an equivalent ...
4
votes
Why does the 1/r² term appear with point sources?
I'll give an intuitive idea of the reason in this answer. Once this intuitive idea is grasped, it can be easier to absorb the mathematical descriptions.
Other people find it easier the other way ...
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 ...
4
votes
Best technique to draw overlapping colored line segments that follow the same route
This question should most probably be asked on GD.SE or UX.SE. These sites specialize in how to design the graphics and how to choose the graphics for your purpose. But since you are here basic ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
color × 131color-science × 31
image-processing × 11
algorithm × 10
lighting × 10
raytracing × 9
color-management × 9
rendering × 8
colorspace × 8
opengl × 7
brightness × 7
shader × 6
spectral × 6
mathematics × 5
color-separation × 5
glsl × 4
interpolation × 4
image × 4
gamma × 4
texture × 3
transformations × 3
brdf × 3
physically-based × 3
2d × 3
pixel-graphics × 3