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
-
colour
The color represented as a
Colour
type from gleam_community_colour.
Utilizes theto_colour
function internally.
Attempts to extract the color value from theResult(Colour, Nil)
type,
falling back to black if an error occurs.
For more information, refer to thegleam_community_colour
. -
colour_result
The color result of the
colour.from_rgb
.
For more information, refer to thegleam_community_colour
.
-
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.