cicwave 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cicwave/theme.py ADDED
@@ -0,0 +1,108 @@
1
+ """Centralized color theme definitions for cicwave.
2
+
3
+ This module is intentionally lightweight (no PySide6/pyqtgraph/numpy
4
+ imports) so that it can be imported from both the tkinter and PySide6
5
+ code paths without pulling in heavy dependencies.
6
+ """
7
+
8
+ THEMES = {
9
+ 'dark': {
10
+ 'pg_background': 'k',
11
+ 'pg_foreground': 'w',
12
+ 'panel_bg': '#2b2b2b',
13
+ 'panel_fg': '#e0e0e0',
14
+ 'text_color': '#e0e0e0',
15
+ 'overlay_fill': (51, 51, 51, 220),
16
+ 'annotation_fill': (51, 51, 51, 200),
17
+ 'annotation_border': 'w',
18
+ 'title_color': 'w',
19
+ 'tree_default_fg': '#e0e0e0',
20
+ 'cursor_a': '#2196F3',
21
+ 'cursor_b': '#FF9800',
22
+ 'wave_colors': [
23
+ '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd',
24
+ '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf',
25
+ '#aec7e8', '#ffbb78', '#98df8a', '#ff9896', '#c5b0d5',
26
+ ],
27
+ 'export_colors': [
28
+ '#0060a8', '#d45800', '#1a8a1a', '#c02020', '#7040a0',
29
+ '#6b4226', '#b8439e', '#505050', '#8a8c00', '#008fa8',
30
+ '#2980b9', '#e67e22', '#27ae60', '#e74c3c', '#8e44ad',
31
+ ],
32
+ 'export_annotation_color': '#333333',
33
+ 'export_annotation_bg': '#ffffcc',
34
+ 'export_annotation_ec': '#888888',
35
+ 'grid_pen': (255, 255, 255, 60),
36
+ 'export_stats_color': '#666666',
37
+ 'palette': {
38
+ 'Window': (43, 43, 43),
39
+ 'WindowText': (224, 224, 224),
40
+ 'Base': (30, 30, 30),
41
+ 'AlternateBase': (43, 43, 43),
42
+ 'ToolTipBase': (43, 43, 43),
43
+ 'ToolTipText': (224, 224, 224),
44
+ 'Text': (224, 224, 224),
45
+ 'Button': (53, 53, 53),
46
+ 'ButtonText': (224, 224, 224),
47
+ 'BrightText': (255, 50, 50),
48
+ 'Link': (42, 130, 218),
49
+ 'Highlight': (42, 130, 218),
50
+ 'HighlightedText': (0, 0, 0),
51
+ },
52
+ },
53
+ 'light': {
54
+ 'pg_background': 'w',
55
+ 'pg_foreground': 'k',
56
+ 'panel_bg': '#f0f0f0',
57
+ 'panel_fg': '#1a1a1a',
58
+ 'text_color': '#1a1a1a',
59
+ 'overlay_fill': (240, 240, 240, 230),
60
+ 'annotation_fill': (255, 255, 240, 220),
61
+ 'annotation_border': '#888888',
62
+ 'title_color': 'k',
63
+ 'tree_default_fg': '#1a1a1a',
64
+ 'cursor_a': '#1565C0',
65
+ 'cursor_b': '#E65100',
66
+ 'wave_colors': [
67
+ '#0060a8', '#d45800', '#1a8a1a', '#c02020', '#7040a0',
68
+ '#6b4226', '#b8439e', '#505050', '#8a8c00', '#008fa8',
69
+ '#2980b9', '#e67e22', '#27ae60', '#e74c3c', '#8e44ad',
70
+ ],
71
+ 'export_colors': [
72
+ '#0060a8', '#d45800', '#1a8a1a', '#c02020', '#7040a0',
73
+ '#6b4226', '#b8439e', '#505050', '#8a8c00', '#008fa8',
74
+ '#2980b9', '#e67e22', '#27ae60', '#e74c3c', '#8e44ad',
75
+ ],
76
+ 'export_annotation_color': '#333333',
77
+ 'export_annotation_bg': '#ffffcc',
78
+ 'export_annotation_ec': '#888888',
79
+ 'grid_pen': (0, 0, 0, 90),
80
+ 'export_stats_color': '#666666',
81
+ 'palette': {
82
+ 'Window': (240, 240, 240),
83
+ 'WindowText': (26, 26, 26),
84
+ 'Base': (255, 255, 255),
85
+ 'AlternateBase': (245, 245, 245),
86
+ 'ToolTipBase': (255, 255, 220),
87
+ 'ToolTipText': (26, 26, 26),
88
+ 'Text': (26, 26, 26),
89
+ 'Button': (225, 225, 225),
90
+ 'ButtonText': (26, 26, 26),
91
+ 'BrightText': (200, 30, 30),
92
+ 'Link': (42, 130, 218),
93
+ 'Highlight': (42, 130, 218),
94
+ 'HighlightedText': (255, 255, 255),
95
+ },
96
+ },
97
+ }
98
+
99
+ _active_theme = THEMES['dark']
100
+
101
+
102
+ def _get_theme():
103
+ return _active_theme
104
+
105
+
106
+ def _set_active_theme(name):
107
+ global _active_theme
108
+ _active_theme = THEMES[name]