Closed lhupe closed 3 years ago
For the record: this
julia> [c for c ∈ ColorSchemes.Dark2_3[1:3]]
3-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}:
RGB{Float64}(0.106,0.62,0.467)
RGB{Float64}(0.851,0.373,0.008)
RGB{Float64}(0.459,0.439,0.702)
works fine
Hi! Yes, I don't think there's an iterable interface to a colorscheme. You'd probably do:
[c for c ∈ ColorSchemes.Dark2_3.colors]
to run over the colors...
I don't know whether to add an iterable interface...
If you decide not to, it would be nice to disable the broken iteration behaviour altogether (i.e. overwriting iterate
with something that throws an error), so users don't get tricked by the fact that all the functions appear to work (unless you actually take a look at the output, that is…)
Hopefully fixed in ece0ffefdc709be68ab103cac9cb2cce6d7c2cd5
Hi,
I needed to iterate over a color scheme object in order to perform an operation for every color, when I noticed this strange behaviour
the first entry is an array containg all three colors of the color scheme, the second and third entry are the first and second color respectively.