Supported Color Spaces

Tree of all color spaces supported by Color.js as of June 2022.

Color spaces are ColorSpace objects. Every function in Color.js that takes a color space reference can take it in one of two forms:

When you import a module that defines a color space, this uses ColorSpace.create() which does two things:

  1. It invokes the ColorSpace constructor to create a new ColorSpace object
  2. It calls ColorSpace.register() to register the color space so it can be referenced with a string id. This just adds the color space to the ColorSpace.registry object.

There is an open issue about eliminating side effects from our color space modules so they can become tree-shakeable, so this may change in the future.