ViewingConditions

data class ViewingConditions(surroundFactor: Double, adaptingLuminance: Double, backgroundLuminance: Double, referenceWhite: CieXyzAbs)

The conditions under which a color modeled by ZCAM will be viewed. This is defined by the luminance of the adapting field, luminance of the background, and surround factor.

For performance, viewing conditions should be created once and reused for all ZCAM conversions unless they have changed. Creating an instance of ViewingConditions performs calculations that are reused throughout the ZCAM model.

Constructors

ViewingConditions
Link copied to clipboard
fun ViewingConditions(surroundFactor: Double, adaptingLuminance: Double, backgroundLuminance: Double, referenceWhite: CieXyzAbs)

Types

Companion
Link copied to clipboard
object Companion

Properties

adaptingLuminance
Link copied to clipboard
val adaptingLuminance: Double

Absolute luminance of the adapting field. This can be calculated as L_w * backgroundLuminance / 100 where L_w is the luminance of referenceWhite, but it is a user-controlled parameter for flexibility.

backgroundLuminance
Link copied to clipboard
val backgroundLuminance: Double

Absolute luminance of the background.

referenceWhite
Link copied to clipboard
val referenceWhite: CieXyzAbs

Reference white point in absolute XYZ.

surroundFactor
Link copied to clipboard
val surroundFactor: Double

Surround factor, which models the surround field (distant background).