Skip to content

[css-color] clarify the value allowed for the gray() function, percentage or number #635

@dmeranda

Description

@dmeranda

In section 9 about the gray() function the syntax says it accepts a <number> as it's first parameter, but then the only example in the descriptive text mentions that "gray(50%)" is a visual mid-gray,which is a percentage value.

Should gray accept either a <number> or <percentage>, similar to alpha-value — where gray(1) should be interpreted the same as gray(100%), which is white?

Or alternatively, if gray is really supposed to be a shortcut for Lab's L value (with a=b=0), then should gray(100) be the same as gray(100%)? And for that matter, if there is an equivalence being made between gray and Lab, should the lab() function itself, and lch(), allow either a number value (0 to 100) as well as a percentage for it's first parameter?

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