Skip to content

raylib.LoadImagePalette

JoeStrout edited this page Apr 29, 2026 · 3 revisions

Load colors palette from image as a Color array (RGBA - 32bit) NOTE: Memory allocated should be freed using UnloadImagePalette()

Parameters

Parameter Default Value Note
image
colorCount

Return value

Condition Return Value
(always) list

Notes

Example

img = raylib.LoadImage("sprite.png")
palette = raylib.LoadImagePalette(img, 256)
print "Unique colors: " + palette.len
raylib.UnloadImagePalette palette
raylib.UnloadImage img

Clone this wiki locally