Skip to content

[css-color-4] Should gray() accept percentage for lightness? #4648

Closed
@smfr

Description

@smfr

https://www.w3.org/TR/css-color-4/#grays

As the spec says, gray(a / b) is equivalent to lab(a 0 0 / b). However, lab() and lch() both take a percentage as the lightness argument, but gray() is specified to take a number (where 50 is equivalent to 50%). That's confusing if we expect authors to think of gray() as just a shorthand for lab().

So I suggest we spec gray as:
gray() = gray( <percentage> [ / <alpha-value> ]? )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions