OkLab class

对应 Kotlin OkLab,采用便于用户理解的归一化区间的 OkLAB 表示。

  • l:明度百分比,取值 0..100。
  • a:绿-红轴,取值 -100..100,映射到内部区间 [-0.4, 0.4]。
  • b:蓝-黄轴,取值 -100..100,映射到内部区间 [-0.4, 0.4]。
Annotations

Constructors

OkLab(double l, double a, double b)
以明度 l、绿-红轴 a、蓝-黄轴 b(均为百分比)构造 OkLab 颜色。
const

Properties

a → double
对应 Kotlin a:绿-红轴,取值 -100..100。
final
b → double
对应 Kotlin b:蓝-黄轴,取值 -100..100。
final
hashCode → int
The hash code for this object.
no setteroverride
l → double
对应 Kotlin l:明度百分比,取值 0..100。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? l, double? a, double? b}) → OkLab
返回替换指定分量后的副本,对应 Kotlin data class 的 copy。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColor([double alpha = 1.0]) → Color
对应 Kotlin OkLab.toColor,将 OkLab 转换为 sRGB Color。
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override