Module: Fzeet::UIRibbon::Color
- Defined in:
- lib/fzeet/windows/uiribbon.rb
Class Method Summary collapse
Instance Method Summary collapse
- #bleach(amount) ⇒ Object
- #darken(amount) ⇒ Object
- #lighten(amount) ⇒ Object
- #saturate(amount) ⇒ Object
- #shift(amount) ⇒ Object
Class Method Details
.enhance(hsb, ribbon, method) ⇒ Object
454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/fzeet/windows/uiribbon.rb', line 454 def self.enhance(hsb, ribbon, method) hsb.instance_variable_set(:@ribbon, ribbon) hsb.instance_variable_set(:@method, method) class << hsb attr_reader :ribbon, :method include Color end hsb end |
Instance Method Details
#bleach(amount) ⇒ Object
471 |
# File 'lib/fzeet/windows/uiribbon.rb', line 471 def bleach(amount) self[1] -= amount; ribbon.send("#{method}=", self); self end |
#darken(amount) ⇒ Object
467 |
# File 'lib/fzeet/windows/uiribbon.rb', line 467 def darken(amount) self[2] -= amount; ribbon.send("#{method}=", self); self end |
#lighten(amount) ⇒ Object
468 |
# File 'lib/fzeet/windows/uiribbon.rb', line 468 def lighten(amount) self[2] += amount; ribbon.send("#{method}=", self); self end |
#saturate(amount) ⇒ Object
470 |
# File 'lib/fzeet/windows/uiribbon.rb', line 470 def saturate(amount) self[1] += amount; ribbon.send("#{method}=", self); self end |
#shift(amount) ⇒ Object
473 |
# File 'lib/fzeet/windows/uiribbon.rb', line 473 def shift(amount) self[0] += amount; ribbon.send("#{method}=", self); self end |