OkLch class

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

  • l:明度百分比,取值 0..100
  • c:色度百分比,取值 0..100,映射到内部区间 [0.0, 0.4]
  • h:色相,单位度,取值 [0, 360]
Annotations

Constructors

OkLch(double l, double c, double h)
以明度 l、色度 c(均为百分比)与色相 h(度)构造 OkLCH 颜色。
const

Properties

c double
对应 Kotlin c:色度百分比,取值 0..100
final
h double
对应 Kotlin h:色相,单位度,取值 [0, 360]
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? c, double? h}) OkLch
返回替换指定分量后的副本,对应 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 OkLch.toColor,将 OkLCH 转换为 sRGB Color
toString() String
A string representation of this object.
override

Operators

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