class HighLine::Style
def self.rgb(*colors)
- Example: Creating a new Style based on rgb code -
Returns:
-
(Style)
- a Style with the rgb colors provided.
Parameters:
-
colors
() --
def self.rgb(*colors) hex = rgb_hex(*colors) name = ("rgb_" + hex).to_sym style = list[name] return style if style parts = rgb_parts(hex) new(name: name, code: "\e[38;5;#{rgb_number(parts)}m", rgb: parts) end