BCUtils.BannerThemes (bc_utils v0.15.0)
Predefined color themes for banner text styling.
This module provides a collection of color functions that combine RGB foreground colors with true black backgrounds for high-contrast banner displays.
Available Themes
Primary Colors
green_on_true_black/1- Bright green text (#00FF00)cyan_on_true_black/1- Bright cyan text (#00FFFF)purple_on_true_black/1- Bright purple/magenta text (#FF00FF)
Nature-Inspired Colors
grass_on_true_black/1- Dark green (#008000)sky_blue_on_true_black/1- Sky blue (#87CEEB)lime_on_true_black/1- Lime green (#BFFF00)
Sophisticated Colors
indigo_on_true_black/1- Deep indigo (#4B0082)lavender_on_true_black/1- Lavender (#E6E6FA)violet_on_true_black/1- Violet (#EE82EE)
Warm Colors
amber_on_true_black/1- Amber yellow (#FFC107)orange_on_true_black/1- Orange (#FFA500)maroon_on_true_black/1- Dark red (#800000)
Usage
import BCUtils.BannerThemes
styled_text = sky_blue_on_true_black("BEAM")
IO.puts(styled_text)These functions are designed to be used with BCUtils.Banner for
creating visually appealing startup banners.
Summary
Functions
Applies amber yellow text (#FFC107) on true black background.
Applies a theme function by name to the given text.
Returns a list of all available theme functions.
Applies bright cyan text (#00FFFF) on true black background.
Applies dark green text (#008000) on true black background.
Applies bright green text (#00FF00) on true black background.
Applies deep indigo text (#4B0082) on true black background.
Applies lavender text (#E6E6FA) on true black background.
Applies lime green text (#BFFF00) on true black background.
Applies dark red/maroon text (#800000) on true black background.
Applies orange text (#FFA500) on true black background.
Applies bright purple/magenta text (#FF00FF) on true black background.
Applies sky blue text (#87CEEB) on true black background.
Applies violet text (#EE82EE) on true black background.
Types
Functions
Applies amber yellow text (#FFC107) on true black background.
Applies a theme function by name to the given text.
Parameters
theme_name- The atom name of the theme functiontext- The text to style
Example
iex> BCUtils.BannerThemes.apply_theme(:sky_blue_on_true_black, "BEAM")
"[48;2;0;0;0m[38;2;135;206;235mBEAM[0m"Returns
{:ok, styled_text}if theme exists{:error, :unknown_theme}if theme doesn't exist
@spec available_themes() :: [atom()]
Returns a list of all available theme functions.
Example
iex> BCUtils.BannerThemes.available_themes()
[
:green_on_true_black,
:cyan_on_true_black,
# ... more themes
]
Applies bright cyan text (#00FFFF) on true black background.
Applies dark green text (#008000) on true black background.
Applies bright green text (#00FF00) on true black background.
Applies deep indigo text (#4B0082) on true black background.
Applies lavender text (#E6E6FA) on true black background.
Applies lime green text (#BFFF00) on true black background.
Applies dark red/maroon text (#800000) on true black background.
Applies orange text (#FFA500) on true black background.
Applies bright purple/magenta text (#FF00FF) on true black background.
Applies sky blue text (#87CEEB) on true black background.
Applies violet text (#EE82EE) on true black background.