|
@@ -23,25 +23,52 @@
|
23
|
23
|
#pragma once
|
24
|
24
|
|
25
|
25
|
namespace Theme {
|
|
26
|
+ #ifdef LULZBOT_USE_BIOPRINTER_UI
|
|
27
|
+ // The Lulzbot Bio uses the color PANTONE 2175C on the case silkscreen.
|
|
28
|
+ // This translates to HSL(208°, 100%, 39%) as an accent color on the GUI.
|
26
|
29
|
|
27
|
|
- #define COLOR_CORRECTION(rgb) ( \
|
28
|
|
- (uint32_t((((rgb) & 0xFF0000) >> 16) * 1.00) << 16) | \
|
29
|
|
- (uint32_t((((rgb) & 0x00FF00) >> 8) * 1.00) << 8) | \
|
30
|
|
- (uint32_t((((rgb) & 0x0000FF) >> 0) * .75) << 0))
|
|
30
|
+ constexpr int accent_hue = 208;
|
|
31
|
+ constexpr float accent_sat = 0.5;
|
31
|
32
|
|
32
|
|
- #define COLOR_BLEND(a,b,f) COLOR_CORRECTION( \
|
33
|
|
- (uint32_t((((a) & 0xFF0000) >> 16) * f + (((b) & 0xFF0000) >> 16) * (1-f)) << 16) | \
|
34
|
|
- (uint32_t((((a) & 0x00FF00) >> 8) * f + (((b) & 0x00FF00) >> 8) * (1-f)) << 8) | \
|
35
|
|
- (uint32_t((((a) & 0x0000FF) >> 0) * f + (((b) & 0x0000FF) >> 0) * (1-f)) << 0))
|
|
33
|
+ constexpr uint32_t logo_bg = 0xffffff;
|
|
34
|
+ constexpr uint32_t logo_fg = 0xffffff;
|
|
35
|
+ constexpr uint32_t logo_stroke = hsl_to_rgb(accent_hue, 1.0, 0.39);
|
|
36
|
+ #else
|
|
37
|
+ // The Lulzbot logo uses the color PANTONE 382c.
|
|
38
|
+ // This translates to HSL(68°, 68%, 52%) as an accent color on the GUI.
|
|
39
|
+
|
|
40
|
+ constexpr int accent_hue = 68;
|
|
41
|
+ constexpr float accent_sat = 0.68;
|
|
42
|
+
|
|
43
|
+ constexpr uint32_t logo_bg = hsl_to_rgb(accent_hue, 0.77, 0.64);
|
|
44
|
+ constexpr uint32_t logo_fg = hsl_to_rgb(accent_hue, 0.68, 0.52); // Lulzbot Green
|
|
45
|
+ constexpr uint32_t logo_stroke = 0x000000;
|
|
46
|
+ #endif
|
|
47
|
+
|
|
48
|
+ // Shades of accent color
|
36
|
49
|
|
37
|
|
- constexpr uint32_t lulzbot_bg = 0xDEEA5C;
|
38
|
|
- constexpr uint32_t lulzbot_fg = 0xC1D82F;
|
|
50
|
+ constexpr uint32_t accent_color_1 = hsl_to_rgb(accent_hue, accent_sat, 0.26); // Darkest
|
|
51
|
+ constexpr uint32_t accent_color_2 = hsl_to_rgb(accent_hue, accent_sat, 0.39);
|
|
52
|
+ constexpr uint32_t accent_color_3 = hsl_to_rgb(accent_hue, accent_sat, 0.52);
|
|
53
|
+ constexpr uint32_t accent_color_4 = hsl_to_rgb(accent_hue, accent_sat, 0.65);
|
|
54
|
+ constexpr uint32_t accent_color_5 = hsl_to_rgb(accent_hue, accent_sat, 0.78);
|
|
55
|
+ constexpr uint32_t accent_color_6 = hsl_to_rgb(accent_hue, accent_sat, 0.91); // Lightest
|
39
|
56
|
|
40
|
|
- constexpr uint32_t lulzbot_green = COLOR_BLEND(0xC1DB2F,0x788814,0.33);
|
|
57
|
+ // Shades of gray
|
|
58
|
+
|
|
59
|
+ constexpr float gray_sat = 0.14;
|
|
60
|
+
|
|
61
|
+ constexpr uint32_t gray_color_1 = hsl_to_rgb(accent_hue, gray_sat, 0.26); // Darkest
|
|
62
|
+ constexpr uint32_t gray_color_2 = hsl_to_rgb(accent_hue, gray_sat, 0.39);
|
|
63
|
+ constexpr uint32_t gray_color_3 = hsl_to_rgb(accent_hue, gray_sat, 0.52);
|
|
64
|
+ constexpr uint32_t gray_color_4 = hsl_to_rgb(accent_hue, gray_sat, 0.65);
|
|
65
|
+ constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78);
|
|
66
|
+ constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
|
41
|
67
|
|
42
|
68
|
#ifndef LULZBOT_USE_BIOPRINTER_UI
|
43
|
|
- constexpr uint32_t theme_darkest = COLOR_CORRECTION(0x444444);
|
44
|
|
- constexpr uint32_t theme_dark = COLOR_CORRECTION(0x777777);
|
|
69
|
+ // Lulzbot TAZ Pro
|
|
70
|
+ constexpr uint32_t theme_darkest = gray_color_1;
|
|
71
|
+ constexpr uint32_t theme_dark = gray_color_2;
|
45
|
72
|
|
46
|
73
|
constexpr uint32_t bg_color = theme_darkest;
|
47
|
74
|
constexpr uint32_t bg_text_disabled = theme_dark;
|
|
@@ -49,64 +76,59 @@ namespace Theme {
|
49
|
76
|
constexpr uint32_t bg_normal = theme_darkest;
|
50
|
77
|
|
51
|
78
|
constexpr uint32_t fg_normal = theme_dark;
|
52
|
|
- constexpr uint32_t fg_action = lulzbot_green;
|
53
|
|
- constexpr uint32_t fg_disabled = bg_color;
|
|
79
|
+ constexpr uint32_t fg_action = accent_color_2;
|
|
80
|
+ constexpr uint32_t fg_disabled = theme_darkest;
|
54
|
81
|
#else
|
55
|
|
- constexpr uint32_t theme_darkest = 0x545923;
|
56
|
|
- constexpr uint32_t theme_dark = lulzbot_bg;
|
|
82
|
+ // Lulzbot Bio
|
|
83
|
+ constexpr uint32_t theme_darkest = accent_color_1;
|
|
84
|
+ constexpr uint32_t theme_dark = accent_color_4;
|
57
|
85
|
|
58
|
86
|
constexpr uint32_t bg_color = 0xFFFFFF;
|
59
|
|
- constexpr uint32_t bg_text_disabled = 0x333333;
|
60
|
|
- constexpr uint32_t bg_text_enabled = theme_darkest;
|
61
|
|
- constexpr uint32_t bg_normal = theme_dark;
|
62
|
|
-
|
63
|
|
- constexpr uint32_t fg_normal = theme_darkest;
|
64
|
|
- constexpr uint32_t fg_action = theme_dark;
|
65
|
|
- constexpr uint32_t fg_disabled = 0xEFEFEF;
|
66
|
|
-
|
67
|
|
- constexpr uint32_t shadow_rgb = 0xE0E0E0;
|
68
|
|
- constexpr uint32_t fill_rgb = lulzbot_fg;
|
69
|
|
- constexpr uint32_t stroke_rgb = theme_darkest;
|
70
|
|
- constexpr uint32_t syringe_rgb = 0xF1F6C0;
|
|
87
|
+ constexpr uint32_t bg_text_disabled = gray_color_1;
|
|
88
|
+ constexpr uint32_t bg_text_enabled = accent_color_1;
|
|
89
|
+ constexpr uint32_t bg_normal = accent_color_4;
|
|
90
|
+
|
|
91
|
+ constexpr uint32_t fg_normal = accent_color_1;
|
|
92
|
+ constexpr uint32_t fg_action = accent_color_4;
|
|
93
|
+ constexpr uint32_t fg_disabled = gray_color_6;
|
|
94
|
+
|
|
95
|
+ constexpr uint32_t shadow_rgb = gray_color_6;
|
|
96
|
+ constexpr uint32_t stroke_rgb = accent_color_1;
|
|
97
|
+ constexpr uint32_t fill_rgb = accent_color_3;
|
|
98
|
+ constexpr uint32_t syringe_rgb = accent_color_5;
|
71
|
99
|
#endif
|
72
|
100
|
|
73
|
|
- constexpr uint32_t x_axis = COLOR_CORRECTION(0xFF0000);
|
74
|
|
- constexpr uint32_t y_axis = COLOR_CORRECTION(0x00BB00);
|
75
|
|
- constexpr uint32_t z_axis = COLOR_CORRECTION(0x0000FF);
|
76
|
|
- #ifndef LULZBOT_USE_BIOPRINTER_UI
|
77
|
|
- constexpr uint32_t e_axis = COLOR_CORRECTION(0x777777);
|
78
|
|
- constexpr uint32_t feedrate = COLOR_CORRECTION(0x777777);
|
79
|
|
- constexpr uint32_t other = COLOR_CORRECTION(0x777777);
|
80
|
|
- #else
|
81
|
|
- constexpr uint32_t e_axis = 0x000000;
|
82
|
|
- constexpr uint32_t feedrate = 0x000000;
|
83
|
|
- constexpr uint32_t other = 0x000000;
|
84
|
|
- #endif
|
|
101
|
+ constexpr uint32_t x_axis = 0xFF0000;
|
|
102
|
+ constexpr uint32_t y_axis = 0x00BB00;
|
|
103
|
+ constexpr uint32_t z_axis = 0x0000BF;
|
|
104
|
+ constexpr uint32_t e_axis = gray_color_2;
|
|
105
|
+ constexpr uint32_t feedrate = gray_color_2;
|
|
106
|
+ constexpr uint32_t other = gray_color_2;
|
85
|
107
|
|
86
|
108
|
// Status screen
|
87
|
|
- constexpr uint32_t progress = theme_dark;
|
88
|
|
- constexpr uint32_t status_msg = theme_dark;
|
89
|
|
- constexpr uint32_t fan_speed = COLOR_CORRECTION(0x3771CB);
|
90
|
|
- constexpr uint32_t temp = COLOR_CORRECTION(0x892ca0);
|
91
|
|
- constexpr uint32_t axis_label = theme_dark;
|
|
109
|
+ constexpr uint32_t progress = gray_color_2;
|
|
110
|
+ constexpr uint32_t status_msg = gray_color_2;
|
|
111
|
+ constexpr uint32_t fan_speed = 0x377198;
|
|
112
|
+ constexpr uint32_t temp = 0x892c78;
|
|
113
|
+ constexpr uint32_t axis_label = gray_color_2;
|
92
|
114
|
|
93
|
|
- constexpr uint32_t disabled_icon = 0x101010;
|
|
115
|
+ constexpr uint32_t disabled_icon = gray_color_1;
|
94
|
116
|
|
95
|
117
|
// Calibration Registers Screen
|
96
|
|
- constexpr uint32_t transformA = 0x3010D0;
|
97
|
|
- constexpr uint32_t transformB = 0x4010D0;
|
98
|
|
- constexpr uint32_t transformC = 0x5010D0;
|
99
|
|
- constexpr uint32_t transformD = 0x6010D0;
|
100
|
|
- constexpr uint32_t transformE = 0x7010D0;
|
101
|
|
- constexpr uint32_t transformF = 0x8010D0;
|
102
|
|
- constexpr uint32_t transformVal = 0x104010;
|
103
|
|
-
|
104
|
|
- constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled };
|
105
|
|
- constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF };
|
106
|
|
- constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF };
|
107
|
|
- constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF };
|
108
|
|
- constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = lulzbot_green };
|
109
|
|
- constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF };
|
|
118
|
+ constexpr uint32_t transformA = 0x3010D0;
|
|
119
|
+ constexpr uint32_t transformB = 0x4010D0;
|
|
120
|
+ constexpr uint32_t transformC = 0x5010D0;
|
|
121
|
+ constexpr uint32_t transformD = 0x6010D0;
|
|
122
|
+ constexpr uint32_t transformE = 0x7010D0;
|
|
123
|
+ constexpr uint32_t transformF = 0x8010D0;
|
|
124
|
+ constexpr uint32_t transformVal = 0x104010;
|
|
125
|
+
|
|
126
|
+ constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled };
|
|
127
|
+ constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF };
|
|
128
|
+ constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF };
|
|
129
|
+ constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF };
|
|
130
|
+ constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = accent_color_3 };
|
|
131
|
+ constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF };
|
110
|
132
|
|
111
|
133
|
// Temperature color scale
|
112
|
134
|
|