Function convertRgbToHex

Converts RGB values to hexadecimal color code.

If any of the RGB values are invalid.

  • Parameters

    • r: number

      The red value (0-255).

    • g: number

      The green value (0-255).

    • b: number

      The blue value (0-255).

    Returns string

    The equivalent hexadecimal color code.