Colors Functions
Available functions:
ColorManager.__init__()
: Initializes the ColorManager with a predefined list of colors.ColorManager.
hex_to_rgb
(hex_value)
: Converts a hex color code to an RGB tuple.ColorManager.
rgb_to_hex
(r, g, b)
: Converts RGB values to a hex color code.ColorManager.
closest_color_name
(hex_value)
: Finds the closest named color to the given hex value.ColorManager.
get_color_by_name
(name)
: Returns the hex and RGB values of a color based on its name.
To use ColorManager, you must first initialize it before use:
Hex to RGB
Converts a hex color code to an RGB tuple.
RGB to hex
Converts RGB values to a hex color code.
Closest color name
Finds the closest named color to the given hex value.
Get color by name
Returns the hex and RGB values of a color based on its name.
Last updated