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
5
votes
1 answer
Why do I get an sRGB framebuffer only when I'm setting a non-zero alpha size in SDL2?
I'm trying to render the typical OpenGL color triangle in a gamma correct way by following this guide and consulting the SDL2 documentation on how to enable SRGB support on the default framebuffer.
This is the code I've written, which draws the…

Alexandros
- 3,044
- 1
- 23
- 37
5
votes
1 answer
OpenGL: Gamma corrected image doesn't appear linear
I'm using OpenGL for rendering, and when I write linear values to the default framebuffer (without any gamma correction) they appear linear on my monitor. This goes against everything I thought I knew about gamma correction (as explained here:…

KTC
- 420
- 5
- 15
5
votes
1 answer
sRGB Framebuffer on OpenGL ES 3.0
I am working on a OpenGL ES 3.0 Android project using Java.
I need to implement gamma correction and somewhere I've read that sRGB textures would be supported in OpenGL ES 3.0. So my intention was to call glEnable(GL_FRAMEBUFFER_SRGB) before…

j00hi
- 5,420
- 3
- 45
- 82
5
votes
3 answers
Can SDL create a sRGB OpenGL context?
The documentation of SDL does not seem to mention much about color spaces. I don't see any SRGB flag/parameter for SDL_SetVideoMode or SDL_GL_SetAttribute. Is it possible at all for SDL to ask OpenGL to perform the color correction when writing on…

Niriel
- 2,605
- 3
- 29
- 36
4
votes
1 answer
Gamma-curve experiment -- convert 2.2 to opposite of 1.8?
The Motorola Photon is infamous for exhibiting what others have called "black crush" -- when viewing pictures, most of the detail in dark parts of the image is flattened out to black. Up to now, pretty much everyone has blamed it on the Pentile…

Bitbang3r
- 6,826
- 5
- 27
- 40
4
votes
1 answer
When do we need to use renderer.outputEncoding = THREE.sRGBEncoding
I'm a newbie in three.js. I have been learning three.js by trying to make simple scenes and understanding how the official examples work.
Recently I have been looking at https://threejs.org/examples/?q=trans#webgl_materials_physical_transmission,…

Arky
- 43
- 1
- 4
4
votes
3 answers
How much worse is sRGB than L*a*b* when computing the eucleidan distance between colors?
L*a*b* is the best way of doing it, but converting to it is complicated, and I'm lazy. How much accuracy am I giving up by operating on sRGB directly?

Ansis Māliņš
- 1,684
- 15
- 35
4
votes
3 answers
Are RGB images converted to sRGB automatically before being viewed in web browser?
If we have an RGB image, most browsers and, in fact, monitors only support sRGB space. I am trying to understand something important. Does the monitor/web then convert each of the pixels in the image to sRGB and then display it? Meaning we are…

Andrea Russett
- 81
- 2
- 8
4
votes
0 answers
OpenGL gamma correction with GL_FRAMEBUFFER_SRGB
I am writing a Blinn Phong (LearnOpenGL tutorial) lighting and trying to get gamma corrected colors as final result.
Before i start digging about gamma correction, my lighting looks like this:
Then i spend all day reading about sRgb colorspace, and…

yuris89
- 63
- 4
4
votes
3 answers
Vectorizing sRGB to linear conversion properly in Numpy
In my image editing app I have a function for converting a 32 bit float image from sRGB to linear color space. The formula is:
if value <= 0.04045: (value / 12.92)
if value > 0.04045: ((value + 0.055) / 1.055)^2.4)
My image is a three-dimensional…

tde
- 150
- 13
4
votes
1 answer
sRGB and cross browser color differences
As you probably know colors show differently across browsers and whether its CSS or some image. After doing some research it appears that Sketch, Firefox and Chrome (I am on OSX Yosemite) use the sRGB profile. Safari and the Finder seem to use…

cyberwombat
- 38,105
- 35
- 175
- 251
3
votes
1 answer
THREE.js: Textures become grayish with renderer.OutputEncoding = sRGBEncoding
I'm playing a bit with the Three.js cloth example but instead of the alphaMap, I kept the cloth-plane fully opaque and changed its color map.
The result is quite disappointing as the texture now renders very grayish due to the OutputEncoding of the…

Forepick
- 919
- 2
- 11
- 31
3
votes
1 answer
Convert CMYK PDF to SRGB JPG using PHP and Imagick
I'm trying to convert the first page of PDF documents to a JPEG using Imagick and PHP. As long as the colorspace of the PDF is SRGB, conversion succeeds and the resulting images have correct colors. However, if the PDF has a CMYK colorspace, after…

Tomasz Nguyen
- 2,561
- 22
- 25
3
votes
1 answer
Linear gamma v.s. sRGB texture workflow in Godot?
Should my texture assets be linear or sRGB? In either case, what's the proper way to import them?
(There's a similar question on r/godot but I don't see any thorough answers.)
Godot seems to assume all PNG textures are linear, regardless of any…

ppm
- 178
- 8
3
votes
2 answers
Why are the colors in the 1931 CIE xyY chromaticity diagram white?
When we look at the 1931 CIE chromaticity diagram, represented within the x y plane of xyY space, it renders white colors (or close to white) at points of luminance like the D65 point highlighted here with E.
But why is this the case? The point for…

Union find
- 7,759
- 13
- 60
- 111