func_sketch._impl.color_util module#
Utilities of colors.
- func_sketch._impl.color_util.hex_to_rgb_color(hex: str) RGBColor#
Convert a hex color string to an RGBColor object.
- Parameters:
hex – Hex color string without alpha channel (e.g., “#RRGGBB”).
- Returns:
RGBColor object.
- func_sketch._impl.color_util.hex_to_rgba(hex: str) tuple[float, float, float, float]#
Convert a hex color string to an RGBA tuple.
- Parameters:
hex – Hex color string (e.g., “#RRGGBB” or “#RRGGBBAA”).
- Returns:
RGBA tuple with values in the range [0.0, 1.0].