From 4503e2ba7e1c124798f36849d0f64a31b2e5c9a5 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 4 Feb 2024 00:07:16 +0530 Subject: add tokyo night themes and palettes Source: https://github.com/enkia/tokyo-night-vscode-theme --- style/src/theme/palette.rs | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'style/src/theme/palette.rs') diff --git a/style/src/theme/palette.rs b/style/src/theme/palette.rs index cb5fc048..f2d1567e 100644 --- a/style/src/theme/palette.rs +++ b/style/src/theme/palette.rs @@ -177,6 +177,39 @@ impl Palette { success: color!(0xa6e3a1), // Green danger: color!(0xf38ba8), // Red }; + + /// The built-in Tokyo Night variant of a [`Palette`]. + /// + /// Source: https://github.com/enkia/tokyo-night-vscode-theme + pub const TOKYO_NIGHT: Self = Self { + background: color!(0x1a1b26), // Background (Night) + text: color!(0x9aa5ce), // Text + primary: color!(0x2ac3de), // Blue + success: color!(0x9ece6a), // Green + danger: color!(0xf7768e), // Red + }; + + /// The built-in Tokyo Night Storm variant of a [`Palette`]. + /// + /// Source: https://github.com/enkia/tokyo-night-vscode-theme + pub const TOKYO_NIGHT_STORM: Self = Self { + background: color!(0x24283b), // Background (Storm) + text: color!(0x9aa5ce), // Text + primary: color!(0x2ac3de), // Blue + success: color!(0x9ece6a), // Green + danger: color!(0xf7768e), // Red + }; + + /// The built-in Tokyo Night Light variant of a [`Palette`]. + /// + /// Source: https://github.com/enkia/tokyo-night-vscode-theme + pub const TOKYO_NIGHT_LIGHT: Self = Self { + background: color!(0xd5d6db), // Background + text: color!(0x565a6e), // Text + primary: color!(0x166775), // Blue + success: color!(0x485e30), // Green + danger: color!(0x8c4351), // Red + }; } /// An extended set of colors generated from a [`Palette`]. @@ -244,6 +277,18 @@ pub static EXTENDED_CATPPUCCIN_MACCHIATO: Lazy = pub static EXTENDED_CATPPUCCIN_MOCHA: Lazy = Lazy::new(|| Extended::generate(Palette::CATPPUCCIN_MOCHA)); +/// The built-in Tokyo Night variant of an [`Extended`] palette. +pub static EXTENDED_TOKYO_NIGHT: Lazy = + Lazy::new(|| Extended::generate(Palette::TOKYO_NIGHT)); + +/// The built-in Tokyo Night Storm variant of an [`Extended`] palette. +pub static EXTENDED_TOKYO_NIGHT_STORM: Lazy = + Lazy::new(|| Extended::generate(Palette::TOKYO_NIGHT_STORM)); + +/// The built-in Tokyo Night variant of an [`Extended`] palette. +pub static EXTENDED_TOKYO_NIGHT_LIGHT: Lazy = + Lazy::new(|| Extended::generate(Palette::TOKYO_NIGHT_LIGHT)); + impl Extended { /// Generates an [`Extended`] palette from a simple [`Palette`]. pub fn generate(palette: Palette) -> Self { -- cgit