API Reference › Color functions › Color.rgba
method

Color.rgba

Color.rgba(r, g, b, a) -> int

Packs r, g, b, and an alpha a (0..255) into a 0xAARRGGBB int. The software renderer draws opaque, but the alpha byte is preserved for your own blending or storage.

Example

program Demo {
  handler DrawWorld phase Render {
    let c = Color.rgba(255, 128, 64, 200)
    Screen.clear(c)
    Screen.show()
  }
}
← All symbols