Cope 2.5.0
My personal "standard library" of all the generally useful code I've written for various projects over the years
|
Functions for working with colors. More...
Functions | |
def | rgb2html (r, g, b) |
tuple | html2rgb (str html) |
def | generate_colors (amt, s=1, v=1, offset=0) |
Generate amt number of colors evenly spaced around the color wheel with a given saturation and value. | |
def | furthest_colors (html, amt=5, v_bias=0, s_bias=0) |
Gets the amt number of colors evenly spaced around the color wheel from the given color v_bias and s_bias are between 0-1 and offset the colors. | |
def | complimentary_color (*color, Literal['html', 'rgb', 'rgba', 'opengl', 'hsv', 'hls', 'yiq'] rtn='rgb') |
Returns the color opposite it on the color wheel, with the same saturation and value. | |
tuple | distinct_color (int n) |
'type(rtn)' | parse_color (*args, Literal['html', 'rgb', 'rgba', 'opengl', 'hsv', 'hls', 'yiq'] rtn='rgb', **kwargs) |
One color function to rule them all! Parses a color, however you care to pass it, and returns it however you like. | |
Tuple[ 'r', 'g', 'b'] | darken (amt, *args) |
Returns the given color, but darkened. | |
Tuple[ 'r', 'g', 'b'] | invert_color (*args, **kwargs) |
Inverts a color. | |
Functions for working with colors.