Add Arctica SAO UI theme

This commit is contained in:
mars 2022-11-19 13:06:36 -07:00
parent 4b126ed2cf
commit 046aede0fa
1 changed files with 75 additions and 23 deletions

View File

@ -18,10 +18,16 @@ pub struct Palette {
pub white: Color,
}
/// The common base color alpha shared between all themes.
pub const BASE_ALPHA: u8 = 0xc0;
/// The common base_hover color alpha shared between all themes.
pub const BASE_HOVER_ALPHA: u8 = 0xe0;
/// Sword Art Online color palette.
pub const SAO_PALETTE: Palette = Palette {
base: Color::WHITE.with_alpha(0xc0),
base_hover: Color::WHITE.with_alpha(0xe0),
base: Color::WHITE.with_alpha(BASE_ALPHA),
base_hover: Color::WHITE.with_alpha(BASE_HOVER_ALPHA),
base_active: Color::YELLOW,
surface: Color::WHITE,
overlay: Color::WHITE,
@ -38,38 +44,84 @@ pub const SAO_PALETTE: Palette = Palette {
/// Rose Pine color palette.
pub const ROSE_PINE_PALETTE: Palette = Palette {
base: Color(0x191724c0),
base_hover: Color(0x21202ee0), // Highlight Low
base_active: Color(0x403d52ff), // Highlight Med
base: Color(0x191724ff).with_alpha(BASE_ALPHA),
base_hover: Color(0x21202ee0).with_alpha(BASE_HOVER_ALPHA), // Highlight Low
base_active: Color(0x403d52ff), // Highlight Med
surface: Color(0x1f1d2eff),
overlay: Color(0x26233aff),
text: Color(0xe0def4ff),
black: Color(0x6e6a86ff), // Muted
red: Color(0xeb6f92ff), // Love
green: Color(0x7fb59fff), // ??? (not in Rose Pine?)
yellow: Color(0xf6c177ff), // Gold
blue: Color(0x31748fff), // Pine
black: Color(0x6e6a86ff), // Muted
red: Color(0xeb6f92ff), // Love
green: Color(0x7fb59fff), // ??? (not in Rose Pine?)
yellow: Color(0xf6c177ff), // Gold
blue: Color(0x31748fff), // Pine
magenta: Color(0xc4a7e7ff), // Iris
cyan: Color(0x9ccfd8ff), // Foam
white: Color(0xe0def4ff), // Text
cyan: Color(0x9ccfd8ff), // Foam
white: Color(0xe0def4ff), // Text
};
/// Rose Pine Moon color palette.
pub const ROSE_PINE_MOON_PALETTE: Palette = Palette {
base: Color(0x232136c0),
base_hover: Color(0x2a283ee0), // Highlight Low
base_active: Color(0x44415aff), // Highlight Med
base: Color(0x232136ff).with_alpha(BASE_ALPHA),
base_hover: Color(0x2a283eff).with_alpha(BASE_HOVER_ALPHA), // Highlight Low
base_active: Color(0x44415aff), // Highlight Med
surface: Color(0x2a273fff),
overlay: Color(0x393552),
text: Color(0xe0def4ff),
black: Color(0x6e6a86ff), // Muted
red: Color(0xeb6f92ff), // Love
green: Color(0x7fb59fff), // ??? (not in Rose Pine?)
yellow: Color(0xf6c177ff), // Gold
blue: Color(0x3e8fb0ff), // Pine
black: Color(0x6e6a86ff), // Muted
red: Color(0xeb6f92ff), // Love
green: Color(0x7fb59fff), // ??? (not in Rose Pine?)
yellow: Color(0xf6c177ff), // Gold
blue: Color(0x3e8fb0ff), // Pine
magenta: Color(0xc4a7e7ff), // Iris
cyan: Color(0x9ccfd8ff), // Foam
white: Color(0xe0def4ff), // Text
cyan: Color(0x9ccfd8ff), // Foam
white: Color(0xe0def4ff), // Text
};
/// [Arctica](https://github.com/sashakoshka/arctica) indexable color theme.
pub const ARCTICA: [Color; 24] = [
Color(0x242933ff),
Color(0x2e3440ff),
Color(0x3b4252ff),
Color(0x4c566aff),
Color(0xeceff4ff),
Color(0xd8dee9ff),
Color(0xc2c9d6ff),
Color(0xaeb7c6ff),
Color(0xa8555dff),
Color(0xb77763ff),
Color(0xcdb179ff),
Color(0x8ba277ff),
Color(0x769b9bff),
Color(0x72a1aeff),
Color(0x5e81acff),
Color(0x92738cff),
Color(0xbf616aff),
Color(0xd08770ff),
Color(0xebcb8bff),
Color(0xa3be8cff),
Color(0x8fbcbbff),
Color(0x88c0d0ff),
Color(0x81a1c1ff),
Color(0xb48eadff),
];
/// [Arctica](https://github.com/sashakoshka/arctica) color palette.
pub const ARCTICA_PALETTE: Palette = Palette {
base: ARCTICA[0].with_alpha(BASE_ALPHA),
base_hover: ARCTICA[1].with_alpha(BASE_HOVER_ALPHA),
base_active: ARCTICA[13],
surface: ARCTICA[2],
overlay: ARCTICA[3],
text: ARCTICA[5],
black: ARCTICA[3],
red: ARCTICA[8],
green: ARCTICA[11],
yellow: ARCTICA[10],
blue: ARCTICA[14],
magenta: ARCTICA[15],
cyan: ARCTICA[13],
white: ARCTICA[7],
};
/// Common measurements for widget shapes.
@ -85,7 +137,7 @@ pub struct Theme {
/// The global theme.
pub const THEME: Theme = Theme {
palette: ROSE_PINE_MOON_PALETTE,
palette: ARCTICA_PALETTE,
metrics: Metrics {
surface_rounding: 5.0,
},