src/spaces/[aliasOf or id].js
Alias of [aliasOfName]
let color = new Color("{{ space.id }}", [{{randomCoord}}]);
{{ join(codeExample, "\n") }}
color.toString();
Learn more about [name]
Color spaces are ColorSpace
objects.
Every function in Color.js that takes a color space reference can take it in one of two forms:
ColorSpace
objectWhen you import a module that defines a color space in the Object-Oriented API, this uses ColorSpace.create()
which does two things:
ColorSpace
constructor to create a new ColorSpace
objectColorSpace.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)
.
src/spaces/[aliasOf or id].js
Alias of [aliasOfName]
let color = new Color("{{ space.id }}", [{{randomCoord}}]);
{{ join(codeExample, "\n") }}
color.toString();
Learn more about [name]