---
name: "al_color_oklab"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_color_oklab/3alleg5"
---

# al\_color\_oklab(3alleg5)

Allegro 5 API

## NAME

al\_color\_oklab - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_color.h>
  ALLEGRO_COLOR al_color_oklab(float l, float a, float b)
  ```

## DESCRIPTION

Return an ALLEGRO\_COLOR(3alleg5) structure from Oklab values. The L component corresponds to luminance from 0..1. The a and b components are in the range -1..+1.

*Note:*

The Oklab color space can represent more colors than are visible in sRGB and therefore conversion may result in RGB values outside of the 0..1 range. You can check for that case with al\_is\_color\_valid(3alleg5).

## SINCE

5\.2.8

## SEE ALSO

al\_color\_oklab\_to\_rgb(3alleg5), al\_color\_rgb\_to\_oklab(3alleg5)
