styles

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package styles provides minimal ANSI styling helpers for CLI output.

This package defines colors and text styles used throughout Ralph's console output. It uses raw ANSI escape codes (truecolor / 24-bit) to avoid pulling in a styling library.

Index

Constants

View Source
const RalphFox = `` /* 1159-byte string literal not displayed */

RalphFox is ASCII art of Ralph the blue fox shown at CLI startup.

Variables

View Source
var (
	// SubTitleStyle for primary text.
	SubTitleStyle = Style{/* contains filtered or unexported fields */}
	// InfoStyle for informational messages.
	InfoStyle = Style{/* contains filtered or unexported fields */}
	// SuccessStyle for success messages.
	SuccessStyle = Style{/* contains filtered or unexported fields */}
	// WarningStyle for warning messages.
	WarningStyle = Style{/* contains filtered or unexported fields */}
	// ErrorStyle for error messages.
	ErrorStyle = Style{/* contains filtered or unexported fields */}
)

Message styles

View Source
var (
	// TitleStyle is for main screen titles (bold + primary color).
	TitleStyle = Style{/* contains filtered or unexported fields */}
)

Title styles

Functions

This section is empty.

Types

type Color added in v0.2.0

type Color string

Color is a truecolor (24-bit) ANSI SGR fragment, e.g. "38;2;255;28;240".

var (
	// Primary colors
	Primary Color = "38;2;255;28;240"  // Hot Pink (main brand color)
	Success Color = "38;2;80;250;123"  // Bright Green (checkmarks, success)
	Warning Color = "38;2;249;226;175" // Yellow (warnings)
	Error   Color = "38;2;243;139;168" // Red (errors)
	Info    Color = "38;2;0;217;255"   // Bright Cyan
)

Color palette - vibrant theme.

type Style added in v0.2.0

type Style struct {
	// contains filtered or unexported fields
}

Style applies a sequence of ANSI SGR codes around a string.

func (Style) Render added in v0.2.0

func (s Style) Render(text string) string

Render wraps text with this style's ANSI codes and a reset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL