Questions tagged [color]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
59 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 ...
2
votes
3answers
42 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 ...
0
votes
2answers
57 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 ...
1
vote
0answers
40 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/...
0
votes
0answers
29 views

Does ffmpeg or NVDEC (nvidia decoder) support YUV444 video input?

I tried feeding an .h264 video with YUV444 color format to ffmpeg in hardware decoding mode on a GTX 1660 and it looks like this color input isn't supported. I get an error in the ...
0
votes
0answers
46 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 ...
0
votes
0answers
47 views

How to filter a photo to look like a cartoon / anime?

I am interested in reverse engineering a video effect, that is composed of different parts. I'll try to split it into different questions as advised on StackExchange Meta. Part 1: TV-Noise effect ...
1
vote
0answers
29 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 ...
0
votes
0answers
25 views

HLSL texture format RGBA16

I have some gbuffer textures with a RGBA16 format and an hdr skybox as well. I am doing a path tracer and want to clamp some indirect samples to reduce very bright ...
1
vote
0answers
38 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 ...
1
vote
0answers
20 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 ...
1
vote
0answers
74 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 ...
2
votes
0answers
60 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 ...
1
vote
1answer
305 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 ...
1
vote
0answers
58 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 ...
2
votes
1answer
68 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 ...
3
votes
1answer
64 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 ...
1
vote
1answer
91 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 ...
1
vote
1answer
92 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 ...
0
votes
0answers
201 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 ...
1
vote
2answers
286 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 ...
1
vote
1answer
132 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 ...
3
votes
1answer
114 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 ...
0
votes
0answers
234 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 *...
4
votes
1answer
82 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.
2
votes
1answer
133 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 ...
4
votes
1answer
99 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,...
1
vote
3answers
1k 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:
0
votes
1answer
30 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 ...
13
votes
4answers
3k 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, ...
3
votes
1answer
62 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 ...
2
votes
1answer
63 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 ...
4
votes
1answer
2k 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 ...
1
vote
1answer
38 views

How to blend a segment of an image with another image

I want to put a segment of an image to another image. But to make it realistic I applied poisson blending. But the output is not good at all. Output without poisson blending. The kid was cropped ...
3
votes
2answers
687 views

Calculate the average color of an image

I want to calculate the average color+opacity of an image. First I thought about just averaging all ARGB values component-wise, but this got really dark on images with a lot of transparency. I also ...
1
vote
1answer
191 views

Understanding material .mtl files

I am reading this piece of documentation to understand mtl files So far I am stuck trying to understand the difference between ambient, diffuse and specular reflectivity (Ka, Kd, Ks). If I am ...
3
votes
2answers
178 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 ...
1
vote
1answer
45 views

Determine paint color from a photo

I ran into this problem while trying to find the paint color of the doors in my house: is it in principe possible to automatically determine the paint color from a photo? Different types of colour ...
2
votes
1answer
472 views

YUV to HSV to RGB issues

As per this resource, there is an easy way to convert from YCbCr to HSV. Saturation is sqrt(Cb^2 + Cr^2). Now here is my issue. If I take pure red (1,0,0), green(0,1,0), and blue(0,0,1) colors, ...
1
vote
1answer
97 views

Quick 2-color quantization for small images

So I have a small (8x8 pixel) image in 24-bit color. I want to be able to (quickly) generate a color-quantized version of the image that only has two colors. One naive approach is to cluster a luma ...
4
votes
1answer
208 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 ...
1
vote
1answer
48 views

What remedies are there for percieved color artifacts due to pixel geometry?

I have a white line on black background. Because of the pixel geometry the line does not look really white; one edge looks red-isch, the other blue-isch. Other fore- and background yield other ...
1
vote
2answers
115 views

Can I get numeric data from a color map?

In my class I often need to work with color map images. I would show the image and try to make inferences/observations about different subjects. Often times I need to actually quantify some aspects, ...
4
votes
1answer
104 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
1answer
169 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 ...
2
votes
2answers
1k views

RGB nonlinear, what does it mean?

What does it mean and why is it not well suited for describing colors by human? Is CMYK nonlinear also?
6
votes
1answer
148 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 ...
4
votes
0answers
145 views

Color of the Sky [closed]

What is the color of the sky depending on the time? I'm looking for a set of colors (HTML-Code), the sky has during sunrise, morning, forenoon, noon, afternoon, evening and sunset. A formula to ...
1
vote
1answer
64 views

Extracting the green-screen region borders

Given a png image with an unknown number of green colored (rgba=0, 65535, 0, 65535) regions 1- How can I find and put the border points of only the separate green boxes to an array like: ...
17
votes
5answers
6k 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?