Method: Color::RGB#darken_by

Defined in:
lib/color/rgb.rb

#darken_by(percent) ⇒ Object

Mix the RGB hue with Black so that the RGB hue is the specified percentage of the resulting colour. Strictly speaking, this isn’t a darken_by operation.



243
244
245
# File 'lib/color/rgb.rb', line 243

def darken_by(percent)
  mix_with(Black, percent)
end