API Reference › Light › Light.gel
method

Light.gel

Light.gel(color)

Sets a **gel** (a colour cookie) for lights emitted after it: the light blends from its own color at the centre to this color at the rim, so a single light can carry a two-tone tint — a warm core cooling to a blue edge, a fire that reddens outward. Clear it with Light.clear_gel to return to a flat single-colour light. The gel rides on both Light.point and Light.spot, and persists until cleared. Per-channel Q16.16 interpolation — deterministic.

Parameters

colorthe rim colour, 0x00RRGGBB

Example

program Demo {
  property Torch { x: int = 0, y: int = 0 }
  model Lamp { Torch }
  handler Render phase Update {
    Screen.clear(0)
    Light.ambient(Color.rgb(24, 24, 32))
    Light.gel(Color.rgb(40, 60, 160))                      # cool blue rim
    Light.point(80, 60, 70, Color.rgb(255, 200, 120), 1.0)  # warm core
    Light.clear_gel()
    Screen.show()
  }
}
← All symbols