From 3513a4ad5612b6659ab037b0c1b0c22e5cabc1f5 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sat, 3 Feb 2024 23:49:56 +0530 Subject: add catppuccin themes --- style/src/theme/palette.rs | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'style/src/theme/palette.rs') diff --git a/style/src/theme/palette.rs b/style/src/theme/palette.rs index d5a1a5d9..cb5fc048 100644 --- a/style/src/theme/palette.rs +++ b/style/src/theme/palette.rs @@ -133,6 +133,50 @@ impl Palette { success: color!(0x98971a), // dark GREEN_2 danger: color!(0xcc241d), // dark RED_1 }; + + /// The built-in Catppuccin Latte variant of a [`Palette`]. + /// + /// Source: https://github.com/catppuccin/catppuccin + pub const CATPPUCCIN_LATTE: Self = Self { + background: color!(0xeff1f5), // Base + text: color!(0x4c4f69), // Text + primary: color!(0x1e66f5), // Blue + success: color!(0x40a02b), // Green + danger: color!(0xd20f39), // Red + }; + + /// The built-in Catppuccin Frappé variant of a [`Palette`]. + /// + /// Source: https://github.com/catppuccin/catppuccin + pub const CATPPUCCIN_FRAPPE: Self = Self { + background: color!(0x303446), // Base + text: color!(0xc6d0f5), // Text + primary: color!(0x8caaee), // Blue + success: color!(0xa6d189), // Green + danger: color!(0xe78284), // Red + }; + + /// The built-in Catppuccin Macchiato variant of a [`Palette`]. + /// + /// Source: https://github.com/catppuccin/catppuccin + pub const CATPPUCCIN_MACCHIATO: Self = Self { + background: color!(0x24273a), // Base + text: color!(0xcad3f5), // Text + primary: color!(0x8aadf4), // Blue + success: color!(0xa6da95), // Green + danger: color!(0xed8796), // Red + }; + + /// The built-in Catppuccin Mocha variant of a [`Palette`]. + /// + /// Source: https://github.com/catppuccin/catppuccin + pub const CATPPUCCIN_MOCHA: Self = Self { + background: color!(0x1e1e2e), // Base + text: color!(0xcdd6f4), // Text + primary: color!(0x89b4fa), // Blue + success: color!(0xa6e3a1), // Green + danger: color!(0xf38ba8), // Red + }; } /// An extended set of colors generated from a [`Palette`]. @@ -184,6 +228,22 @@ pub static EXTENDED_GRUVBOX_LIGHT: Lazy = pub static EXTENDED_GRUVBOX_DARK: Lazy = Lazy::new(|| Extended::generate(Palette::GRUVBOX_DARK)); +/// The built-in Catppuccin Latte variant of an [`Extended`] palette. +pub static EXTENDED_CATPPUCCIN_LATTE: Lazy = + Lazy::new(|| Extended::generate(Palette::CATPPUCCIN_LATTE)); + +/// The built-in Catppuccin Frappé variant of an [`Extended`] palette. +pub static EXTENDED_CATPPUCCIN_FRAPPE: Lazy = + Lazy::new(|| Extended::generate(Palette::CATPPUCCIN_FRAPPE)); + +/// The built-in Catppuccin Macchiato variant of an [`Extended`] palette. +pub static EXTENDED_CATPPUCCIN_MACCHIATO: Lazy = + Lazy::new(|| Extended::generate(Palette::CATPPUCCIN_MACCHIATO)); + +/// The built-in Catppuccin Mocha variant of an [`Extended`] palette. +pub static EXTENDED_CATPPUCCIN_MOCHA: Lazy = + Lazy::new(|| Extended::generate(Palette::CATPPUCCIN_MOCHA)); + impl Extended { /// Generates an [`Extended`] palette from a simple [`Palette`]. pub fn generate(palette: Palette) -> Self { -- cgit