API Reference › Color functions › Color.rgb
method

Color.rgb

Color.rgb(r, g, b) -> int

Packs three 0..255 channel values into a single 0xRRGGBB color int. Use it to build a color from computed channels rather than a fixed literal or a palette name.

Example

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