struct Colorize::Object(T)

Defined in:

colorize.cr

Constant Summary

BACK_BLACK = "40"
BACK_BLUE = "44"
BACK_CYAN = "46"
BACK_DARK_GRAY = "100"
BACK_DEFAULT = "49"
BACK_GREEN = "42"
BACK_LIGHT_BLUE = "104"
BACK_LIGHT_CYAN = "106"
BACK_LIGHT_GRAY = "47"
BACK_LIGHT_GREEN = "102"
BACK_LIGHT_MAGENTA = "105"
BACK_LIGHT_RED = "101"
BACK_LIGHT_YELLOW = "103"
BACK_MAGENTA = "45"
BACK_RED = "41"
BACK_WHITE = "107"
BACK_YELLOW = "43"
COLORS = ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "light_gray", "dark_gray", "light_red", "light_green", "light_yellow", "light_blue", "light_magenta", "light_cyan", "white"] of ::String
FORE_BLACK = "30"
FORE_BLUE = "34"
FORE_CYAN = "36"
FORE_DARK_GRAY = "90"
FORE_DEFAULT = "39"
FORE_GREEN = "32"
FORE_LIGHT_BLUE = "94"
FORE_LIGHT_CYAN = "96"
FORE_LIGHT_GRAY = "37"
FORE_LIGHT_GREEN = "92"
FORE_LIGHT_MAGENTA = "95"
FORE_LIGHT_RED = "91"
FORE_LIGHT_YELLOW = "93"
FORE_MAGENTA = "35"
FORE_RED = "31"
FORE_WHITE = "97"
FORE_YELLOW = "33"
MODE_BLINK = "5"
MODE_BLINK_FLAG = 8
MODE_BOLD = "1"
MODE_BOLD_FLAG = 1
MODE_BRIGHT = "1"
MODE_BRIGHT_FLAG = 1
MODE_DEFAULT = "0"
MODE_DIM = "2"
MODE_DIM_FLAG = 2
MODE_HIDDEN = "8"
MODE_HIDDEN_FLAG = 32
MODE_REVERSE = "7"
MODE_REVERSE_FLAG = 16
MODE_UNDERLINE = "4"
MODE_UNDERLINE_FLAG = 4
MODES = ["bold", "bright", "dim", "underline", "blink", "reverse", "hidden"] of ::String
STACK = [] of Colorize::Object(String)

Class Method Summary

Instance Method Summary

Instance methods inherited from struct Struct

==(other : self) : Bool ==, hash : Int32 hash, inspect(io : IO) : Nil inspect, to_s(io) to_s

Instance methods inherited from struct Value

==(other) ==, dup dup

Instance methods inherited from class Object

!=(other) !=, !~(other) !~, ==(other) ==, ===(other)
===(other : YAML::Any)
===(other : JSON::Any)
===
, =~(other) =~, class class, crystal_type_id crystal_type_id, dup dup, hash hash, inspect(io : IO)
inspect
inspect
, itself itself, not_nil! not_nil!, tap(&block) tap, to_json to_json, to_pretty_json(indent : String = " ")
to_pretty_json(io : IO, indent : String = " ")
to_pretty_json
, to_s
to_s(io : IO)
to_s
, to_yaml
to_yaml(io : IO)
to_yaml
, try(&block) try

Class methods inherited from class Object

==(other : Class) ==, ===(other) ===, cast(other) : self cast, clone clone, dup dup, from_json(string_or_io) : self
from_json(string_or_io, root : String) : self
from_json
, from_yaml(string : String) : self from_yaml, hash hash, inspect(io) inspect, name : String name, nilable? nilable?, to_s(io) to_s, |(other : U.class) forall U |

Class Method Detail

def self.new(object : T) #

[View source]

Instance Method Detail

def back(color : Symbol) #

[View source]
def black #

[View source]
def blink #

[View source]
def blue #

[View source]
def bold #

[View source]
def bright #

[View source]
def cyan #

[View source]
def dark_gray #

[View source]
def dim #

[View source]
def fore(color : Symbol) #

[View source]
def green #

[View source]
def hidden #

[View source]
def inspect(io) #

[View source]
def light_blue #

[View source]
def light_cyan #

[View source]
def light_gray #

[View source]
def light_green #

[View source]
def light_magenta #

[View source]
def light_red #

[View source]
def light_yellow #

[View source]
def magenta #

[View source]
def mode(mode : Symbol) #

[View source]
def on(color : Symbol) #

[View source]
def on_black #

[View source]
def on_blue #

[View source]
def on_cyan #

[View source]
def on_dark_gray #

[View source]
def on_green #

[View source]
def on_light_blue #

[View source]
def on_light_cyan #

[View source]
def on_light_gray #

[View source]
def on_light_green #

[View source]
def on_light_magenta #

[View source]
def on_light_red #

[View source]
def on_light_yellow #

[View source]
def on_magenta #

[View source]
def on_red #

[View source]
def on_white #

[View source]
def on_yellow #

[View source]
def push(io = STDOUT, &block) #

[View source]
def red #

[View source]
def reverse #

[View source]
def surround(io = STDOUT, &block) #

[View source]
def to_s(io) #

[View source]
def toggle(on) #

[View source]
def underline #

[View source]
def white #

[View source]
def yellow #

[View source]