use embedded_graphics::prelude::*;
#[derive(Debug, Clone)]
pub struct Theme<C: PixelColor> {
pub background: C,
pub primary: C,
pub secondary: C,
pub text: C,
pub grid: C,
pub accent: C,
pub success: C,
pub warning: C,
pub error: C,
}
impl<C: PixelColor> Theme<C>
where
C: From<embedded_graphics::pixelcolor::Rgb565>,
{
pub fn light() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::WHITE.into(),
primary: embedded_graphics::pixelcolor::Rgb565::new(59 >> 3, 130 >> 2, 246 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(239 >> 3, 68 >> 2, 68 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(17 >> 3, 24 >> 2, 39 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(229 >> 3, 231 >> 2, 235 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(147 >> 3, 51 >> 2, 234 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(34 >> 3, 197 >> 2, 94 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(245 >> 3, 158 >> 2, 11 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(239 >> 3, 68 >> 2, 68 >> 3).into(), }
}
pub fn dark() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(17 >> 3, 24 >> 2, 39 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(96 >> 3, 165 >> 2, 250 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(251 >> 3, 113 >> 2, 133 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(248 >> 3, 250 >> 2, 252 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(55 >> 3, 65 >> 2, 81 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(168 >> 3, 85 >> 2, 247 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(52 >> 3, 211 >> 2, 153 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(251 >> 3, 191 >> 2, 36 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(248 >> 3, 113 >> 2, 113 >> 3).into(), }
}
pub fn vibrant() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 251 >> 2, 235 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(236 >> 3, 72 >> 2, 153 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(14 >> 3, 165 >> 2, 233 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(30 >> 3, 41 >> 2, 59 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(254 >> 3, 215 >> 2, 170 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(168 >> 3, 85 >> 2, 247 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(16 >> 3, 185 >> 2, 129 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(245 >> 3, 101 >> 2, 101 >> 3)
.into(), error: embedded_graphics::pixelcolor::Rgb565::new(220 >> 3, 38 >> 2, 127 >> 3).into(), }
}
pub fn pastel() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(253 >> 3, 253 >> 2, 253 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(147 >> 3, 197 >> 2, 253 >> 3)
.into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(252 >> 3, 165 >> 2, 165 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(75 >> 3, 85 >> 2, 99 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(243 >> 3, 244 >> 2, 246 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(196 >> 3, 181 >> 2, 253 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(167 >> 3, 243 >> 2, 208 >> 3)
.into(), warning: embedded_graphics::pixelcolor::Rgb565::new(254 >> 3, 215 >> 2, 170 >> 3)
.into(), error: embedded_graphics::pixelcolor::Rgb565::new(254 >> 3, 202 >> 2, 202 >> 3).into(), }
}
pub fn nature() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(249 >> 3, 250 >> 2, 251 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(34 >> 3, 139 >> 2, 34 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(139 >> 3, 69 >> 2, 19 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(41 >> 3, 37 >> 2, 36 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(229 >> 3, 229 >> 2, 229 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(107 >> 3, 142 >> 2, 35 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(72 >> 3, 187 >> 2, 120 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(218 >> 3, 165 >> 2, 32 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(178 >> 3, 34 >> 2, 34 >> 3).into(), }
}
pub fn ocean() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(240 >> 3, 249 >> 2, 255 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(30 >> 3, 144 >> 2, 255 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(0 >> 3, 191 >> 2, 255 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(25 >> 3, 25 >> 2, 112 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(230 >> 3, 230 >> 2, 250 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(72 >> 3, 209 >> 2, 204 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(32 >> 3, 178 >> 2, 170 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 215 >> 2, 0 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(220 >> 3, 20 >> 2, 60 >> 3).into(), }
}
pub fn sunset() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 248 >> 2, 240 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 99 >> 2, 71 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 165 >> 2, 0 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(139 >> 3, 69 >> 2, 19 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 228 >> 2, 196 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 20 >> 2, 147 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 215 >> 2, 0 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 140 >> 2, 0 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(178 >> 3, 34 >> 2, 34 >> 3).into(), }
}
pub fn cyberpunk() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(13 >> 3, 13 >> 2, 13 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(0 >> 3, 255 >> 2, 127 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 0 >> 2, 255 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(0 >> 3, 255 >> 2, 255 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(64 >> 3, 64 >> 2, 64 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 255 >> 2, 0 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(50 >> 3, 205 >> 2, 50 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 165 >> 2, 0 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 69 >> 2, 0 >> 3).into(), }
}
pub fn minimal() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(250 >> 3, 250 >> 2, 250 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(55 >> 3, 65 >> 2, 81 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(107 >> 3, 114 >> 2, 128 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(31 >> 3, 41 >> 2, 55 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(241 >> 3, 245 >> 2, 249 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(99 >> 3, 102 >> 2, 241 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(16 >> 3, 185 >> 2, 129 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(245 >> 3, 158 >> 2, 11 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(239 >> 3, 68 >> 2, 68 >> 3).into(), }
}
pub fn retro() -> Self {
Self {
background: embedded_graphics::pixelcolor::Rgb565::new(245 >> 3, 245 >> 2, 220 >> 3)
.into(), primary: embedded_graphics::pixelcolor::Rgb565::new(205 >> 3, 92 >> 2, 92 >> 3).into(), secondary: embedded_graphics::pixelcolor::Rgb565::new(218 >> 3, 165 >> 2, 32 >> 3)
.into(), text: embedded_graphics::pixelcolor::Rgb565::new(139 >> 3, 69 >> 2, 19 >> 3).into(), grid: embedded_graphics::pixelcolor::Rgb565::new(222 >> 3, 184 >> 2, 135 >> 3).into(), accent: embedded_graphics::pixelcolor::Rgb565::new(160 >> 3, 82 >> 2, 45 >> 3).into(), success: embedded_graphics::pixelcolor::Rgb565::new(107 >> 3, 142 >> 2, 35 >> 3).into(), warning: embedded_graphics::pixelcolor::Rgb565::new(255 >> 3, 140 >> 2, 0 >> 3).into(), error: embedded_graphics::pixelcolor::Rgb565::new(178 >> 3, 34 >> 2, 34 >> 3).into(), }
}
}