1use densa_core::Color;
2
3#[derive(Debug, Clone, Copy, PartialEq)]
5#[non_exhaustive]
6pub struct ChartPalette {
7 pub background: Color,
9 pub grid: Color,
11 pub axis: Color,
13 pub label: Color,
15 pub line: Color,
17 pub up: Color,
19 pub down: Color,
21 pub crosshair: Color,
23 pub marker: Color,
25 pub marker_text: Color,
27}
28
29impl ChartPalette {
30 pub fn new() -> Self {
32 Self {
33 background: Color::srgb(0x0D1117),
34 grid: Color::srgb(0x161B22),
35 axis: Color::srgb(0x30363D),
36 label: Color::srgb(0x8B949E),
37 line: Color::srgb(0x58A6FF),
38 up: Color::srgb(0x3FB950),
39 down: Color::srgb(0xF85149),
40 crosshair: Color::srgb(0x8B949E).with_alpha(0.6),
41 marker: Color::srgb(0x484F58),
42 marker_text: Color::srgb(0xF0F6FC),
43 }
44 }
45}
46
47impl Default for ChartPalette {
48 fn default() -> Self {
49 Self::new()
50 }
51}