struct Lolcat::Options

Overview

Configuration options for the lolcat colorization process.

This struct holds all the parameters that control how text is colorized, including color cycling speed, animation settings, and display options.

Defined in:

lolcat/options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(action : Lolcat::Action = Action::Lolcat, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 = rand * 256.0, animate : Bool = false, duration : Int32 = 12, speed : Float64 = 20.0, invert : Bool = false, force : Bool = false) #

[View source]

Instance Method Detail

def action : Action #

The action to perform (Lolcat, Version, or Help)


[View source]
def action=(action : Action) #

The action to perform (Lolcat, Version, or Help)


[View source]
def animate=(animate : Bool) #

Whether to animate the colors (shifting rainbow effect)


[View source]
def animate? : Bool #

Whether to animate the colors (shifting rainbow effect)


[View source]
def duration : Int32 #

Number of animation frames to display


[View source]
def duration=(duration : Int32) #

Number of animation frames to display


[View source]
def force=(force : Bool) #

Whether to force color output even when not outputting to a TTY


[View source]
def force? : Bool #

Whether to force color output even when not outputting to a TTY


[View source]
def freq : Float64 #

Controls how quickly the colors cycle (higher = faster color change)


[View source]
def freq=(freq : Float64) #

Controls how quickly the colors cycle (higher = faster color change)


[View source]
def invert=(invert : Bool) #

Whether to use background colors instead of foreground colors


[View source]
def invert? : Bool #

Whether to use background colors instead of foreground colors


[View source]
def offset : Float64 #

Starting position in the color cycle (randomized by default)


[View source]
def offset=(offset : Float64) #

Starting position in the color cycle (randomized by default)


[View source]
def speed : Float64 #

Animation speed (frames per second)


[View source]
def speed=(speed : Float64) #

Animation speed (frames per second)


[View source]
def spread : Float64 #

Controls how far apart the colors are spread (higher = slower color change)


[View source]
def spread=(spread : Float64) #

Controls how far apart the colors are spread (higher = slower color change)


[View source]