def get_single_color_func(color):
old_r, old_g, old_b = ImageColor.getrgb(color)<EOL>rgb_max = <NUM_LIT><EOL>h, s, v = colorsys.rgb_to_hsv(old_r / rgb_max, old_g / rgb_max,<EOL>old_b / rgb_max)<EOL>def single_color_func(word=None, font_size=None, position=None,<EOL>orientation=None, font_path=None, random_state=None):<EOL><INDENT>"""<STR_LIT>"""<EOL>if random_state is None:<EOL><INDENT>random_state = Random()<EOL><DEDENT>r, g, b = colorsys.hsv_to_rgb(h, s, random_state.uniform(<NUM_LIT>, <NUM_LIT:1>))<EOL>return '<STR_LIT>'.format(r * rgb_max, g * rgb_max,<EOL>b * rgb_max)<EOL><DEDENT>return single_color_func<EOL>
Create a color function which returns a single hue and saturation with.
    different values (HSV). Accepted values are color strings as usable by
    PIL/Pillow.

    >>> color_func1 = get_single_color_func('deepskyblue')
    >>> color_func2 = get_single_color_func('#00b4d2')