catppuccin

⭐️ Soothing pastel library for Gleam

Types

pub type CatppuccinColor {
  CatppuccinColor(
    name: String,
    order: Int,
    accent: Bool,
    colour: colour.Colour,
    colour_result: Result(colour.Colour, Nil),
  )
}

Constructors

  • CatppuccinColor(
      name: String,
      order: Int,
      accent: Bool,
      colour: colour.Colour,
      colour_result: Result(colour.Colour, Nil),
    )

    Arguments

Functions

pub fn from_rgb(
  r r: Int,
  g g: Int,
  b b: Int,
) -> Result(Colour, Nil)

This is a wrapper for colour.from_rgb.
converting RGB values represented as Int to Float with the appropriate conversion.
It is utilized internally by the library and ideally should have been a private function.

pub fn to_colour(r r: Int, g g: Int, b b: Int) -> Colour

Converts rgb values to a Colour.
returns black as a fallback color, if the conversion fails.
It is utilized internally by the library and ideally should have been a private function.

Search Document