Skip to contents

Create a new color object.

Usage

color(r, g, b, a = 255)

Arguments

r

A non-negative integer (0-255). Color red value.

g

A non-negative integer (0-255). Color green value.

b

A non-negative integer (0-255). Color blue value.

a

A non-negative integer (0-255). Color alpha value.

Value

A color

Note

This class has been auto-generated from the following Raylib struct definition:

typedef struct Color {
    unsigned char r;        // Color red value
    unsigned char g;        // Color green value
    unsigned char b;        // Color blue value
    unsigned char a;        // Color alpha value
} Color;

See also

Examples

col <- color(255L, 255L, 255L)
col$r
#> [1] 255
col$g
#> [1] 255