Method: Color::RGB#brightness

Defined in:
lib/atome/utilities/color_helper/color/rgb.rb

#brightnessObject

Returns the brightness value for a colour, a number between 0..1. Based on the Y value of YIQ encoding, representing luminosity, or perceived brightness.

This may be modified in a future version of color-tools to use the luminosity value of HSL.



286
287
288
# File 'lib/atome/utilities/color_helper/color/rgb.rb', line 286

def brightness
  to_yiq.y
end