b2dGetImagePaletteColorG

Category: 2D Overlay

Syntax:

b2dGetImagePaletteColorG:Int(imageHandle:Int, index:Int)


Parameters

Returns

Int



Summary

Returns the green component of a palette entry, 0 to 255.

Takes imageHandle and index (0 to 255).

Returns the green value, or 0 if the handle or index is invalid.

Reads the stored palette, so cycling and fading do not affect what comes back. See b2dGetImagePaletteColorR.

View detailed documentation online



Example
; Make palette entry 5 pure red, then read it back.
b2dSetImagePaletteColor(img, 5, 255, 0, 0, 255)
Print ToString(b2dGetImagePaletteColorR(img, 5))    ; 255

BambooBasic © 2026 Michael Denathorn