refactor: introduce new palette colors for control tint

neutral colors will not be tinted anymore
This commit is contained in:
Ashley Wulber 2025-07-16 20:20:08 -04:00
parent 0943f131c2
commit b8f9dc6cb0
4 changed files with 78 additions and 55 deletions

View file

@ -132,6 +132,29 @@ pub struct CosmicPaletteInner {
/// A wider spread of dark colors for more general use. /// A wider spread of dark colors for more general use.
pub neutral_10: Srgba, pub neutral_10: Srgba,
/// Tinted control colors.
pub control_0: Srgba,
/// Tinted control colors.
pub control_1: Srgba,
/// Tinted control colors.
pub control_2: Srgba,
/// Tinted control colors.
pub control_3: Srgba,
/// Tinted control colors.
pub control_4: Srgba,
/// Tinted control colors.
pub control_5: Srgba,
/// Tinted control colors.
pub control_6: Srgba,
/// Tinted control colors.
pub control_7: Srgba,
/// Tinted control colors.
pub control_8: Srgba,
/// Tinted control colors.
pub control_9: Srgba,
/// Tinted control colors.
pub control_10: Srgba,
/// Potential Accent Color Combos /// Potential Accent Color Combos
pub accent_blue: Srgba, pub accent_blue: Srgba,
/// Potential Accent Color Combos /// Potential Accent Color Combos

View file

@ -1 +1 @@
Dark((name:"cosmic-dark",bright_red:(red:1.0,green:0.62745098,blue:0.60392157,alpha:1.0),bright_green:(red:0.36862745,green:0.85882352,blue:0.54901960,alpha:1.0),bright_orange:(red:1.0,green:0.63921569,blue:0.49019608,alpha:1.0),gray_1:(red:0.10588235,green:0.10588235,blue:0.10588235,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),neutral_2:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),neutral_3:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),neutral_4:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),neutral_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),neutral_6:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),neutral_7:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),neutral_8:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),neutral_9:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),accent_blue:(red:0.3882353,green:0.81568627,blue:0.87450981,alpha:1.0),accent_indigo:(red:0.63137255,green:0.75294118,blue:0.92156863,alpha:1.0),accent_purple:(red:0.90588235,green:0.61176471,blue:0.99607843,alpha:1.0),accent_pink:(red:1.0,green:0.61176471,blue:0.69411765,alpha:1.0),accent_red:(red:0.99215686,green:0.63137255,blue:0.62745098,alpha:1.0),accent_orange:(red:1.0,green:0.67843137,blue:0.0,alpha:1.0),accent_yellow:(red:0.96862745,green:0.87843137,blue:0.38431373,alpha:1.0),accent_green:(red:0.57254902,green:0.81176471,blue:0.61176471,alpha:1.0),accent_warm_grey:(red:0.79215686,green:0.72941176,blue:0.70588235,alpha:1.0),ext_warm_grey:(red:0.60784314,green:0.55686275,blue:0.54117647,alpha:1.0),ext_orange:(red:1.0,green:0.67843137,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882353,blue:0.25098039,alpha:1.0),ext_blue:(red:0.28235294,green:0.72549020,blue:0.78039216,alpha:1.0),ext_purple:(red:0.81176471,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.97647059,green:0.22745098,blue:0.51372549,alpha:1.0),ext_indigo:(red:0.24313725,green:0.53333333,blue:1.0,alpha:1.0))) Dark((name:"cosmic-dark",bright_red:(red:1.0,green:0.62745098,blue:0.60392157,alpha:1.0),bright_green:(red:0.36862745,green:0.85882352,blue:0.54901960,alpha:1.0),bright_orange:(red:1.0,green:0.63921569,blue:0.49019608,alpha:1.0),gray_1:(red:0.10588235,green:0.10588235,blue:0.10588235,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),control_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),control_1:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),control_2:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),control_3:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),control_4:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),control_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),control_6:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),control_7:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),control_8:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),control_9:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),control_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),neutral_2:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),neutral_3:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),neutral_4:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),neutral_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),neutral_6:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),neutral_7:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),neutral_8:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),neutral_9:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),accent_blue:(red:0.3882353,green:0.81568627,blue:0.87450981,alpha:1.0),accent_indigo:(red:0.63137255,green:0.75294118,blue:0.92156863,alpha:1.0),accent_purple:(red:0.90588235,green:0.61176471,blue:0.99607843,alpha:1.0),accent_pink:(red:1.0,green:0.61176471,blue:0.69411765,alpha:1.0),accent_red:(red:0.99215686,green:0.63137255,blue:0.62745098,alpha:1.0),accent_orange:(red:1.0,green:0.67843137,blue:0.0,alpha:1.0),accent_yellow:(red:0.96862745,green:0.87843137,blue:0.38431373,alpha:1.0),accent_green:(red:0.57254902,green:0.81176471,blue:0.61176471,alpha:1.0),accent_warm_grey:(red:0.79215686,green:0.72941176,blue:0.70588235,alpha:1.0),ext_warm_grey:(red:0.60784314,green:0.55686275,blue:0.54117647,alpha:1.0),ext_orange:(red:1.0,green:0.67843137,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882353,blue:0.25098039,alpha:1.0),ext_blue:(red:0.28235294,green:0.72549020,blue:0.78039216,alpha:1.0),ext_purple:(red:0.81176471,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.97647059,green:0.22745098,blue:0.51372549,alpha:1.0),ext_indigo:(red:0.24313725,green:0.53333333,blue:1.0,alpha:1.0)))

