Class: Chamomile::Color::ANSI256Color

Inherits:
Data
  • Object
show all
Defined in:
lib/chamomile/styling/color.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



63
64
65
# File 'lib/chamomile/styling/color.rb', line 63

def code
  @code
end

Instance Method Details

#bg_sequenceObject



68
69
70
# File 'lib/chamomile/styling/color.rb', line 68

def bg_sequence
  "48;5;#{code}"
end

#fg_sequenceObject



64
65
66
# File 'lib/chamomile/styling/color.rb', line 64

def fg_sequence
  "38;5;#{code}"
end

#no_color?Boolean

Returns:

  • (Boolean)


72
# File 'lib/chamomile/styling/color.rb', line 72

def no_color? = false