139 reputation
7
bio website gist.github.com/endolith
location New York, United States
age
visits member for 1 year, 9 months
seen Dec 1 at 19:37

I'm an electronics engineer.

My programming experience is limited to high-level Matlab/Python signal processing stuff, and low-level C microcontroller stuff.


Nov
11
awarded  Excavator
Nov
11
revised Where can I find a large palette / set of contrasting colors for coloring many datasets on a plot?
typo and grammar
Nov
11
suggested approved edit on Where can I find a large palette / set of contrasting colors for coloring many datasets on a plot?
Oct
23
comment How to calculate other colors with the same perceived lightness as a given gray value?
It's better to think of it as Lch color space, with cylindrical coordinates of lightness, chroma, and hue. and make sure you don't exceed the RGB cube or it will clip to a wrong color. and there are different ways to "convert to grayscale", so if your colorspace does it differently from your grayscale converter, it won't work.
Oct
23
comment How do you avoid bands of prominent color in gradients?
@horatio: No, the bands are from the curve taking sharp corners as it moves through perceptual color space. Specifically, in my example, it's the chroma that's reaching a peak at those corners.
Oct
23
comment How do you avoid bands of prominent color in gradients?
also see this version of hot which uses rounded corners: gist.github.com/endolith/74275dc8fa2bb9a78266 better, but not great. Making smooth curves (with smooth arc length functions?) in Lab color space is best, I think
Sep
24
awarded  Autobiographer
Mar
6
comment How do you avoid bands of prominent color in gradients?
Here's an attempt using a bezier curve instead: flic.kr/p/e1bcFf flic.kr/p/e15wik
Mar
1
awarded  Scholar
Mar
1
accepted How do you avoid bands of prominent color in gradients?
Mar
1
comment How do you avoid bands of prominent color in gradients?
I still see bands in yours, at the corners, but they're less severe, so it seems the main thing is just to avoid corners altogether and use smooth curves, whether in RGB or Lab or whatever space. I guess a corner in one will be a corner in another regardless. Here's a bunch of different thermal colormaps plotted the same way: flic.kr/p/dYGXUr flic.kr/p/c7YGZo
Mar
1
comment How do you avoid bands of prominent color in gradients?
That definitely looks better. Here's the code for generating the curve image: gist.github.com/endolith/2879736#file-colormap_curve-py
Mar
1
revised How do you avoid bands of prominent color in gradients?
added 200 characters in body
Feb
27
revised How do you avoid bands of prominent color in gradients?
L*a*b* example
Feb
27
comment How do you avoid bands of prominent color in gradients?
More like "avoid sharp corners while moving through HSB space"? But if I try to do cubic interpolation or something, I end up going outside of HSB space, which then clips the values and causes bad things anyway. In my second example, I'm kind of doing what you recommend about adding bridging sections, but it's not working perfectly. It still looks like a blob of yellow inside a blob of reddish-orange with a halo around it, instead of a smoothly-varying color change.
Feb
27
awarded  Critic
Feb
27
revised How do you avoid bands of prominent color in gradients?
added 24 characters in body; edited title
Feb
26
revised How do you avoid bands of prominent color in gradients?
edited body; edited tags
Feb
26
comment How do you avoid bands of prominent color in gradients?
That's not the same kind of banding, and dithering isn't possible in this context, anyway. I guess I'm talking more about perceptual bands in what should be a smooth gradient, while your link is about banding due to quantization of the colors?
Feb
26
awarded  Editor