View file

@ -1 +1 @@
Light((name:"cosmic-light",bright_red:(red:0.53725490,green:0.01568627,blue:0.09411765,alpha:1.0),bright_green:(red:0.0,green:0.34117647,blue:0.17254901,alpha:1.0),bright_orange:(red:0.47450980,green:0.17254902,blue:0.0,alpha:1.0),gray_1:(red:0.84313725,green:0.84313725,blue:0.84313725,alpha:1.0),gray_2:(red:0.89411765,green:0.89411765,blue:0.89411765,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),neutral_2:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),neutral_3:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),neutral_4:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),neutral_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),neutral_6:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),neutral_7:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),neutral_8:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),neutral_9:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),accent_blue:(red:0.0,green:0.32156863,blue:0.35294118,alpha:1.0),accent_indigo:(red:0.18039216,green:0.28627451,blue:0.42745098,alpha:1.0),accent_purple:(red:0.40784314,green:0.12941176,blue:0.48627451,alpha:1.0),accent_pink:(red:0.52549020,green:0.01568627,blue:0.22745098,alpha:1.0),accent_red:(red:0.47058824,green:0.16078431,blue:0.18039216,alpha:1.0),accent_orange:(red:0.38431373,green:0.25098039,blue:0.0,alpha:1.0),accent_yellow:(red:0.32549020,green:0.28235294,blue:0.0,alpha:1.0),accent_green:(red:0.09411765,green:0.33333333,blue:0.16078431,alpha:1.0),accent_warm_grey:(red:0.33333333,green:0.27843137,blue:0.25882353,alpha:1.0),ext_warm_grey:(red:0.60784314,green:0.55686275,blue:0.54117647,alpha:1.0),ext_orange:(red:0.98431373,green:0.72156863,blue:0.42352941,alpha:1.0),ext_yellow:(red:0.96862745,green:0.87843137,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568627,green:0.79215686,blue:0.84705882,alpha:1.0),ext_purple:(red:0.83529412,green:0.54901961,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.61176471,blue:0.86666667,alpha:1.0),ext_indigo:(red:0.58431373,green:0.76862745,blue:0.98823529,alpha:1.0))) Light((name:"cosmic-light",bright_red:(red:0.53725490,green:0.01568627,blue:0.09411765,alpha:1.0),bright_green:(red:0.0,green:0.34117647,blue:0.17254901,alpha:1.0),bright_orange:(red:0.47450980,green:0.17254902,blue:0.0,alpha:1.0),gray_1:(red:0.84313725,green:0.84313725,blue:0.84313725,alpha:1.0),gray_2:(red:0.89411765,green:0.89411765,blue:0.89411765,alpha:1.0),control_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),control_1:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),control_2:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),control_3:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),control_4:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),control_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),control_6:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),control_7:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),control_8:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),control_9:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),control_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.87058824,green:0.87058824,blue:0.87058824,alpha:1.0),neutral_2:(red:0.74509804,green:0.74509804,blue:0.74509804,alpha:1.0),neutral_3:(red:0.61960784,green:0.61960784,blue:0.61960784,alpha:1.0),neutral_4:(red:0.50196078,green:0.50196078,blue:0.50196078,alpha:1.0),neutral_5:(red:0.38823529,green:0.38823529,blue:0.38823529,alpha:1.0),neutral_6:(red:0.28235294,green:0.28235294,blue:0.28235294,alpha:1.0),neutral_7:(red:0.18039216,green:0.18039216,blue:0.18039216,alpha:1.0),neutral_8:(red:0.08627451,green:0.08627451,blue:0.08627451,alpha:1.0),neutral_9:(red:0.01176471,green:0.01176471,blue:0.01176471,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),accent_blue:(red:0.0,green:0.32156863,blue:0.35294118,alpha:1.0),accent_indigo:(red:0.18039216,green:0.28627451,blue:0.42745098,alpha:1.0),accent_purple:(red:0.40784314,green:0.12941176,blue:0.48627451,alpha:1.0),accent_pink:(red:0.52549020,green:0.01568627,blue:0.22745098,alpha:1.0),accent_red:(red:0.47058824,green:0.16078431,blue:0.18039216,alpha:1.0),accent_orange:(red:0.38431373,green:0.25098039,blue:0.0,alpha:1.0),accent_yellow:(red:0.32549020,green:0.28235294,blue:0.0,alpha:1.0),accent_green:(red:0.09411765,green:0.33333333,blue:0.16078431,alpha:1.0),accent_warm_grey:(red:0.33333333,green:0.27843137,blue:0.25882353,alpha:1.0),ext_warm_grey:(red:0.60784314,green:0.55686275,blue:0.54117647,alpha:1.0),ext_orange:(red:0.98431373,green:0.72156863,blue:0.42352941,alpha:1.0),ext_yellow:(red:0.96862745,green:0.87843137,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568627,green:0.79215686,blue:0.84705882,alpha:1.0),ext_purple:(red:0.83529412,green:0.54901961,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.61176471,blue:0.86666667,alpha:1.0),ext_indigo:(red:0.58431373,green:0.76862745,blue:0.98823529,alpha:1.0)))

