Skip to main content

graphics.color()

graphics.color(color_name[, opacity)
graphics.color(r, g, b[, opacity])

This function creates a solid color brush object.

Parameters

ParameterTypeDescription
color_namestringWeb standard color specification.
It can be done in the form of color name similar to CSS such as 'Red', or hexadecimal expression such as '#ff0000'.
rnumberRed component specified as an integer between 0 and 255.
gnumberGreen component specified as an integer between 0 and 255.
bnumberBlue component specified as an integer between 0 and 255.
opacitynumberOpacity specified as an number between '0' and '1'.
The default is 1.

Return Values

This function returns a Color object.

See Also