mirror of
https://github.com/catppuccin/gleam.git
synced 2026-01-09 05:40:58 +08:00
catppuccin
⭐️ Soothing pastel library for Gleam
gleam add catppuccin
import catppuccin
import gleam/io
import gleam_community/colour
pub fn main() {
catppuccin.frappe()
|> catppuccin.flavor_name
|> io.debug
// "Frappé"
catppuccin.macchiato()
|> catppuccin.subtext1
|> catppuccin.color_name
|> io.debug
// "Subtext 1"
catppuccin.mocha()
|> catppuccin.mauve
|> catppuccin.to_color
|> colour.to_rgba
|> io.debug
// #(0.796078431372549, 0.6509803921568628, 0.9686274509803922, 1.0)
catppuccin.latte()
|> catppuccin.mauve
|> catppuccin.to_color
|> colour.to_hsla
|> io.debug
// #(0.739010989010989, 0.8504672897196262, 0.5803921568627451, 1.0)
}
Further documentation can be found at https://hexdocs.pm/catppuccin.
Development
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell