def METHOD_NAME(object, name, value):
    """Converts a tuple or an integer to an RGB color value, or raises a
    TraitError if that is not possible.
    """
    if (type(value) in SequenceTypes) and (len(value) == 3):
        return (
            range_check(value[0]),
            range_check(value[1]),
            range_check(value[2]),
        )
    if isinstance(value, int):
        num = int(value)
        return (
            (num // 0x10000) / 255.0,
            ((num // 0x100) & 0xFF) / 255.0,
            (num & 0xFF) / 255.0,
        )
    if isinstance(value, wx.Colour):
        return (
            value.Red() / 255.0,
            value.Green() / 255.0,
            value.Blue() / 255.0,
        )
    raise TraitError