# Tag Info

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 ...
• 4,420

### 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 ...
• 301

### 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 ...
• 5,950
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 ...
• 246
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 ...
• 4,420

### 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 ...
• 25.1k
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. ...
• 306
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 ...
• 5,950
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)...
• 25.1k
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 ...

### 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 ...
• 3,646
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 ...
• 3,421

### 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 ...
• 266

### 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 ...
• 9,852
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. ...
• 434
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 ...
• 25.1k

### 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.
• 561

### 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 ...
• 302
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 ...
• 1,566
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 ...
• 3,421
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 ...
• 25.1k
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 ...
• 901

### 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 ...
• 1,206

### 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 ...

### What is the effect of the BRDF denominator?

Firstly, I highly suggest reading Eric Heitz's paper "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs", which covers the full derivation of microfacet-based BRDFs. The \$\frac{...
• 3,792

### How to detect a screen in a photo

The first things I would try is to see if smartphone pixels are visible (if the photo is high res) or if strange aliasing occurs (your example image shows both). Another classical test (but not ...
• 1,266

### What is a good color similarity metric?

If complex metric is acceptable I would suggest to look at perceptual based approach described here. The metric is designed to pick perceptual difference of two images. There are two main tests for ...

### How to correctly render visible spectrum with uniform intensity?

I guess that this is related to the sum of the three functions having a minimum there. See the sum plotted against wavelength This is actually a wrong way to sum these functions: sRGB model specifies ...
• 416