Questions tagged [color]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
33
votes
4answers
1k views

Are there common materials that aren't represented well by RGB?

In graphics we use RGB and other color spaces as an approximation to the full spectrum of light wavelengths. This evidently works pretty well in general, but are there any reasonably common objects/...
17
votes
5answers
5k views

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

Why do red, green, and blue combinations can make up all the visible colors?
16
votes
2answers
458 views

Is gamma still important to take into account?

Do different monitors (including mobile screens) still use significantly different gamma functions when displaying colour images? Is there a standardised way to represent colour that can then be ...
12
votes
4answers
692 views

For shader math, why should linear RGB keep the gamut of sRGB?

sRGB is often contrasted with "linear RGB." Images are stored on disk and passed to displays in sRGB, which is approximately perceptually uniform in intensity. Shader math is done in linear RGB, ...
12
votes
2answers
1k views

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

I'm trying to make a HSV representation of the xyY color space. To calculate hue from an $(x, y)$ color, I use the angle between that color and red (wavelength 745) on the xy chromacity diagram, with ...
10
votes
1answer
569 views

What does “muted” mean in the context of color?

I want to extract colors from images like in Adobe Kuler. When I select colorful or muted corresponding colors are shown. But what is the definition for colorful or muted colors? What do the words "...
9
votes
1answer
86 views

What are the side effects of biasing brightness in continuous spectrum raytracing?

I want to model rays with a continuous range of frequencies so that I can get raytraced images with colour separation on refraction. I can model a light source with a specified frequency distribution ...
8
votes
2answers
258 views

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

I am looking for theoretical and implemented models to represent color in software that strives for physical accuracy. I know that "color only exists in the mind" and that it sort of does not make ...
8
votes
1answer
1k views

Why does checkerboard pattern on a computer screen appear with a yellowish tint?

This question was originally asked on Physics, then moved to Cognitive Sciences. Consider the following image: You might want to display the image in a new page, in case it gets resized for mobile ...
8
votes
2answers
1k views

What is a good color similarity metric?

I have some colors in RGB in [0,1] and want to find a way to rate their similarity, as perceived by a human. I have two ideas in mind, but I am sure there are other options as well, but am unsure ...
8
votes
2answers
167 views

Encode two R11G11B10F buffers into one using Y'CbCr?

We are trying to optimize Lighting in fillrate. Integrated graphics chips are very slow in memory access. There are two Light Buffers: one for Diffuse and one for Specular. Both use format R11G11B10F....
8
votes
1answer
803 views

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

While doing some reading on how real-time applications handle color under OpneGL, I noticed that some examples implemented Color as a collection of 4 floats, while ...
8
votes
1answer
299 views

How to correctly render visible spectrum with uniform intensity?

I'm trying to get the correct representation of visible spectrum to render on the screen. My current progress is with using CIE 1931 standard observer color matching functions analytically ...
7
votes
5answers
399 views

Why does the 1/r² term appear with point sources?

I'm currently reading some books on radiometry. They mention that radiance is constant along a ray. It doesn't change with distance. However, I've seen some raytracer and they put the 1/r² factor when ...
7
votes
1answer
878 views

Function to convert HSV angle to RYB angle

I'm trying to create a RYB color wheel with a smooth-looking gradient across the RYB spectrum. The angles of the HSV wheel are incorrect (yellow at 60deg instead of 120deg etc). If I just do a few ...
7
votes
1answer
192 views

Brightness and contrast VS Gamma, is it possible to identify the gamma “correction amount”?

Trichoplax question aroused my curiosity and the answers in this question also reminded me why I sometimes use different gamma "amounts" to enhance images. Therefore, is it possible to determine the ...
7
votes
2answers
219 views

Why is the CMYK space four sided in chromaticity charts

In chromaticity charts the CMYK color space is usually four-sided. I've lately had to read quite a few charts and it suddenly dawned to me that I don't really understand why. It has just not been ...
7
votes
2answers
173 views

How can I detect edges between different colours of the same brightness?

I'm looking for an algorithm that can identify edges across which colour is changing sharply, rather than just finding changes in brightness. Is this just a matter of using a different colour space ...
7
votes
1answer
77 views

Finding a color perceptually similar to an image

I'm working on a program to use randomly-selected images as a desktop background. Now, not all images are the same shape as a computer monitor. One idea I had for dealing with this is to set a ...
6
votes
1answer
860 views

Actual vs Perceived Brightness of RGB Colour

In this video from about 1:15, it is stated that if you have an RGB value of (0.5,0.5,0.5) it is only 22% as bright as (1,1,1) rather than the expected 50% as bright. Does this mean that RGB is ...
6
votes
2answers
517 views

Best technique to draw overlapping colored line segments that follow the same route

I'm not too versed in computer graphics so my question may be vague. I'm given a sequence of GPS coordinates which I draw on an iOS map, and they define bus routes. Some of the bus routes happen to ...
6
votes
1answer
235 views

How to do a color separation with more than 3 primary colors

How would one do a color separation if there are more than 3 color primaries, or the primaries are nonstandard. In Standard CMYK conversion K is relatively easy conceptually to figure out. Its just a ...
6
votes
1answer
1k views

Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams

I'm having trouble understanding the JFA. As far as I understood the algorithm, it walks log(n) times through every pixel (no matter if it is a seed or not) and looks at that pixel's neighbors in $(x+...
6
votes
1answer
120 views

What determines the color gamut of a display?

I’m not sure if I’m posting this question in the right area but, I’m wondering what determines the color gamut of a display? Is or hardware down to the RGB filter built into a display like a monitor ...
6
votes
2answers
347 views

Color transform algorithm (that also works on saturation and value/lightness)?

To change particular colors in an image, generally you multiply the RGB by a transformation matrix. Image manipulation programs such as gimp & photoshop have a selective color change function that ...
5
votes
2answers
260 views

Calculate an equally bright grey to a linear RGB colour

I'm trying to get a grey linear-RGB-triple that is equally bright as another (colorful) RGB-triple. I have to admit, that there is great confusion for me with all the color stuff, even though I read ...
5
votes
1answer
182 views

Is colorized subpixel rendering possible?

Subpixel rendering is used most commonly to anti alias fonts. It works by leveraging the physical layout of the color components of a display to give geometry details to an image that are smaller than ...
5
votes
1answer
355 views

How can you interpolate over an array of say 5 colors?

I have an array of color values. I have an interpolating parameter, t, which varies from 0 to ...
5
votes
1answer
3k views

Confusion between usages of linear RGB and sRGB

Suppose you have generated an image using linear values for RGB channels. E.g. you linearly interpolated it when doing blending, etc.. When you're going to present this on the screen, should the ...
4
votes
1answer
140 views

How do you deal with clipping when rendering to a limited colorspace?

In my naïve raytracer experiment I work internally with RGB values, and after all the tracing has been done, I end up with raw RGB triplets that I need to write down to some image format with a ...
4
votes
1answer
1k views

Is there a way to interpolate color across the line with only integer calculation ?`

Here is my function that does interpolation ...
4
votes
2answers
327 views

What are the advantages of having two chroma channels and a luma channel vs. three chroma channels?

RGB has the advantage over schemes like YPBPR in that it's more intuitive to understand, so why use the latter? The only advantage I can think of right now is that it allows you to encode greyscale ...
4
votes
1answer
63 views

Getting contrast color to a given color in RGB or ARGB or HEX

I am looking for a stable way to find a contrast/inverted/opposite color to a given one. Application of this is to find best possible color for foreground to give background.
4
votes
1answer
71 views

How to shift color values of a single RGB channel

I’m a weaver and textile maker with no prior coding or programming experience. In researching and reading through posts on this and other message boards, I was able to find a lot of useful information,...
4
votes
1answer
98 views

Generating and Combining Spectral Colors

I have two somewhat related questions to ask: What is the most accurate way to get the colors of a spectrum, without having to go deep into physics and simulating the universe? ;) Right now, I'm ...
4
votes
2answers
275 views

What is the effect of the BRDF denominator?

I was reading a paper on BRDF. I've come across this formula : $$ f(\omega_i, \omega_o ) = \frac{FDG}{4(N.V)(N.L)}$$ The (N.L) term can be cancelled by the cosine term which appears in the rendering ...
4
votes
3answers
1k views

OpenGL - Colours not working properly

I am using a single VBO to store vertices in the follow format: v1X, v1Y, v1Z, v1R, v1G, v1B, v2A, v2X, ... Vertex positioning is fine, shapes show up where expected, however instead of using the ...
4
votes
1answer
121 views

Can someone explain this formula for parse RGB to HSL?

Im trying to complain the algorithm to calculate the HSL value form a RGB color. I understand the algorithm for the Hue, but im lost with the Lightness and saturation. Someone can explain why? There ...
4
votes
1answer
145 views

How to detect a screen in a photo

Is there a way to make a difference between a photo of an actual object and a photo of an object through a computer or smartphone screen. For example: how can I detect that the second image is taken ...
4
votes
1answer
537 views

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

If I calculate the average (mean) hue of a set of colours naively, I will get silly answers sometimes. For example, in HSB/HSL, the average of hue=10 (slightly orange red) and hue=350 (slightly blue ...
4
votes
1answer
127 views

Preserving luminance

I am writing an application with multiple colored surfaces. I would like to preserve luminance, i.e. a blue surface would appear as bright as a green one, are there tools to help for this?
4
votes
2answers
262 views

Suggested image preprocessing before applying threshold

I am trying to vectorize the contours (skewed rectangle) of the TV in the following original image. My first step is applying threshold. Tried selection of threshold values based on what skimage has ...
4
votes
1answer
125 views

What is the purpose of this cube in color quantization?

So, I go to install GMIC for Gimp via the package manager and landed myself upon the demo program. I have discovered things such as Hough transform and color quantization. So, I get the number of ...
4
votes
1answer
159 views

Javascript color extraction library

I have a small project that needs to extract the perceptually-salient colors of an image, in javascript. There are a few libraries out there (color-thief.js, vibrant.js). The trouble is, I'm finding ...
4
votes
0answers
93 views

How to properly color particles in N body sim?

In my n-body simulation I would like to color the particles in way which corresponds to the magnitude of the net force acting on them. This is so that I can confirm visually that the particles ...
3
votes
2answers
274 views

Why would a 4d texture be used for color conversion?

You can perform color conversion as a post process step to convert a rendered frame's colors to a different set of colors. You might make darker colors more blue for instance, to give it a night time ...
3
votes
2answers
154 views

Why does _ray_ tracing work?

Perspective projection (or at least non-orthogonal) is by far the most common in photo-realistic graphics. When we use perspective projection, the (equally thick) slices of volume visualized by each ...
3
votes
2answers
206 views

Can I have lower color bit depth in sample buffer than target framebuffer?

I´m looking into uses of high amount of samples in multisampling. If I have an RGBA8 framebuffer and render to it using multisample with many samples, say 32, dithering on per-sample level should ...
3
votes
1answer
209 views

What graphics techniques can be used to simulate a color nebula effect?

I've been playing around with more advanced graphics these days (beyond the basic 2D UI and image effects that the iOS platform offers), and I'm wanting to implement a visual effect similar to how iOS'...
3
votes
1answer
79 views

Tiled Image Palettization Algorithm?

In most cases today, image palettization consists of reducing the overall number of colors in an image to some fixed number globally. This is typically solved as a straightforward but computationally ...