Questions tagged [color]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
53 views

Using the Preetham/Shirley/Smits daylight model to get practical (s)RGB values

I have implemented Preetham, Shirley, and Smits’s daylight model using Aubrey Jaffer’s Scheme implementation as a reference and confirmed that my implementation produces the same results in the xyY ...
user avatar
  • 123
0 votes
1 answer
80 views

Why does my Dell laptop monitor give this weird color banding?

I've noticed some very obvious color banding on the screen of my Dell Precision 7750 laptop while watching video (same in every video program; VLC, built-in Windows video player, etc.) Not only does ...
user avatar
  • 101
5 votes
2 answers
137 views

Confusion about HDR image pipeline

I am working on a path tracing renderer, and I want to produce an sRGB image out of the HDR image buffer I get at the end of my rendering algorithm. Up until now I have worked just by clamping values, ...
user avatar
  • 75
1 vote
1 answer
94 views

Painter's algorithm test 2 and test 3?

TEST #2: Surface S is completely behind the overlapping surface relative to the viewing position. S1 is completely behind/inside the overlapping surface S2 How to check these conditions? i) Set the ...
user avatar
2 votes
1 answer
596 views

ACES tonemapping confusion

In different sources I see ACES tonemapping, but I see one of two possible sets of formulas: https://www.shadertoy.com/view/XsGfWV this one https://www.shadertoy.com/view/tdffDl or this I compared ...
user avatar
2 votes
1 answer
56 views

Why do some texture data formats only have the red channel?

While programming something in Rust with the BevyEngine, I came across TextureFormats. My understanding is that those are used to define how the pixel data is handled. So Rgba8Unorm means that there ...
user avatar
  • 23
2 votes
2 answers
143 views

Why do computers more efficiently store black colors than white colors in computer graphics?

I have a question about how colors are stored in computer graphics. I had watched this video previously which had explained about why colors are stored and displayed differently than one would assume ...
user avatar
  • 155
0 votes
3 answers
245 views

How do I add two color values containing alpha?

I started out writing my Color class as just containing R, G, B triplets. Adding colors in this situation turns out to be fairly simple. ...
user avatar
  • 111
1 vote
1 answer
148 views

How to change a RGB value using a radiance value?

I am new to this awesome community, I am currently writing a ray tracer but I hit a problem... Let's say I have a surface(material doesn't matter) of colour [1, 0, 0] in RGB, and the radiance reaching ...
user avatar
1 vote
1 answer
33 views

Is spectral response curve and spectral power distribution the same thing?

I'm reading section 5.2 of pbrt 3rd edition and came across the part where they explain the concept of RGB colors. When we display an RGB color on a display, the spectrum that is actually displayed ...
user avatar
  • 113
2 votes
0 answers
61 views

Why do materials have both an ambient color and a diffuse color?

One of the first things I learned about computer graphics lighting (and light in general) is that when a ray of light hits a surface, the surface absorbs certain colors and the light retains the rest. ...
user avatar
0 votes
1 answer
37 views

Animated rainbow distortion wave effect

https://foundation.app/mg/20210227-3lau-makes-history-1790 The link above shows a video animation that has a rainbow wave distortion effect applied to it, that ripples across the video. how, and in ...
user avatar
0 votes
2 answers
52 views

What is the name of this moving color pixels effect, for animating a painting?

https://superrare.co/artwork-v2/spring-22267 The artwork in the link seems to be based on a painting of a woman, but effects have been added that assign a pixel to each block of the painting that ...
user avatar
2 votes
4 answers
199 views

Question about function for color

I would like a help to understand the following line of code: return float3(pow(color.r, 2.2), pow(color.g, 2.2), pow(color.b, 2.2)); I've seen some places calling ...
user avatar
1 vote
1 answer
57 views

Name and influence of style used for futuristic line patterns?

What is the name of the style of the line graphics used in the image below? The line patterns seem to envelope the shape of the woman maybe algorithmically somehow, becoming denser and yellow on the ...
user avatar
1 vote
1 answer
120 views

