Skip to content

[css-color] color({num}3,4) "shorthand"/alternate for rgb #275

Closed
@grorg

Description

@grorg

We should consider a version of color() that doesn't take a profile name and defaults to a version of rgb() but with sensible parameters.

e.g. color(1.0 0 0) is red, or rgb(255, 0, 0)
e.g. color(0 1.0 0 0.5) is 50% transparent green, or rgba(0, 255, 0, 0.5)

Notice we don't have the weirdo mix of 0-255 and 0-1!!

In other words, if the first parameter is a number, the whole thing is a color in sRGB.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions