BCUtils.BannerThemes (bc_utils v0.11.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

Nature-Inspired Colors

Sophisticated Colors

Warm Colors

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

theme_function()

@type theme_function() :: (String.t() -> String.t())

Functions

amber_on_true_black(text)

@spec amber_on_true_black(String.t()) :: String.t()

Applies amber yellow text (#FFC107) on true black background.

apply_theme(theme_name, text)

@spec apply_theme(atom(), String.t()) :: {:ok, String.t()} | {:error, :unknown_theme}

Applies a theme function by name to the given text.

Parameters

  • theme_name - The atom name of the theme function
  • text - The text to style

Example

iex> BCUtils.BannerThemes.apply_theme(:sky_blue_on_true_black, "BEAM")
"BEAM"

Returns

  • {:ok, styled_text} if theme exists
  • {:error, :unknown_theme} if theme doesn't exist

available_themes()

@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
]

cyan_on_true_black(text)

@spec cyan_on_true_black(String.t()) :: String.t()

Applies bright cyan text (#00FFFF) on true black background.

grass_on_true_black(text)

@spec grass_on_true_black(String.t()) :: String.t()

Applies dark green text (#008000) on true black background.

green_on_true_black(text)

@spec green_on_true_black(String.t()) :: String.t()

Applies bright green text (#00FF00) on true black background.

indigo_on_true_black(text)

@spec indigo_on_true_black(String.t()) :: String.t()

Applies deep indigo text (#4B0082) on true black background.

lavender_on_true_black(text)

@spec lavender_on_true_black(String.t()) :: String.t()

Applies lavender text (#E6E6FA) on true black background.

lime_on_true_black(text)

@spec lime_on_true_black(String.t()) :: String.t()

Applies lime green text (#BFFF00) on true black background.

maroon_on_true_black(text)

@spec maroon_on_true_black(String.t()) :: String.t()

Applies dark red/maroon text (#800000) on true black background.

orange_on_true_black(text)

@spec orange_on_true_black(String.t()) :: String.t()

Applies orange text (#FFA500) on true black background.

purple_on_true_black(text)

@spec purple_on_true_black(String.t()) :: String.t()

Applies bright purple/magenta text (#FF00FF) on true black background.

sky_blue_on_true_black(text)

@spec sky_blue_on_true_black(String.t()) :: String.t()

Applies sky blue text (#87CEEB) on true black background.

violet_on_true_black(text)

@spec violet_on_true_black(String.t()) :: String.t()

Applies violet text (#EE82EE) on true black background.