Skip to content

[css-color-5] How should negative percentages behave in color-mix()? #6047

@weinig

Description

@weinig

In CSS Color 5's color-mix() function, https://drafts.csswg.org/css-color-5/#color-mix, what should happen if a negative percentage is passed either as lone percentage or to an adjuster. For example, what should the behavior of the following two examples be:

color-mix(lch, red -10%, blue);
color-mix(lch, red hue -10%, blue);

In the investigative implementation in WebKit, I have implemented it as clamping to 0% in this case, but would like further clarity. Another, perhaps better, interpretation would be to keep it -10%, and use 110% of the hue of blue?

In general, being specific about values less than 0 and greater than 100 would be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions