View Source Owl.TrueColor (Owl v0.12.0)

A module for true color escape sequences

Example

"Hello"
|> Owl.Data.tag([Owl.TrueColor.color(1, 244, 74), Owl.TrueColor.color_background(133, 48, 100)])
|> Owl.IO.puts()

Summary

Functions

Returns a true color foreground escape sequence for the given RGB values.

Returns a true color background escape sequence for the given RGB values.

Functions

@spec color(0..255, 0..255, 0..255) :: String.t()

Returns a true color foreground escape sequence for the given RGB values.

Example

iex> Owl.TrueColor.color(1, 244, 74)
"\e[38;2;1;244;74m"
Link to this function

color_background(r, g, b)

View Source
@spec color_background(0..255, 0..255, 0..255) :: String.t()

Returns a true color background escape sequence for the given RGB values.

Example

iex> Owl.TrueColor.color_background(133, 48, 100)
"\e[48;2;133;48;100m"