• Converts a hexadecimal color code to its corresponding hue value.

    Calculates the hue (0–360 degrees) of the color based on its RGB components.

    Parameters

    • hex: string

      A hexadecimal color code (e.g., "#FF5733").

    Returns number

    The hue value as a number between 0 and 360.