b2dSetColor

Sets current draw color for 2D overlay (RGB 0-255, affects subsequent draw commands). Takes r (red component 0-255 integer), g (green component 0-255 integer), b (blue component 0-255 integer). Returns nothing.

2D Overlay

Parameters & Returns

Parameters

r Int
g Int
b Int

Returns

Void

Quick Summary

Sets current draw color for 2D overlay (RGB 0-255, affects subsequent draw commands). Takes r (red component 0-255 integer), g (green component 0-255 integer), b (blue component 0-255 integer). Returns nothing.

Technical Exegesis...

Sets current draw color for 2D overlay (RGB 0-255, affects subsequent draw commands). Takes r (red component 0-255 integer), g (green component 0-255 integer), b (blue component 0-255 integer). Returns nothing. Sets g_currentState.r/g/b (stores in global state, persists until changed). Use to set draw color (text, lines, rectangles, sprites), change color dynamically (animated effects, conditional coloring), or tint images (multiply image pixels by color).

Example

Example.bam
; No example implemented yet