def to_hex(color):
    """
    Color utility, converts a whitespace separated triple of
    numbers into a hex code color.
    """
    if not color[0] == '#':
        rgb = tuple(map(int, color.split(' ')))
        color = '#%02x%02x%02x' % rgb
    return color
