module Termisu::Color::Palette

Overview

Color palette and named color factories.

Provides convenient access to standard ANSI colors through both constant and method-style APIs.

Extended Modules

Defined in:

termisu/color/palette.cr

Constant Summary

BASIC_COLORS = {black: 0, red: 1, green: 2, yellow: 3, blue: 4, magenta: 5, cyan: 6, white: 7}

Named color data: maps names to ANSI-256 indices

BRIGHT_COLORS = {bright_black: 8, bright_red: 9, bright_green: 10, bright_yellow: 11, bright_blue: 12, bright_magenta: 13, bright_cyan: 14, bright_white: 15}

Instance Method Summary

Instance Method Detail

def basic_color(name : Symbol) : Termisu::Color #

Creates a named basic color.


[View source]
def bright_color(name : Symbol) : Termisu::Color #

Creates a named bright color.


[View source]
def grayscale_color(level : Int32) : Termisu::Color #

Creates a grayscale color from level (0-23).


[View source]