lustre/ui/colour
Types
pub type ColourPalette {
ColourPalette(
base: ColourScale,
primary: ColourScale,
secondary: ColourScale,
success: ColourScale,
warning: ColourScale,
danger: ColourScale,
)
}
Constructors
-
ColourPalette( base: ColourScale, primary: ColourScale, secondary: ColourScale, success: ColourScale, warning: ColourScale, danger: ColourScale, )
pub type ColourScale {
ColourScale(
bg: Colour,
bg_subtle: Colour,
tint: Colour,
tint_subtle: Colour,
tint_strong: Colour,
accent: Colour,
accent_subtle: Colour,
accent_strong: Colour,
solid: Colour,
solid_subtle: Colour,
solid_strong: Colour,
solid_text: Colour,
text: Colour,
text_subtle: Colour,
)
}
Constructors
-
ColourScale( bg: Colour, bg_subtle: Colour, tint: Colour, tint_subtle: Colour, tint_strong: Colour, accent: Colour, accent_subtle: Colour, accent_strong: Colour, solid: Colour, solid_subtle: Colour, solid_strong: Colour, solid_text: Colour, text: Colour, text_subtle: Colour, )
Functions
pub fn amber_dark() -> ColourScale
pub fn bronze_dark() -> ColourScale
pub fn brown_dark() -> ColourScale
pub fn contrast_ratio(a: Colour, b: Colour) -> Float
pub fn crimson_dark() -> ColourScale
pub fn default_dark_palette() -> ColourPalette
Lustre UI’s default dark colour palette. You can use this if you don’t have any strict requirements around colours and you want to start building your app straight away.
This is the dark mode palette used by the default theme, but it is not required to only use this palette for dark mode!
pub fn default_light_palette() -> ColourPalette
Lustre UI’s default light colour palette. You can use this if you don’t have any strict requirements around colours and you want to start building your app straight away.
This is the light mode palette used by the default theme.
pub fn encode_palette(palette: ColourPalette) -> Json
pub fn grass_dark() -> ColourScale
pub fn green_dark() -> ColourScale
pub fn indigo_dark() -> ColourScale
pub fn mauve_dark() -> ColourScale
pub fn maximum_contrast(
base: Colour,
options: List(Colour),
) -> Colour
pub fn olive_dark() -> ColourScale
pub fn orange_dark() -> ColourScale
pub fn palette_decoder(
json: Dynamic,
) -> Result(ColourPalette, List(DecodeError))
pub fn purple_dark() -> ColourScale
pub fn slate_dark() -> ColourScale
pub fn tomato_dark() -> ColourScale
pub fn violet_dark() -> ColourScale
pub fn yellow_dark() -> ColourScale