Skip to content

[css-color] Add OkHSL #8659

Open
Open
@Ptico

Description

@Ptico

The CSS Color 4 already have an OkLAB and OkLCH which is great step forward, but it turned out not everyone is aware @bottosson have created OkHSL and OkHSV as well. This color spaces combines the benefits of HSL and OkLAB:

  1. Human friendly — it is easy to calculate or build a desired color just looking at numbers without having a PhD in physics
  2. Scripting ability — generate color palettes just by rotating an H component
  3. a11y — possibility to derive a color with exact desired color contrast

The only downside: unlike OkLAB, OkHSL is limited to sRGB and i'm not sure if it possible to scale it to the wide gamut. Anyway, it worth to at least discuss this.

@LeaVerou

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions