color()

Color / Creating & Reading

Description

Creates colors for storing in variables. Respects the current colorMode.

Syntax

color color(float gray) color color(float gray, float a) color color(float r, float g, float b) color color(float r, float g, float b, float a)

Parameters

NameTypeDescription
grayfloatgrayscale value
rfloatred component
gfloatgreen component
bfloatblue component
afloatalpha (optional)

Returns

color

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...