Struct PreparedVienot1999Dichromat

Prepared ViƩnot 1999 protan/deutan transform for repeated application.

struct PreparedVienot1999Dichromat(T)
  
if (is(T == float) || is(T == double));

The selected 3x3 matrix is converted to the consumer scalar type once and then reused for every color. No clipping, gamut mapping, or allocation is introduced.

Obtain a valid value with prepareVienot1999Dichromat. .init is a detectably invalid transform whose coefficients are NaN; applying it produces NaN components.

Methods

NameDescription
transform (color) Applies the prepared transform to one linear-light sRGB color.
transformInto (input, output) Applies the prepared transform to fixed-cardinality caller-owned storage.
tryTransformInto (input, output) Applies the prepared transform to runtime-sized caller-owned storage.