gleamy_lights

gleamy_lights

Modifiers

Modifiers are the functions that modify a string to add a colour to it. Premixes use these, and so are not counted as modifiers.

Among these are:

Background
Foreground

Premix pallettes

These are modules within gleamy_lights allowing you to use a modifier with no need to enter the colour codes.

Constants

pub const by_color: fn(String, Colour) -> String

Alias for by_colour

pub const by_color_bg: fn(String, Colour) -> String

Alias for by_colour

pub const by_hexcolor: fn(String, String) -> String

Alias for by_hexcolour

pub const by_hexcolor_bg: fn(String, String) -> String

Alias for by_hexcolour_bg

Functions

pub fn by_colour(msg: String, clr: Colour) -> String

By Colour

Given a string and a Colour, return the message with the colour applied.

pub fn by_colour_bg(msg: String, clr: Colour) -> String

By Colour

Given a string and a Colour, return the message with the background colour applied.

pub fn by_hexcolour(msg: String, hexcolour: String) -> String

By Hex colour

Given a string and a hex colour, return the message with the colour applied.

Will return black if the hex colour is invalid.

pub fn by_hexcolour_bg(msg: String, hexcolour: String) -> String

By Hexcolour - Background

Given a string and a hex colour, return the message with the background color applied. Will return black if the hex colour is invalid.

pub fn by_rgb(msg: String, r: Int, g: Int, b: Int) -> String

By RGB

Given a string and an RGB color, return the message with the color applied. The RGB values should be between 0 and 255.

pub fn by_rgb_bg(msg: String, r: Int, g: Int, b: Int) -> String

By RGB - Background

Given a string and an RGB colour, return the message with the background colour applied. The RGB values should be between 0 and 255.

Search Document