Skip to content

[colorManipulator] Support the oklch color notation #41728

@danilo-leal

Description

@danilo-leal
Screenshot 2024-03-31 at 13 50 16

I was experimenting with converting the branding theme palette from HEX codes to the oklch() notation, but the current version of the MUI System doesn't support it, even though it does already support color(display-p3...).

I'm also a bit unsure whether this is System or Pigment CSS scope, so I'll leave that open for now.

Ultimately, this seems like the best color notation to use at the moment1, providing the same great readability that HSL has, but supporting the p3 and other color spaces. I'm super interested in converting the website & documentation to use it (and, of course, Material UI v7 should potentially use it as well). I think in the meantime I'll use color(display-3).

Search keywords: oklch, color notation, p3, wide-gamut

Footnotes

  1. https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl

Metadata

Metadata

Assignees

No one assigned

    Labels

    customization: cssDesign CSS customizability.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUI

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions