JuliaAttic / Color.jl

Basic color manipulation utilities.
Other
47 stars 21 forks source link

colormap, mid value does not work #38

Closed stefanahman closed 5 years ago

stefanahman commented 10 years ago

I am trying to generate a colormap and only want to fetch the darker shades of "Blues":

colormap("Blues", 2; mid=0.9)

But this generates the same color as if mid would be excluded. Am I missing something?

Source: https://github.com/JuliaLang/Color.jl#colormaps

dcjones commented 10 years ago

CC: @natj

natj commented 10 years ago

mid is used for diverging colormaps to change the relative location of the middle point where the color changes from e.g. red to blue in RdBu. What you want to modify is the brightness b that defines the starting point of the color palette.

Now that I look the documentation I can also see where this misconception originates from. For some reason I have mentioned mid as somehow special keyword which it is not.

Also one extra thumb up for a more thorough documentation as mentioned in #32