Module: Fzeet::UIRibbon::Color

Defined in:
lib/fzeet/windows/uiribbon.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.enhance(hsb, ribbon, method) ⇒ Object



473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/fzeet/windows/uiribbon.rb', line 473

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



490
# File 'lib/fzeet/windows/uiribbon.rb', line 490

def bleach(amount) self[1] -= amount; ribbon.send("#{method}=", self); self end

#darken(amount) ⇒ Object



486
# File 'lib/fzeet/windows/uiribbon.rb', line 486

def darken(amount) self[2] -= amount; ribbon.send("#{method}=", self); self end

#lighten(amount) ⇒ Object



487
# File 'lib/fzeet/windows/uiribbon.rb', line 487

def lighten(amount) self[2] += amount; ribbon.send("#{method}=", self); self end

#saturate(amount) ⇒ Object



489
# File 'lib/fzeet/windows/uiribbon.rb', line 489

def saturate(amount) self[1] += amount; ribbon.send("#{method}=", self); self end

#shift(amount) ⇒ Object



492
# File 'lib/fzeet/windows/uiribbon.rb', line 492

def shift(amount) self[0] += amount; ribbon.send("#{method}=", self); self end