Class: Chamomile::Color::ANSIColor
- Inherits:
-
Data
- Object
- Data
- Chamomile::Color::ANSIColor
- Defined in:
- lib/chamomile/styling/color.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
43 44 45 |
# File 'lib/chamomile/styling/color.rb', line 43 def code @code end |
Instance Method Details
#bg_sequence ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/chamomile/styling/color.rb', line 52 def bg_sequence if code < 8 (40 + code).to_s else (100 + code - 8).to_s end end |
#fg_sequence ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/chamomile/styling/color.rb', line 44 def fg_sequence if code < 8 (30 + code).to_s else (90 + code - 8).to_s end end |
#no_color? ⇒ Boolean
60 |
# File 'lib/chamomile/styling/color.rb', line 60 def no_color? = false |