<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_color(option, opt, value):
 """Validate and convert an option value of type 'color'. ``option`` is an optparse.Option instance. ``opt`` is a string with the user-supplied option name (e.g. '--bgcolor'). ``value`` is the user-supplied value. """

    try:
        return parse_color(value)
    except ValueError:
        raise optparse.OptionValueError("option %s: invalid color value: %r"
                                         % (opt, value))