Skip to content

Making Color API color spaces available in CSS #32

@LeaVerou

Description

@LeaVerou

Perhaps we should have some kind of way to register a ColorSpace object and make it available to CSS.
I imagine it may need a worker of some sort, to separate its scope from JS APIs we don't want CSS colors to depend on,
and have some kind of registration function that is only exposed in that worker space.

In terms of namespace, I think it's fine if it's the same as colors generated through @color-profile (color(--colorspace ...coords)). E.g. we already have two ways to register custom properties (@property and CSS.registerProperty()), and that's fine. In fact, it could even be used to polyfill @color-profile!

Thoughts, @tabatkins ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-designIssues related to API shape

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions