Lurker News
hue.tools was created after spending way to much time trying to find the right tools when working with colors.

It's an attempt to create a simple but useful toolbox for common color related tasks and problems.
While it's in no way perfect or provides the tools for every use case, it has served me well in the last few months and I hope it will be useful for some of you as well.

Comments (80) 36 threads

Earlier comments
zokier1 reply#
In modify there are "brighten", "tint", and "lighten", and for uninitiated like me the difference seems pretty vague. I suppose they refer to some similar operations in different colorspaces, but the tool could be more intuitive here.

The nerd in me would wish that the tool would use primarily some top-tier colorspace like oklab, but I can understand why you didn't want to go down in that rabbithole.

pabue#
You're right, this part can be a bit confusing. I tried to prevent it by adding short descriptions to the modifiers but there's definitely room for improvement.

I never heard of oklab before. Guess I have some reading to do. But I also wouldn't say no to a PR that adds support for it ;)

just-tom3 replies#
Is it possible to know about a certain color if it's dark or light? My goal is to automatically determine whether to put a white or black text on top of a background colored box based on the answer. Is it has something to do with the temperature? I'd expect to get some value below or above 0.5.
exclipy#
Look at the L for either LAB or LCH. It'll be between 0 and 100.
Cyykratahk#
A simple function is to calculate whether the total of each RGB channel reaches a certain threshold, with different weights given to each channel. For an example, see the YIQ contrast function used by Bootstrap v4 [0].

WCAG defines their own algorithm for calculating the contrast between two colours to ensure good accessibility [1][2]. Bootstrap v5 uses this [3].
[0] https://github.com/twbs/bootstrap/blob/v4.6.1/scss/_function...
[1] https://www.w3.org/WAI/GL/wiki/Relative_luminance
[2] https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
[3] https://github.com/twbs/bootstrap/blob/v5.1.3/scss/_function...

pabue#
Great idea. I think this will fit nicely with the info tool. Also a accessibility contrast score might also be helpful. I will take a look at that. Thanks!
wnolens1 reply#
I really enjoyed adjusting the different knobs in 'Modify' mode to achieve something that 'felt' good to me. I don't know anything about color (as represented by computers or otherwise) but it was fun.

I also love the names that come up ("pig pink" v.s. "strawberry milk")

mhdhn#
Thanks, came here to say, how'd you get the names. That's amazing
echelon1 reply#
Thank you for sharing! This is such a neat library.

Lots of kudos on the work you put in too! Your app is fun and super slick. Top notch design and frontend skills.

pabue#
Thank you very much!
coolhand11 reply#
This. is. awesome. Thanks for sharing! I manage a lot of designs and guidelines for Open Source projects and the amount of time I spend translating color information into different values to make sure everything is "on brand" is ridiculous. This is going to save me ton of time
pabue#
Thank you! Let me know if there is anything that you're missing or that can be improved.

Load more comments