8000 [css-color] Support all existing (non-legacy?) formats in color()? · Issue #6741 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-color] Support all existing (non-legacy?) formats in color()? #6741

@LeaVerou

Description

@LeaVerou

Yes, I know there are unresolved issues wrt to representing polar coordinates in color() and we'd need to solve these first. Maybe by changing its grammar to be [<number-percentage> | <angle> | none]+ instead of [<number-percentage> | none]+.

Why should we be able to represent all existing color formats through color()?

  • Right now the distinction between which color formats have a dedicated function and which ones are specified via color() is murky. The spec describes color() as "Profiled, Device-dependent Colors", but also includes the XYZ spaces there.
  • There is no way for authors to parameterize the color space for colors not available in color() so that e.g. they can use OKLCH if that's supported or LCH if not.
  • Even we are confused about whether to add new color spaces in color() or as separate functions, imagine how difficult authors will find it to remember the distinction.

Reasons against doing this:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-color-5Color modification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0