JuliaAttic / Color.jl

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

diverging_palette() gives an extra color if mid is 1.0 #95

Closed cormullion closed 3 years ago

cormullion commented 9 years ago

I noticed that if you set mid to 1.0 (for some reason), you get one more color than you asked for:

julia> diverging_palette(120, 140, 50, mid=1.0)
51-element Array{RGB{Float64},1}:

julia> diverging_palette(120, 140, 50, mid=0.3)
50-element Array{RGB{Float64},1}:

It may not be important, but I wondered why...