OKLab color gradients were partially implemented (#230)

in RadialGradient.kt and NPointLinearGradient.kt

Add OKLab variation to DemoNPointLinearGradient.kt

Mention OKLab (l, a, b) ranges and meaning.
This commit is contained in:
Abe Pazos
2022-02-28 21:00:25 +01:00
committed by GitHub
parent ccc3ed5bbc
commit 6e29423448
4 changed files with 52 additions and 24 deletions

View File

@@ -6,7 +6,10 @@ import org.openrndr.math.Vector4
import kotlin.math.pow
/**
* Color in OKLab color space
* Color in OKLab color space.
* [l] = lightness: black (0.0) to white (1.0),
* [a] = red (-1.0) to green (1.0),
* [b] = yellow (-1.0) to blue (1.0).
*/
data class ColorOKLABa(val l: Double, val a: Double, val b: Double, val alpha: Double = 1.0) :
ConvertibleToColorRGBa,