Skip to content

raylib.GetPixelColor

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get color from a pixel from certain format

Parameters

Parameter Default Value Note
srcPtr
format

Return value

Condition Return Value
(always) map

Notes

Example

// Get the color of a single pixel from raw pixel data bytes
// (pixelData is a binary string containing raw RGBA bytes)
c = raylib.GetPixelColor(pixelData, raylib.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
print c

Clone this wiki locally