color(r: number, g: number, b: number): ColorComp

Sets the color of a Game Object (rgb 0-255).

paramr- The red value to set.

paramg- The green value to set.

paramb- The blue value to set.

// blue frog
add([
    sprite("bean"),
    color(0, 0, 255),
]);

returnsThe color comp.

sincev2000.0

color(c: Color): ColorComp

color(rgb: [number, number, number]): ColorComp

color(c: string): ColorComp

color(): ColorComp