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 in the Object-Oriented API, 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.

If you are using the prodcedural API, you need to register color spaces yourself, by calling ColorSpace.register(colorSpaceReference).