sRGB refers to the sRGB color space used in digital imaging. Use this tag if you want to ask a question about converting to/from sRGB or modifying images in the sRGB spectrum.
Questions tagged [srgb]
110 questions
1
vote
1 answer
Alpha channels with CSS Color Module Level 4's color() function
I am experimenting with a Sass @mixin that provides support for the display-p3 color-space and gracefully degrades back to sRGB when there is no support for display-p3. Currently, only Safari supports this spec.
@mixin color-spaces($property,…

DanMad
- 1,643
- 4
- 23
- 58
1
vote
2 answers
sRGB constant luminance stripe
I want to create a color spectrum of constant perceived luminance.
This is my attempt so far (here's the codesandbox):
The code
goes through 8-bit RGB values of increasing hue and constant (and irrelevant) lightness,
transforms the triples to the…

John
- 6,693
- 3
- 51
- 90
1
vote
0 answers
Why would converting CMYK image to sRGB for display on web work locally, but not on prod server?
Our graphic artist is delivering image ready for print in CMYK colorspace JPG format, which is correct for printing. I am converting these for display on the web. I understand the "best" thing to do is convert the src.jpg to sRGB colorspace. I've…

Neek
- 7,181
- 3
- 37
- 47
1
vote
0 answers
How is the cieplot 1931 chromaticity diagram calculated in matlab?
I'm completely baffled by the chromaticity diagram calculation in matlab.
It is found here code found here.
The xyz to srgb conversion is standard.. though it seems to be missing an illuminant adaptation.
function [rgb] = xyz2srgb(xyz)
M = […

Union find
- 7,759
- 13
- 60
- 111
1
vote
1 answer
How do I input color values in sRGB space?
I am learning about the sRGB color space in OpenGL.
One thing is colors from textures, but other - direct color values, let's say from graphics editor.
A color component of 0.5 means that the output on the screen will be a lighter color, 187.
What…

kverkagambo
- 49
- 5
1
vote
1 answer
sRGB gamma curve implement in tensorflow
I need to implement sRGB gamma curve in tensorflow. But I can not compute the element wise condition in tensorflow.
In sRGB curve, if the value is less or equal than 0.0031308, it is a linear operation: x*12.95
If the value is greater than…

Jiaju Orange Yue
- 117
- 1
- 1
- 6
1
vote
1 answer
OpenCV strip sRGB profile when imdecode image Python
I am reading in images which I fetch from the internet and then immediately read into OpenCV in python as below:
# read in image as bytes from page
image = page.raw_stream.read()
frame = cv2.imdecode(np.asarray(bytearray(image)), 0)
and I am…

kabeersvohra
- 1,049
- 1
- 14
- 31
1
vote
3 answers
Do I need sRGB v4 or sRGB v2 when exporting to the web?
Before exporting my image to the web, I want to convert them to sRGB and then remove the sRGB profile from the image (to reduce it's size, as sRGB is the default profile to use if there is no embedded icc profile). I was thinking that there is only…

zeus
- 12,173
- 9
- 63
- 184
1
vote
1 answer
glGenerateMipmap with GL_SRGB8 in OpenGL ES 3 results in black texture
I'm using OpenGL ES 3 on Android, and I'm trying to load an sRGB texture and generate mipmaps for it. I'm using GL_SRGB8 for the internal format, generate mipmaps with glGenerateMipmap(GL_TEXTURE_2D), and use GL_LINEAR_MIPMAP_LINEAR. When I try to…

Nathan Stoddard
- 56
- 2
1
vote
1 answer
HDR color-space transformations result in negative RGB values (Yxy to XYZ to sRGB)
I'm currently adding HDR to an old engine and stumbled on a color-space transformation problem.
I'm defining my lights in the Yxy color space
Then I'm converting Yxy to XYZ
XYZ to sRGB transformation.
Using RGB values > 1.0 when rendering and…

James Takarashy
- 299
- 2
- 14
1
vote
1 answer
Load texture as RGB not sRGB in DirectX11 using WIC
I'm loading textures using CreateWICTextureFromMemoryEx from DirectXTK. Everything I load is converted to sRGB. Is there any way to force WIC to create RGB surface instead?
Or maybe there is a way to convert an already loaded texture from sRGB to…

Konstanty
- 13
- 1
- 3
1
vote
1 answer
Small sample in opengl es 3, wrong gamma correction
I have a small sample, es-300-fbo-srgb, supposed to showing how to manage gamma correction in opengl es3.
Essentially I have:
a GL_SRGB8_ALPHA8 texture TEXTURE_DIFFUSE
a framebuffer with another GL_SRGB8_ALPHA8 texture on GL_COLOR_ATTACHMENT0 and a…

elect
- 6,765
- 10
- 53
- 119
1
vote
1 answer
ImageMagick identifies a different colorspace between Mac and Linux
I have a JPEG image.
On my Mac, when I type:
identify -verbose img.jpg
I get Colorspace: sRGB.
On my Linux box, when I type the same thing I get Colorspace: RGB.
Why? Has anyone encountered this before?
The reason this matters:
I get wildly…

chowey
- 9,138
- 6
- 54
- 84
1
vote
1 answer
Check color encoding in the default framebuffer draw buffer for SRGB
I am in the process of implementing sRGB space in my application.
From what I read here, here, here and here I should operate in linear RGB (LRGB) space for the whole pipeline and I dont have to care about any gamma correction since OpenGL will take…

elect
- 6,765
- 10
- 53
- 119
1
vote
1 answer
fast Linear into sRGB
It is good way to convert color from Linear space from 0.0 to 1.0 into sRGB space from 0 to 255 by using Lookup table in this manner?
Example, in Java:
byte[] table;
void initializeTable()
{
table = new byte[65536];
for(int i = 0; i <…

biv
- 1,613
- 3
- 13
- 21