Class: Kolor::Enum::Theme
- Inherits:
-
Kolor::Enum
- Object
- Kolor::Enum
- Kolor::Enum::Theme
- Defined in:
- lib/kolor/enum/theme.rb
Overview
Kolor::Enum::Theme defines named color themes for terminal output. Each theme is a structured hash containing:
- foreground: the main text color
- background: optional background color
- styles: optional array of text styles (e.g. :bold, :underline)
These themes are used to apply consistent formatting across messages, and can be extended or overridden via Kolor::Extra.theme.
Instance Attribute Summary
Attributes inherited from Kolor::Enum
Instance Method Summary collapse
-
#debug ⇒ Kolor::Enum::Theme
Magenta text for debugging output.
-
#error ⇒ Kolor::Enum::Theme
White text on red background for errors.
-
#info ⇒ Kolor::Enum::Theme
Cyan text for informational messages.
-
#success ⇒ Kolor::Enum::Theme
Green bold text for success messages.
-
#warning ⇒ Kolor::Enum::Theme
Yellow bold text for warnings.
Methods inherited from Kolor::Enum
#==, [], all, entry, #hash, #initialize, #inspect, keys, name_for, remove, #to_s, #to_sym, type, values
Constructor Details
This class inherits a constructor from Kolor::Enum
Instance Method Details
#debug ⇒ Kolor::Enum::Theme
Returns magenta text for debugging output.
31 |
# File 'lib/kolor/enum/theme.rb', line 31 entry :debug, { foreground: :magenta, background: nil, styles: [] } |
#error ⇒ Kolor::Enum::Theme
Returns white text on red background for errors.
22 |
# File 'lib/kolor/enum/theme.rb', line 22 entry :error, { foreground: :white, background: :red, styles: [:bold] } |
#info ⇒ Kolor::Enum::Theme
Returns cyan text for informational messages.
28 |
# File 'lib/kolor/enum/theme.rb', line 28 entry :info, { foreground: :cyan, background: nil, styles: [] } |
#success ⇒ Kolor::Enum::Theme
Returns green bold text for success messages.
19 |
# File 'lib/kolor/enum/theme.rb', line 19 entry :success, { foreground: :green, background: nil, styles: [:bold] } |
#warning ⇒ Kolor::Enum::Theme
Returns yellow bold text for warnings.
25 |
# File 'lib/kolor/enum/theme.rb', line 25 entry :warning, { foreground: :yellow, background: nil, styles: [:bold] } |