How to determine RGB values given a display spectral response curve?

I am reading Physically Based Rendering section 2.2.2 on RGB color. I am trying to understand how, given a display spectral response curves for rgb intensities, we can choose the intensities so that ...
user avatar
2 votes
2 answers
96 views

"whiteness" in center of bright colored lights - what is it called?

When a source of colored light is very bright, it's center appears white. What is the term I need to look for so I can implement this in my shader? I have added an image which is an example of what I ...
user avatar
  • 284
1 vote
1 answer
51 views

Colour Depth in Hardware

I hope this is the correct place to ask this question. It feels to me that I should ask people who have had to program graphics as there’s a lot of confusion about color depth in general. I’m sure a ...
user avatar
2 votes
1 answer
88 views

Determining input color space primaries from spectrum data

If I have an output device, for which I have a known spectrum data for each of it's primaries, I should be able to calculate the CIEXYZ of its primaries using using the integral equations together ...
user avatar
1 vote
2 answers
38 views

splitting hue & saturating and leaving value behind

In an HSV model, the Hue is the color model. So when we split the image or remove H, should we get an image without rgb colors? Similarly, saturation is the gray shade. I read that images become more ...
user avatar
  • 113
1 vote
1 answer
114 views

Raytracer help - Background color writing over some colors?

I'm implementing Peter Shirley's "Raytracer in a Weekend: The next week" and I'm having some trouble with rendering a scene with a light. I'm not sure if the issue is the background color or ...
user avatar
2 votes
3 answers
1k views

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

Yet another question about colour space... In my research on CIE XYZ system, I found that it is based on the CIE RGB colour matching experiments, and that because the RGB system needed occasional ...
user avatar
  • 165
0 votes
2 answers
70 views

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

I am not entirely sure that this is the right stack exchange, but I couldn't find any other suitable one - please redirect me if necessary. There exists mathematically defined colour spaces which help ...
user avatar
  • 165
1 vote
0 answers
189 views

How could I remove this colour interpolation artefact across a quad?

I've been reading up on a vulkan tutorial online, here: https://vulkan-tutorial.com. This question should apply to any 3D rendering API however. In this lesson https://vulkan-tutorial.com/...
user avatar
  • 165
0 votes
0 answers
49 views

Aligning (matching) colors (white balance, brightness) of two scenes based on reference object

What I am trying to do is to become able to compare with reasonable accuracy two real world fabric/textures (colorwise speaking) at two distinct locations. I can't move them into single place to ...
user avatar
1 vote
0 answers
40 views

How to get "Equal" (saturation, brightness) Red and Green Colours in a Web-based Application?

I am looking for a red and a green hue that are equally discernable against a gray background on any PC monitor, using HTML/CSS-based application. There are many possible solutions to balance these ...
user avatar
1 vote
0 answers
76 views

Interpolating HSV color with black

I'm interpolating RGB values by transforming them into HSV space and then back into RGB. I have trouble figuring out how to achieve ...
user avatar
  • 153
1 vote
0 answers
21 views

Alpha part of color class or shape class

I am designing a 2D drawing library (it is its very early stages) and I was wondering what to do with Alpha (transparency). I have two trains of thought: A. Implement Alpha in the Color class ...
user avatar
2 votes
0 answers
86 views

What is the CMYK color profile used by pantone.com

Pantone spot colors are specified in the RGB and CMYK color models on the https://pantone.com website. For example, the Pantone 122 spot color as it appears when printed on coated paper is specified ...
user avatar
  • 21
2 votes
0 answers
125 views

Calculating Luminance From Y'CbCr

I have a video feed generating a stream of of Y'CbCr frames (specifically 8-bit component Y'CbCr 4:2:0, luma range of 16-235, chroma range of 16-240) from which I'd like to calculate relative ...
user avatar
  • 121
1 vote
1 answer
946 views

Shader code for putting an atmosphere over a planet

I'm working on a game set in space with procedurally generated planets, and I'm trying to write a shader that puts an atmosphere over a planet given the color of the atmosphere and the strength of the ...
user avatar
  • 11
