summaryrefslogtreecommitdiffstats
path: root/style/src/theme
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-19 20:41:52 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-19 20:41:52 +0100
commit1781068e1c3a65551db1e832fdbaddba99124051 (patch)
tree60e0b3854cc0541712572fbb0e56f14435951ea9 /style/src/theme
parent41dec5bd203ff5b1574a33a17d5f7358ae1beea2 (diff)
parent7ae7fcb89855002519bab752fd3686106ce448db (diff)
downloadiced-1781068e1c3a65551db1e832fdbaddba99124051.tar.gz
iced-1781068e1c3a65551db1e832fdbaddba99124051.tar.bz2
iced-1781068e1c3a65551db1e832fdbaddba99124051.zip
Merge branch 'master' into remove-vertex-indexing
Diffstat (limited to 'style/src/theme')
-rw-r--r--style/src/theme/palette.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/style/src/theme/palette.rs b/style/src/theme/palette.rs
index aaeb799d..76977a29 100644
--- a/style/src/theme/palette.rs
+++ b/style/src/theme/palette.rs
@@ -82,6 +82,8 @@ pub struct Extended {
pub success: Success,
/// The set of danger colors.
pub danger: Danger,
+ /// Whether the palette is dark or not.
+ pub is_dark: bool,
}
/// The built-in light variant of an [`Extended`] palette.
@@ -113,6 +115,7 @@ impl Extended {
palette.background,
palette.text,
),
+ is_dark: is_dark(palette.background),
}
}
}