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
Helpers
Helper functions
Premix pallettes
These are modules within gleamy_lights allowing you to use a modifier with no need to enter the colour codes.
Constants
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.