• Converts a hexadecimal RGB[A] color to a HEXA color.

    Example

    hexToHex(0.6706, 0.8039, 0.9373) // return { r: 0.6706, g: 0.8039, b: 0.9373, a: 1 }
    hexToHex(0.6706, 0.8039, 0.9373, 0.0392) // return { r: 0.6706, g: 0.8039, b: 0.9373, a: 0.0392 }

    Parameters

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

      Color components as fractions.

    Returns RGBA

Generated using TypeDoc