Discussion: Next Iteration of ColorHelper
See original GitHub issueThe next iteration of ColorHelper may change some things. The aim is to make the library more maintainable. And easier to support.
ColorHelper was originally coded up very fast as a proof of concept, but it is also a bit of a mess inside. It also may be able to be improved to more match what people need, then what I thought was “cool” at the time. The plan is slowly evolving, so I’m open to gathering input as I tackle different areas.
I’d love to hear how people would like it to work differently. Not all Ideas may be implementable. I know processing color variables is one that people have wanted for a long time, but without running a separate process that indexes the files (like an LSP server) that may not be possible (or at least easily doable).
-
I’m re-writing the CSS color library. It will be stand alone and you can feed it CSS color syntax and get back a color object. You can translate between the colors and perform augmentation on them if necessary.
-
Define custom outputs
-
Define custom color formats. This may be a little bit involved, but with the new library, it should be possible.
-
Handle color formats from the latest spec: LCH, LAB,
gray()
(fix existing support as it should utilize LCH color space), etc. -
Better color picker (and can be used anywhere).
-
Streamline color detection in a file.
-
Support and options for rendering previews of colors that are out of gamut.
-
more to come
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (24 by maintainers)
Top GitHub Comments
Ignoring the artifacts in this gif, the color picker will now adjust the rainbow box according to the saturation of the target color. And since we no longer round trip back to RGB each time, we don’t lose the hue angle like we used to when you reduce saturation to zero. We now stay in the HSL color space when in HSL.
Any work to create an async special class that can be used by anyone is going to have to be done as a separate issue. I’ve spent the last number of weeks doing an extensive overhaul to ColorHelper to improve behavior add long-overdue features and make it more flexible and easier for me to maintain.
Frankly, I’m going to need a break 😆. But I’m excited to make a beta available and start getting feedback. I’m going to close this issue for now and open a new beta issue once it is setup for testing.