'Get the Color instance from colors for:
a given name (e.g. \'white\')
or
Hex string (e.g. \'#FFFFFF\')
@param val: the name or hex string'

@staticmethod
def _color(val):

    if (not val):
        color = None
    elif (val[:1] == '#'):
        color = HexColor(val)
    else:
        try:
            color = object.__getattribute__(colors, val)
        except AttributeError:
            color = None
    return color
