1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! Shared styling: a color-blind-safe default palette and small helpers for
//! building [`ShapeStyle`]s, used by every chart type so the crate's output is
//! visually consistent.
//!
//! The default palette is the **Okabe–Ito** qualitative palette, designed to be
//! distinguishable under the common forms of color-vision deficiency.
//!
//! > Okabe, M. & Ito, K. (2008). *Color Universal Design (CUD): How to make
//! > figures and presentations that are friendly to colorblind people.*
//! > <https://jfly.uni-koeln.de/color/>
use ;
/// The eight Okabe–Ito colors as `(r, g, b)` triples, in the recommended order.
///
/// Index 0 is black; [`palette_color`] skips it by default so cycling starts on
/// a hue, but it is available here for callers who want the full set.
pub const OKABE_ITO: = ;
/// Default label / axis font family used across the crate's examples.
pub const DEFAULT_FONT: &str = "sans-serif";
/// Default font size (points) for legend and annotation text.
pub const DEFAULT_FONT_SIZE: u32 = 16;
/// Returns the `i`-th palette color, cycling through the seven non-black
/// Okabe–Ito hues. Deterministic, so the *k*-th series always gets the same
/// color across every chart type.
///
/// ```
/// use plotters_statistical::style::palette_color;
/// use plotters::style::Color;
/// // Cycling wraps after seven hues: index 0 and index 7 map to the same color.
/// assert_eq!(palette_color(0).to_rgba(), palette_color(7).to_rgba());
/// ```
/// A solid-fill [`ShapeStyle`] of the given color (`filled = true`).
/// A stroked (outline) [`ShapeStyle`] of the given color and width
/// (`filled = false`).
/// A translucent fill built from `color` at the given `alpha` (0.0–1.0).
///
/// Used for area shading (AUC fills, violin bodies, box interiors) where an
/// opaque fill would hide gridlines or overlapping series.
/// Convenience: a fully-specified [`RGBAColor`] with explicit alpha.