Linebender graphics wiki
  • Linebender graphics wiki
  • Gamma
  • Color spaces
  • Drawing coordinate system
  • Immediate mode
  • Mouse wheel
  • Useful links
Powered by GitBook
On this page
  • Resources
  • HDR

Was this helpful?

Color spaces

PreviousGammaNextDrawing coordinate system

Last updated 1 month ago

Was this helpful?

This wiki is now archived. You should instead visit the at

Many vector shapes in the druid/piet world are drawn with a solid color, and others are drawn with gradients which are defined in terms of colors. This raises the question: what’s the best way to specify colors?

The simplest approach is to use RGB colors. These are well understood, and even standardized in the form of the colorspace. However, it’s not ideal from a color communication perspective, because it’s hard to intuitively understand the relationship between the color and the numeric or hex code. For example, it’s extremely non-obvious when two colors have the same hue. When designing colorways for user interfaces, it’s often desirable to have highlight and accent colors drawn from the same hue, for example.

Another limitation of sRGB is that it covers a fairly limited gamut, and high-gamut (and HDR) displays are entering the mainstream. Fully supporting these HDR colors is beyond the scope of piet now, but we’d like a convention for representing color that will grow to support HDR in the future.

Thus, we’ve recently (in the form of ) added a way to specify color using Hue, Luminance, and Chroma. It is based on the colorimetrically sound CIE Lab* standard (as opposed to RGB-derived color spaces such as HSV), but these quantities are intuitively clear, and it makes it especially easy to define a family of colors with the same hue. This color space is the same as used by freiefarbe.de.

Following freiefarbe.de, we chose the Lab*-based approach because of its simplicity and widespread existing adoption. Newer color spaces such as Jzazbz, IPT, and CAM16 (see references below) promise more perceptually accurate, particularly in hue constancy (where Lab* has errors particularly in the blue region). But they are also more complex and there is no consensus on which is best.

Resources

HDR

  • Krita talk on implementing HDR: ,

This wiki is now archived. You should instead visit the at

Linebender wiki
https://linebender.org/wiki
sRGB
piet#70
IPT color space
Jzazbz color space
CIECAM02 and CAM 16
freiefarbe.de
slides
video
scRGB
Rec.2020
Linebender wiki
https://linebender.org/wiki