Skip to content

[css-color] What happens in color() if you pass numbers to a named colorspace, or vice versa?  #348

@tabatkins

Description

@tabatkins

I'm rewriting the color() section a bit, and I realized that error-handling for passing the wrong type of argument to color() isn't defined. That is, what if you write color(rec2020 "foo")?

Similar cases: color(pantone .1 .2 .3) (expects a string, gets numbers), and color(pantone "foo") (correctly gets a string, but an unknown value).

I think the latter two should maybe fallback? The first one could maybe do that too, but alternately it could just fill in all channels with 0.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions