b2dGetImagePaletteColorA

Category: 2D Overlay

Syntax:

b2dGetImagePaletteColorA:Int(imageHandle:Int, index:Int)


Parameters

Returns

Int



Summary

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

Takes imageHandle and index (0 to 255).

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

Reads the stored palette. Note this is the entry's own alpha - it does not account for a hole punched by b2dSetTransparentIndex.

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