catppuccin
⭐️ Soothing pastel library for Gleam
Types
pub type CatppuccinColor {
CatppuccinColor(
name: String,
order: Int,
accent: Bool,
hex: Hex,
rgb: RGB,
hsl: HSL,
colour: Colour,
)
}
Constructors
-
CatppuccinColor( name: String, order: Int, accent: Bool, hex: Hex, rgb: RGB, hsl: HSL, colour: Colour, )
Arguments
-
colour
Get the color as
Colour
from gleam_community_colour https://hexdocs.pm/gleam_community_colour/gleam_community/colour.html#Colour
-
pub type HSL {
HSL(h: Float, s: Float, l: Float)
}
Constructors
-
HSL(h: Float, s: Float, l: Float)
Functions
pub fn to_community_colour(
r r: Int,
g g: Int,
b b: Int,
) -> Colour
Converts rgb values to a Colour
.
returns white as a fallback color, if the conversion fails.
this is used by the lib (probably should’ve been a private function)