Skip to content

Feature request [Color]: Support for perceptual color models (Oklab, Oklch) #4820

Description

@LFS6502

Description of proposed feature

Support for colors, gradients, and animations utilizing the Oklab and Oklch color models.
These color models account for the fact that color vision is both a physical, and a psychological phenomena.
RGB and HSL/HSV are very easy to implement into computers, but they don't account for some weird biases our vision has.

These perceptual models also represent device-independent color which is very useful for web video. Not every possible input is valid, and the range of possible inputs depends on your target color space (sRGB, P3, Adobe RGB, Rec. 2020, Rec. 2100).

In case the color falls outside the target color space, fall-back colors are easily computable.

See these example gradients. These are generated by interpolating between just two values. Notice how the non-perceptual models drift off into different colors, or show variations in brightness.

Image Image Image

How can the new feature be used?

These color models are great for picking colors that actually do share common apparent properties (brightness, hue, etc). And in general, allow for much better design of your color palette.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureEnhancement specifically adding a new feature (feature request should be used for issues instead)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions