OkLab class

Represents a color in the Oklab color space. L: Lightness, typically in range 0, 1 a: Green-red component, typically in range -0.5, 0.5 b: Blue-yellow component, typically in range -0.5, 0.5 Example usage: Lab lab = linearSrgbToOklab(RGB(0.5, 0.5, 0.5)); // lab components are used directly in calculations: double C = math.sqrt(lab.a * lab.a + lab.b * lab.b);

Constructors

OkLab(double L, double a, double b)
OkLab.fromColor(Color color)
factory

Properties

a double
final
b double
final
hashCode int
The hash code for this object.
no setteroverride
L double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? lightness, double? a, double? b}) OkLab
darker(double percentage) OkLab
lighter(double percentage) OkLab
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColor() Color
toHsl() OkHsl
toHsv() OkHsv
toLch() OkLch
toString() String
A string representation of this object.
override
toXyz() XYZ
withA(double a) OkLab
withB(double b) OkLab
withLightness(double l) OkLab

Operators

operator +(OkLab other) OkLab
operator -(OkLab other) OkLab
operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(OkLab start, OkLab end, double fraction) OkLab