APIColorsOverview

Colors

Colors are Color objects with red, green, blue, and alpha channels. Named constants match the Raylib-compatible palette.

API

  • Color(r: int, g: int, b: int, a: int = 255)
  • fade(color: Color, alpha: float) -> Color
  • color_from_hex(hex: str) -> Color
  • color_to_hex(color: Color) -> str
  • WHITE, BLACK, RED, GREEN, BLUE, YELLOW, ORANGE, PINK, PURPLE, GRAY, BLANK, and the rest of the named color set.
from conjure import *
 
init_window(360, 640, "Colors")
soft_red = fade(RED, 0.5)
 
while not window_should_close():
    begin_drawing()
    clear_background(color_from_hex("#FBFBFC"))
    draw_circle(180, 320, 64, soft_red)
    end_drawing()

Use colors with drawing primitives and image tinting.