namespace Colourful.Implementation.Conversion { /// /// Base class for converters between XYZ and Hunter Lab /// public abstract class XYZAndHunterLabConverterBase { /// /// Computes the Ka parameter /// protected static double ComputeKa(XYZColor whitePoint) { if (whitePoint == Illuminants.C) return 175; var Ka = 100 * (175 / 198.04) * (whitePoint.X + whitePoint.Y); return Ka; } /// /// Computes the Kb parameter /// protected static double ComputeKb(XYZColor whitePoint) { if (whitePoint == Illuminants.C) return 70; var Ka = 100 * (70 / 218.11) * (whitePoint.Y + whitePoint.Z); return Ka; } } }