map2loop.project.hex_to_rgb#
- map2loop.project.hex_to_rgb(hex_color: str) tuple #
Convert a hex color code to an RGBA tuple. :param hex_color: The hex color code (e.g., “#RRGGBB” or “#RGB”). :type hex_color: str :param alpha: The alpha value (opacity) for the color. Defaults to 1.0. :type alpha: float, optional
- Returns:
tuple – A tuple (r, g, b, a) where r, g, b are in the range 0-1 and a is in the range 0-1.