fix(theme): light theme surface lightness is inverted
In Figma, themes with background lightness above 88 have their surfaces darkened; whereas below 88 have their surfaces lightened. This fixes custom light theme surfaces being unusually dark against a darker background.
This commit is contained in:
parent
9ffb87d21f
commit
68becf32c2
1 changed files with 3 additions and 3 deletions
|
|
@ -40,9 +40,9 @@ pub fn get_surface_color(
|
|||
fallback: &Srgba,
|
||||
) -> Srgba {
|
||||
assert!(step_array.len() == 100);
|
||||
if !is_dark && base_index >= 88 {
|
||||
is_dark = true;
|
||||
}
|
||||
|
||||
is_dark = !is_dark && base_index < 88;
|
||||
|
||||
get_index(base_index, steps, step_array.len(), is_dark)
|
||||
.and_then(|i| step_array.get(i).cloned())
|
||||
.unwrap_or_else(|| fallback.to_owned())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue