JuliaGraphics / ColorSchemes.jl

colorschemes, colormaps, gradients, and palettes
http://juliagraphics.github.io/ColorSchemes.jl/
Other
187 stars 33 forks source link

How do I know if a color scheme is continuous or categorical? #118

Closed eliascarv closed 5 months ago

eliascarv commented 5 months ago

I wanted to identify the type of colorscheme to throw an error if the user passed a continuous colorscheme to categorical values, for example.

cormullion commented 5 months ago

Aren’t all colorschemes categorical (having n colors in .colors) and continuous (with get(scheme, f))?

Or I don’t understand the question yet! 😀

eliascarv commented 5 months ago

You're absolutely right @cormullion, it doesn't make sense to think about categorical or continuous colorscheme, since it can be both. Thanks for the answer!