GSDP:GAM100/CProcessing/red()

red()

Description

Retrieve the red value from a given PColor object.

Parameters

red(PColor c)

  • c - (PColor) the Color to retrieve the red value from.

Example

void init() 
{
    // Create a slightly transparent white color
    pColor white = color(255,255,255,128);

   // Retrieve the red value
   // red will be 255
   int red = red(white);
}

Related