w0ntfix · 2022-06-10 04:08
NextTimeJim · 2022-06-10 05:50
This is great! Would be very cool to have interactive interfaces to some of these functions so you could say move point onto a color in rainbow mode and desaturate it with immediate visual feedback
w0ntfix · 2022-06-10 06:13
hm good call -- with the utility from [kurecolor](https://github.com/emacsfodder/kurecolor) it would be easy to add some, eg:
(defun ct-point-edit-lab-l-dec ()
(interactive)
(kurecolor-replace-current 'ct-edit-lab-l-dec))
Then bind that fn to something to play around. I'll add those soon™. Thanks
w0ntfix · 2022-06-10 06:40
Added ct-point-* functions which edit at point. Here's a hydra with knobs for hsluv (based on the doom one for use with kurecolor):
(defhydra ct/hsluv (:color pink :hint nil)
"
Inc/Dec _w_/_W_ brightness _d_/_D_ saturation _e_/_E_ hue "
("w" ct-point-hsluv-l-dec)
("W" ct-point-hsluv-l-inc)
("d" ct-point-hsluv-s-dec)
("D" ct-point-hsluv-s-inc)
("e" ct-point-hsluv-h-dec)
("E" ct-point-hsluv-h-inc)
("q" nil "cancel" :color blue))
NextTimeJim · 2022-06-10 07:57
Incredible thanks - the package (and hydra) have gone straight into the config, will be super useful for CSS/color scheme/theming stuff!
mickeyp · 2022-06-10 17:58
This is really cool. I built something just like this with `color.el`.
I feel a blog post coming...
casouri · 2022-06-10 20:13
This is very nice! Normally you don’t want to use a prefix that’s too short, because the chance of conflict is very high. Example: ts could mean timestamp, typescript, tree-sitter, etc. I don’t think ELPA even accept packages with name shorter than 3 characters.
darcamo · 2022-06-11 15:07
Wow, This is really nice, and the blog post is very well written.
w0ntfix · 2022-06-11 21:00
yeah good callout, I learned that when I was submitting this package to melpa (originally it was named "color-tools", but I didn't want the prefix to be that long)
I think I was mad at the time because so much of the color experience is iteration/judgement, and even ct vs color-tools prefix was getting in the way of my poking at the time