You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, `distinguishable_colors` chooses maximally distinguishable colors from the outer product of lightness, chroma and hue values specified by `lchoices = linspace(0, 100, 15)`, `cchoices = linspace(0, 100, 15)`, and `hchoices = linspace(0, 340, 20)`. The set of colors that `distinguishable_colors` chooses from may be specified by passing different choices as keyword arguments.
191
+
By default, `distinguishable_colors` chooses maximally distinguishable colors from the outer product of lightness, chroma and hue values specified by `lchoices = range(0, stop=100, length=15)`, `cchoices = range(0, stop=100, length=15)`, and `hchoices = range(0, stop=340, length=20)`. The set of colors that `distinguishable_colors` chooses from may be specified by passing different choices as keyword arguments.
192
192
193
193
Distinguishability is maximized with respect to the CIEDE2000 color difference formula (see `colordiff`). If a `transform` function is specified, color difference is instead maximized between colors `a` and `b` according to
194
194
`colordiff(transform(a), transform(b))`.
@@ -198,18 +198,18 @@ Color arrays generated by `distinguishable_colors` are particularly useful for i
Copy file name to clipboardExpand all lines: src/colormaps.jl
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -23,41 +23,41 @@ Args:
23
23
Keyword arguments:
24
24
25
25
- `transform`: Transform applied to colors before measuring distance. Default is the identity; other choices include `deuteranopic` to simulate color-blindness.
26
-
- `lchoices`: Possible lightness values (default `linspace(0,100,15)`)
27
-
- `cchoices`: Possible chroma values (default `linspace(0,100,15)`)
28
-
- `hchoices`: Possible hue values (default `linspace(0,340,20)`)
26
+
- `lchoices`: Possible lightness values (default `range(0,stop=100,start=15)`)
27
+
- `cchoices`: Possible chroma values (default `range(0,stop=100,start=15)`)
28
+
- `hchoices`: Possible hue values (default `range(0,stop=340,start=20)`)
29
29
30
30
Returns:
31
31
A `Vector` of colors of length `n`, of the type specified in `seed`.
32
32
"""
33
33
functiondistinguishable_colors(n::Integer,
34
34
seed::AbstractVector{T};
35
35
transform::Function= identity,
36
-
lchoices::AbstractVector=linspace(0, 100, 15),
37
-
cchoices::AbstractVector=linspace(0, 100, 15),
38
-
hchoices::AbstractVector=linspace(0, 340, 20)) where T<:Color
0 commit comments