View file

@ -904,17 +904,17 @@ impl ThemeBuilder {
} }
let p = palette.as_mut(); let p = palette.as_mut();
p.neutral_0 = neutral_steps_arr[0]; p.control_0 = neutral_steps_arr[0];
p.neutral_1 = neutral_steps_arr[1]; p.control_1 = neutral_steps_arr[1];
p.neutral_2 = neutral_steps_arr[2]; p.control_2 = neutral_steps_arr[2];
p.neutral_3 = neutral_steps_arr[3]; p.control_3 = neutral_steps_arr[3];
p.neutral_4 = neutral_steps_arr[4]; p.control_4 = neutral_steps_arr[4];
p.neutral_5 = neutral_steps_arr[5]; p.control_5 = neutral_steps_arr[5];
p.neutral_6 = neutral_steps_arr[6]; p.control_6 = neutral_steps_arr[6];
p.neutral_7 = neutral_steps_arr[7]; p.control_7 = neutral_steps_arr[7];
p.neutral_8 = neutral_steps_arr[8]; p.control_8 = neutral_steps_arr[8];
p.neutral_9 = neutral_steps_arr[9]; p.control_9 = neutral_steps_arr[9];
p.neutral_10 = neutral_steps_arr[10]; p.control_10 = neutral_steps_arr[10];
} }
let p_ref = palette.as_ref(); let p_ref = palette.as_ref();
@ -934,24 +934,24 @@ impl ThemeBuilder {
let bg_index = color_index(bg, step_array.len()); let bg_index = color_index(bg, step_array.len());
let mut component_hovered_overlay = if bg_index < 91 { let mut component_hovered_overlay = if bg_index < 91 {
p_ref.neutral_10 p_ref.control_10
} else { } else {
p_ref.neutral_0 p_ref.control_0
}; };
component_hovered_overlay.alpha = 0.1; component_hovered_overlay.alpha = 0.1;
let mut component_pressed_overlay = component_hovered_overlay; let mut component_pressed_overlay = component_hovered_overlay;
component_pressed_overlay.alpha = 0.2; component_pressed_overlay.alpha = 0.2;
// Standard button background is neutral 7 with 25% opacity // Standard button background is control 7 with 25% opacity
let button_bg = { let button_bg = {
let mut color = p_ref.neutral_7; let mut color = p_ref.control_7;
color.alpha = 0.25; color.alpha = 0.25;
color color
}; };
let (mut button_hovered_overlay, mut button_pressed_overlay) = let (mut button_hovered_overlay, mut button_pressed_overlay) =
(p_ref.neutral_5, p_ref.neutral_2); (p_ref.control_5, p_ref.control_2);
button_hovered_overlay.alpha = 0.2; button_hovered_overlay.alpha = 0.2;
button_pressed_overlay.alpha = 0.5; button_pressed_overlay.alpha = 0.5;
@ -959,7 +959,7 @@ impl ThemeBuilder {
let on_bg_component = get_text( let on_bg_component = get_text(
color_index(bg_component, step_array.len()), color_index(bg_component, step_array.len()),
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
); );
@ -967,17 +967,17 @@ impl ThemeBuilder {
let container_bg = if let Some(primary_container_bg_color) = primary_container_bg { let container_bg = if let Some(primary_container_bg_color) = primary_container_bg {
primary_container_bg_color primary_container_bg_color
} else { } else {
get_surface_color(bg_index, 5, &step_array, is_dark, &p_ref.neutral_1) get_surface_color(bg_index, 5, &step_array, is_dark, &p_ref.control_1)
}; };
let base_index: usize = color_index(container_bg, step_array.len()); let base_index: usize = color_index(container_bg, step_array.len());
let component_base = let component_base =
get_surface_color(base_index, 6, &step_array, is_dark, &p_ref.neutral_3); get_surface_color(base_index, 6, &step_array, is_dark, &p_ref.control_3);
component_hovered_overlay = if base_index < 91 { component_hovered_overlay = if base_index < 91 {
p_ref.neutral_10 p_ref.control_10
} else { } else {
p_ref.neutral_0 p_ref.control_0
}; };
component_hovered_overlay.alpha = 0.1; component_hovered_overlay.alpha = 0.1;
@ -991,22 +991,22 @@ impl ThemeBuilder {
get_text( get_text(
color_index(component_base, step_array.len()), color_index(component_base, step_array.len()),
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
), ),
component_hovered_overlay, component_hovered_overlay,
component_pressed_overlay, component_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
container_bg, container_bg,
get_text( get_text(
base_index, base_index,
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
), ),
get_small_widget_color(base_index, 5, &neutral_steps, &p_ref.neutral_6), get_small_widget_color(base_index, 5, &neutral_steps, &p_ref.control_6),
is_high_contrast, is_high_contrast,
); );
@ -1072,16 +1072,16 @@ impl ThemeBuilder {
component_hovered_overlay, component_hovered_overlay,
component_pressed_overlay, component_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
bg, bg,
get_text( get_text(
bg_index, bg_index,
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
), ),
get_small_widget_color(bg_index, 5, &neutral_steps, &p_ref.neutral_6), get_small_widget_color(bg_index, 5, &neutral_steps, &p_ref.control_6),
is_high_contrast, is_high_contrast,
), ),
primary, primary,
@ -1089,17 +1089,17 @@ impl ThemeBuilder {
let container_bg = if let Some(secondary_container_bg) = secondary_container_bg { let container_bg = if let Some(secondary_container_bg) = secondary_container_bg {
secondary_container_bg secondary_container_bg
} else { } else {
get_surface_color(bg_index, 10, &step_array, is_dark, &p_ref.neutral_2) get_surface_color(bg_index, 10, &step_array, is_dark, &p_ref.control_2)
}; };
let base_index = color_index(container_bg, step_array.len()); let base_index = color_index(container_bg, step_array.len());
let secondary_component = let secondary_component =
get_surface_color(base_index, 3, &step_array, is_dark, &p_ref.neutral_4); get_surface_color(base_index, 3, &step_array, is_dark, &p_ref.control_4);
component_hovered_overlay = if base_index < 91 { component_hovered_overlay = if base_index < 91 {
p_ref.neutral_10 p_ref.control_10
} else { } else {
p_ref.neutral_0 p_ref.control_0
}; };
component_hovered_overlay.alpha = 0.1; component_hovered_overlay.alpha = 0.1;
@ -1113,36 +1113,36 @@ impl ThemeBuilder {
get_text( get_text(
color_index(secondary_component, step_array.len()), color_index(secondary_component, step_array.len()),
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
), ),
component_hovered_overlay, component_hovered_overlay,
component_pressed_overlay, component_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
container_bg, container_bg,
get_text( get_text(
base_index, base_index,
&step_array, &step_array,
&p_ref.neutral_8, &p_ref.control_8,
text_steps_array.as_deref(), text_steps_array.as_deref(),
), ),
get_small_widget_color(base_index, 5, &neutral_steps, &p_ref.neutral_6), get_small_widget_color(base_index, 5, &neutral_steps, &p_ref.control_6),
is_high_contrast, is_high_contrast,
) )
}, },
accent: Component::colored_component( accent: Component::colored_component(
accent, accent,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
), ),
accent_button: Component::colored_button( accent_button: Component::colored_button(
accent, accent,
p_ref.neutral_1, p_ref.control_1,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
@ -1154,19 +1154,19 @@ impl ThemeBuilder {
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
destructive: Component::colored_component( destructive: Component::colored_component(
destructive, destructive,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
), ),
destructive_button: Component::colored_button( destructive_button: Component::colored_button(
destructive, destructive,
p_ref.neutral_1, p_ref.control_1,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
@ -1174,11 +1174,11 @@ impl ThemeBuilder {
icon_button: Component::component( icon_button: Component::component(
Srgba::new(0.0, 0.0, 0.0, 0.0), Srgba::new(0.0, 0.0, 0.0, 0.0),
accent, accent,
p_ref.neutral_8, p_ref.control_8,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
link_button: { link_button: {
let mut component = Component::component( let mut component = Component::component(
@ -1188,7 +1188,7 @@ impl ThemeBuilder {
Srgba::new(0.0, 0.0, 0.0, 0.0), Srgba::new(0.0, 0.0, 0.0, 0.0),
Srgba::new(0.0, 0.0, 0.0, 0.0), Srgba::new(0.0, 0.0, 0.0, 0.0),
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
); );
let mut on_50 = component.on; let mut on_50 = component.on;
@ -1199,15 +1199,15 @@ impl ThemeBuilder {
}, },
success: Component::colored_component( success: Component::colored_component(
success, success,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
), ),
success_button: Component::colored_button( success_button: Component::colored_button(
success, success,
p_ref.neutral_1, p_ref.control_1,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
@ -1219,19 +1219,19 @@ impl ThemeBuilder {
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
is_high_contrast, is_high_contrast,
p_ref.neutral_8, p_ref.control_8,
), ),
warning: Component::colored_component( warning: Component::colored_component(
warning, warning,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,
), ),
warning_button: Component::colored_button( warning_button: Component::colored_button(
warning, warning,
p_ref.neutral_10, p_ref.control_10,
p_ref.neutral_0, p_ref.control_0,
accent, accent,
button_hovered_overlay, button_hovered_overlay,
button_pressed_overlay, button_pressed_overlay,