class RatatuiRuby::Style
A value object that defines colors and modifiers for text or widgets.
- fg
-
The foreground color (e.g.,
:red, +β#ff0000β+). - bg
-
The background color (e.g.,
:black, +β#000000β+). - modifiers
-
An array of symbols representing text modifiers:
:bold,:italic,:dim,:reversed,:underlined,:slow_blink,:rapid_blink,:crossed_out,:hidden
Public Class Methods
Source
# File lib/ratatui_ruby/schema/style.rb, line 27 def self.default new end
Returns a default style with no colors or modifiers.
Style.default # => #<RatatuiRuby::Style fg=nil, bg=nil, modifiers=[]>
Source
# File lib/ratatui_ruby/schema/style.rb, line 19 def initialize(fg: nil, bg: nil, modifiers: []) super end
- fg
-
The foreground color (e.g., βredβ, β#ff0000β).
- bg
-
The background color (e.g., βblackβ, β#000000β).
- modifiers
-
An array of symbols representing text modifiers.
Calls superclass method