graypegg / chromatism

:rainbow: A simple set of utility functions for colours.
1.78k stars 37 forks source link

`adapt()` should take a illuminant name, rather than a colour. #19

Closed graypegg closed 7 years ago

graypegg commented 7 years ago

This saves us having to put a constants object into the final export, and instead just refer to the CIE standard illuminants by their name. ("D65", "F2", etc)

graypegg commented 7 years ago

This is set up now, using the illuminant label, or, if the illuminant doesn't exists, defaulting to D65. This may need to throw an error in the future, because I don't really like the idea of things failing silently.

TehShrike commented 7 years ago

I support throwing an error on invalid input 👍