Open mouse0270 opened 2 years ago
Chroma was used in this project before Spectrum was introduced, so I guess the original dev didn't knew about TinyColor. Personally, I had no idea about it. Chroma's function in this project is to return a gradient of colors based on either Bézier curve, RGB, HSL or LCH. TinyColor might be able to do that, but I'm not sure if it would be a simple change.
Oh okay, I can take a look and see if I can replicate that feature in TinyColor, if so it will help cut back on libraries if possible.
I've tried some changes last night and my conclusion is that Chroma is needed because Tinycolor doesn't make gradients, and its sub-library, Tinygradient, does it but doesn't support the Bézier and LCH.
In the end I'd have the same number of libraries and less color options. I am not sure how many people use the other color modes, but there's no point in doing so if there would still be two libraries on the project.
Other findings:
Spectrum comes with a built-in library called tinyColor for color manipulation. Is there a reason to be using both libraries?
Not really a bug, was just curious as it might help cut back on some unnecessary code? Unless chroma does something TinyColor can't do. But I believe they do very similar things.