Skip to content

raylib.GenImageColor

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Generate image: plain color

Parameters

Parameter Default Value Note
width 256
height 256
color WHITE

Return value

Condition Return Value
(always) map

Notes

Example

// Create a 64x64 solid red image
img = raylib.GenImageColor(64, 64, raylib.RED)
tex = raylib.LoadTextureFromImage(img)
raylib.UnloadImage img
raylib.BeginDrawing
  raylib.ClearBackground raylib.BLACK
  raylib.DrawTexture tex, 0, 0, raylib.WHITE
raylib.EndDrawing
raylib.UnloadTexture tex

Clone this wiki locally