Color

Creates a color value with red, green, blue, and alpha channels.

Signature

Color

Creates a color value with red, green, blue, and alpha channels.

Signature

Color(r: int, g: int, b: int, a: int = 255) -> Color

Parameters

NameTypeDefaultDescription
rintNoner argument for this API call.
gintNoneg argument for this API call.
bintNoneb argument for this API call.
aint255a argument for this API call.

Returns

Color

Example

from conjure import *

init_window(360, 640, "API")
while not window_should_close():
    begin_drawing()
    clear_background(WHITE)
    draw_text("Moosh", 120, 300, 28, BLACK)
    end_drawing()

See also

  • fade
  • color_from_hex
  • color_to_hex

Return to the colors overview or continue with the quickstart.