3 ms·
I find that RGB color space has lots of washed-out colors with linear interpolation, but other color spaces like HSV or HCL don't have the same issue. I tend to
by tvanantwerp 8y ago
I find that RGB color space has lots of washed-out colors with linear interpolation, but other color spaces like HSV or HCL don't have the same issue. I tend to use those color spaces for creating gradients for charts with D3. I don't know if any games make use of them.
- gavanwoolery 8y agoAgreed, here is one good comparison of color spaces: http://davidjohnstone.net/pages/lch-lab-colour-gradient-picker http://davidjohnstone.net/pages/lch-lab-colour-gradient-pick... Things like CIELAB are also interesting in that they provide more perceptually uniform color spaces, but at a greater computational cost.
- slavik81 8y agoThere's also a good discussion of colorspaces and perceptual linearity in "A Better Default Colormap for Matplotlib": https://bids.github.io/colormap/ https://bids.github.io/colormap/
- viggity 8y agoAgreed. I found the YIQ color space for perceived luminance to be extremely useful for foreground/background color readability. http://blog.nitriq.com/BlackvsWhiteText.aspx http://blog.nitriq.com/BlackvsWhiteText.aspx There are other tricks you can use like stroking/bordering the text with the opposite color as it provides contrast when white is on a light background or black is on a dark background. You can also have the text "glow" or some use a drop shadow. But these don't work that great when your text is small. However you have to use these tricks when you are putting text on top of a gradient.
- MrLeap 8y agoHSV has been my color space of choice when I made simulators for government and industry. That's been my technique since 2007. Lerping through colors that way always looks atleast fine.