Method: ColorLib::RGB#brightness

Defined in:
lib/color_lib/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.



260
261
262
# File 'lib/color_lib/rgb.rb', line 260

def brightness
  to_yiq.y
end