Function rgb255ToMunsell

  • Converts quantized RGB to Munsell Color string. Whether this conversion succeeds or not depends on the parameters though the following behaviour is guaranteed and tested on Node.js:

    If r255, g255, b255 are in {0, 1, ..., 255} and the optional parameters except digits have defaultvalues, rgb255ToMunsell() successfully returns a Munsell Color string before maxIteration.

    See

    lchabToMhvc

    Parameters

    • r255: number

      will be in {0, 1, ..., 255} though any integer is accepted and properly processed as an out-of-gamut color.

    • g255: number

      ditto.

    • b255: number

      ditto.

    • Optional rgbSpace: RGBSpace = SRGB
    • Optional digits: number = 1

      is the number of digits after the decimal point. Must be non-negative integer. Note that the units digit of the hue prefix is assumed to be already after the decimal point.

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

    Returns string

    Munsell Color code

Generated using TypeDoc