Function hexToMunsell

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

    If the optional parameters except digits have default values, hexToMunsell() successfully returns a Munsell Color string before maxIteration.

    See

    lchabToMhvc

    Parameters

    • hex: string

      may be 24-bit RGB (#XXXXXX), 12-bit RGB (#XXX), 32-bit RGBA, (#XXXXXXXX), or 16-bit RGBA (#XXXX). Alpha channel is ignored.

    • 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