GSDP:GAM100/CProcessing/color()

From Inside
Jump to: navigation, search

color()

Description

Create a PColor object from given rgba values. The input values must range from 0 to 255.

Parameters

color(int r, int g, int b, int a)

  • r - (int) the red value of the color
  • g - (int) the green value of the color
  • b - (int) the blue value of the color
  • a - (int) the alpha value of the color

Example

void init() 
{
    // Some color examples

    // Red
    pColor red = color(255,0,0,255);

    // Green
    pColor green = color(0,255,0,255);

    // Blue
    pColor blue = color(0,0,255,255);

    // White
    pColor white = color(255,255,255,255);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>