Method: Processing::GraphicsContext#alpha

Defined in:
lib/processing/graphics_context.rb

#alpha(color) ⇒ Numeric

Returns the red value of the color.

Parameters:

  • color (Numeric)

    color value

Returns:

  • (Numeric)

    the red value

See Also:



756
757
758
# File 'lib/processing/graphics_context.rb', line 756

def alpha(color)
  ((color >> 24) & 0xff) / 255.0 * @colorMaxes__[3]
end