summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/theme.rs')
-rw-r--r--style/src/theme.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index e3c0efc6..1ddf97c3 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -31,12 +31,14 @@ impl Theme {
impl Default for Theme {
fn default() -> Self {
- Self::Light
+ Self::Dark
}
}
pub trait Definition {
fn background_color(&self) -> Color;
+
+ fn text_color(&self) -> Color;
}
impl Definition for Theme {
@@ -45,6 +47,12 @@ impl Definition for Theme {
palette.background.base
}
+
+ fn text_color(&self) -> Color {
+ let palette = self.extended_palette();
+
+ palette.background.text
+ }
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]