-
Notifications
You must be signed in to change notification settings - Fork 2
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()
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| colorCount |
| Condition | Return Value |
|---|---|
| (always) | list |
img = raylib.LoadImage("sprite.png")
palette = raylib.LoadImagePalette(img, 256)
print "Unique colors: " + palette.len
raylib.UnloadImagePalette palette
raylib.UnloadImage img