fromIntInViewingConditions static method

Cam16 fromIntInViewingConditions(
  1. int argb,
  2. ViewingConditions viewingConditions
)

Given viewingConditions, convert argb to CAM16.

Implementation

static Cam16 fromIntInViewingConditions(
    int argb, ViewingConditions viewingConditions) {
  // Transform ARGB int to XYZ
  final xyz = ColorUtils.xyzFromArgb(argb);
  final x = xyz[0];
  final y = xyz[1];
  final z = xyz[2];
  return fromXyzInViewingConditions(x, y, z, viewingConditions);
}