Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Web color is still using linear color space.

There is nothing wrong with this because now the browser can decide how to convert it. So the title should be: browsers still use linear color space.



They use sRGB color space. If it used linear color space it wouldn't have this issue.


I assumed the interpolation of gradients isn't a matter for the colorspace?


The problem is the non-linear conversion between sRGB values and actual displayed brightness. Some operations have physical equivalents (e.g. transparent overlays can be defined equivalently to viewing a background through colored glass). If they do and you use textbook physical models to implement them, you need to also use linear intensity values to get it right. A lot of code out there ignores this.


Does it becomes obvious that it is a problem when I point out that using sRGB color space means we do linear interpolation of values in a non-linear space?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: