Skip to content

[css-color-5] in <space> syntax for linear-gradient() et al #6667

Description

@surma

The nice thing about color-mix() is that it allows you to specify colors in a different color space then the color space in which the interpolation happens. As far as I can tell, linear-gradient() et al will always interpolate in RGB space, and I can’t find any changes to linear-gradient in CSS Color 4 or 5. Would it be feasible to add a in <space> syntax to linear-gradient(), similar to what color-mix() supports?

Here’s what gradients from blue to green would look like (I used JavaScript to generate these gradients using color-mix()):

Screen Shot 2021-09-22 at 16 31 00

cc @argyleink

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions