The current color manipulation logic (found in the util/color folder) uses approximations for transforming between colors and color spaces. This limits what kind of util functions Pelle can provide.
Solution
Re-implement the current color logic using a library that implements the real scientific color transformations, for example Color.js or color-convert. This will make color transformations more deterministic and will allow for more complex util functions.
Alternate Solution
If the real scientific color transformations take up too much space or take too much time to evaluate. It might be better to move those more accurate color transforms into its own library. Which could then be used alongside Pelle.
Problem
The current color manipulation logic (found in the
util/color
folder) uses approximations for transforming between colors and color spaces. This limits what kind of util functionsPelle
can provide.Solution
Re-implement the current color logic using a library that implements the real scientific color transformations, for example Color.js or color-convert. This will make color transformations more deterministic and will allow for more complex util functions.
Alternate Solution
If the real scientific color transformations take up too much space or take too much time to evaluate. It might be better to move those more accurate color transforms into its own library. Which could then be used alongside
Pelle
.Known Issues
~Color.js doesn't have typescript support and there are no plans to add it.~ fixed as of https://github.com/LeaVerou/color.js/pull/221