Is there a way to calculate the shades of a color? I’d like to assign evenly spaced fill colors to an arbitrary and ever changing number of objects based on their size. Assign smaller objects darker shades and larger objects lighter shades between black and white.
colorMode( HSB )
is the simplest way. Spin around the hue for each object, put the saturation at or near max, and set the brightness based on size. It’s not perfect, though, as green completely dominates red and blue in brightness, but it’s an easy to use function if you want a wide variety of colors.
1 Like
Thanks, I appreciate the idea. I’ll see what I can do with the technique.
fyi, I’ve been experimenting with a method posted on stackoverflow:
https://stackoverflow.com/questions/6615002/given-an-rgb-value-how-do-i-create-a-tint-or-shade
HSB is indeed the simple way of doing this, but if you want something that is very perceptually uniform, you might want to use CIELAB – which is not built-in, but can be converted into / out of.