1 vote
0 answers
109 views

What image formats support indexed color palettes with more than 256 colors?

I've been reading up on images with indexed color, and while most indexed image formats are limited to 256 colors, there are apparently image formats that support larger palettes. According to ...
user avatar
2 votes
1 answer
81 views

Mixing HSV Channel

I have a question about the saturation channel. 1.) So far I know, that saturation channel only give intensity to Hue channel, but I do not understand, how saturation channel can be dark and what is ...
user avatar
3 votes
1 answer
107 views

map 16-bit integers to RGB colors with monotonic relative luminosity

Red, Green and Blue apparently contribute differently to the luminosity perceived by humans: https://en.wikipedia.org/wiki/Relative_luminance I am trying to find an algorithm to map unsigned 16 bit ...
user avatar
1 vote
1 answer
106 views

Weird glColor3f results in framebuffer objects

The code is glColor3f(1, 1, 1); gluSphere(gluq, 0.2, 10, 10); glColor3f(1, 0, 0); glTranslatef(1, 0, 0); gluSphere(gluq, 0.2, 10, 10); In short, when I draw ...
user avatar
  • 133
2 votes
1 answer
117 views

Reddish tint with spectral renderer

I'm trying to implement a spectral path tracer and comparing results from my program with renders of the same scene done with pbrt and ...
user avatar
0 votes
0 answers
354 views

Sub pixel rendered white text on black background changes color when resized to a very small size

download: https://upload.wikimedia.org/wikipedia/commons/5/57/Subpixel-rendering-RGB.png The above picture is an example for sub pixel rendering. I tried resizing the image to very small size in ...
user avatar
1 vote
2 answers
306 views

How are colors really mixed?

I'm kind of stuck on this one. When following a conventional, high-level shading tutorial, you'll come across these images that are like ambient + diffuse + specular = result, but I can tell that it's ...
user avatar
  • 284
1 vote
1 answer
369 views

Some questions about working in 0-255 integers instead of single precision floating point colors

I have many objects that store their color values. At the moment I'm storing them as vec4 values, that is four 4-byte values for RGBA, mainly because this is how the shader reads them. I was thinking ...
user avatar
  • 131
3 votes
1 answer
147 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 ...
user avatar
0 votes
0 answers
472 views

Path tracing - Better images without Gamma correction?

So I read about tonemapping and Gamma Correction recently and have implemented it in my path tracer. For the time being I'm using Reinhard tonemapping operator as described in his paper $L_d = L_w *...
user avatar
4 votes
1 answer
104 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.
user avatar
  • 143
2 votes
1 answer
277 views

Computing sRGB color from SPDs

I'm trying to write my own spectral path tracer and a bit stuck with converting computed SPDs to LDR RGB values. What I'm doing right now is convert sampled SPDs (in ...
user avatar
4 votes
1 answer
171 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,...
user avatar
  • 43
1 vote
3 answers
2k views

How can I draw this style of grid?

I'm trying to write code (in any language) to render this 3D grid, matching the look and colors as closely as possible:
user avatar
  • 113
0 votes
1 answer
47 views

Converting color to equivalent with opacity

Assume a color X with alpha 1 and RGB 255,230,210. How can i find another color with alpha A ( or an array of colors ) that blended with a background of color Y ( e.g 255,255,255 ) would produce the ...
user avatar
  • 103
13 votes
4 answers
5k 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, ...
user avatar
  • 275
3 votes
1 answer
64 views

Repeating alpha over/under operation multiple times

I have two RGBA colors in linear [0..1] space, src and dst and I want to alpha blender src ...
user avatar
  • 297
2 votes
1 answer
117 views

Will sRGB color space get replaced by wider gamut [closed]

in future, will sRGB which is a common standard monitor color space nowadays be taken the place by the wider gamut color spaces? since wide gamut monitor keep publishing in the market and may be ...
user avatar
6 votes
1 answer
3k 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 ...
user avatar
  • 279