beamtea_color (beamtea v0.1.2)

View Source

A small, electric colour palette inspired by Charmbracelet's Charm brand (lipgloss/bubbletea). Names map to xterm-256 colour indices so they render on any modern terminal.

     beamtea_term:paint([38, 5, beamtea_color:c(hotpink)], "hi")
     beamtea_color:fg(purple, "hi")     %% shorthand for the above

Summary

Functions

Paint Text with a named background colour.

The xterm-256 index for a named colour.

Paint Text with a named foreground colour.

All known colour names.

Types

name/0

-type name() ::
          charmple | purple | indigo | violet | lavender | hotpink | pink | magenta | fuchsia | cyan |
          aqua | teal | blue | sky | green | lime | mint | yellow | gold | orange | coral | red |
          white | cloud | gray | dim | charcoal.

Functions

bg(Name, Text)

-spec bg(name(), iodata()) -> iodata().

Paint Text with a named background colour.

c(_)

-spec c(name()) -> 0..255.

The xterm-256 index for a named colour.

fg(Name, Text)

-spec fg(name(), iodata()) -> iodata().

Paint Text with a named foreground colour.

names()

-spec names() -> [name()].

All known colour names.