Hex to RGB
Converts a hexadecimal color code to a tuple of integers corresponding to its RGB components.
- Use a list comprehension in combination with
int()and list slice notation to get the RGB components from the hexadecimal string. - Use
tuple()to convert the resulting list to a tuple.