Skip to content

raylib.ColorContrast

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get color with contrast correction NOTE: Contrast values between -1.0f and 1.0f

Parameters

Parameter Default Value Note
color
contrast

Return value

Condition Return Value
(always) map

Notes

Example

// Increase contrast of a color
highContrast = raylib.ColorContrast(raylib.GREEN, 0.8)
print highContrast
// Reduce contrast
lowContrast = raylib.ColorContrast(raylib.GREEN, -0.5)
print lowContrast

Clone this wiki locally