• Converts a hexadecimal RGB[A] color to an HWB color.

    Example

    hexToHwb(0.2392, 0.2902, 0.4706) // return { h: 226.78, w: 0.2392, b: 0.5294, a: 1 }
    hexToHwb(0.2392, 0.2902, 0.4706, 0.251) // return { h: 226.78, w: 0.2392, b: 0.5294, a: 0.251 }

    Parameters

    • rgba: [number, number, number, number?]

      Color components as fractions.

    Returns HWB

Generated using TypeDoc