Function lchabToMhvc

  • Converts LCHab to Munsell HVC by inverting mhvcToLchab() with a simple iteration algorithm, which is almost the same as the one in "An Open-Source Inversion Algorithm for the Munsell Renotation" by Paul Centore, 2011:

    • V := lToMunsellValue(L*);
    • C0 := C*ab / 5.5;
    • H0 := hab * 100/360;
    • Cn+1 := Cn + factor * ΔCn;
    • Hn+1 := Hn + factor * ΔHn.

    ΔHn and ΔCn are internally calculated at every step. This function returns Munsell HVC values if C0 ≦ threshold or if V ≦ threshold or when max(ΔHn, ΔCn) falls below threshold.

    Note that the given values are assumed to be under Illuminant C. I don't recommend you use this function if you are not sure what that means.

    Parameters

    • lstar: number
    • cstarab: number
    • hab: number
    • Optional threshold: number = 1e-6
    • Optional maxIteration: number = 200
    • Optional ifReachMax: ProcType = 'error'
    • Optional factor: number = 0.5

    Returns Vector3

    [Hue, Value, Chroma]

Generated using TypeDoc