def METHOD_NAME(value):
    """Convert various color representations to Kiva color tuple.
    This can accept integers of the form 0xRRGGBB, strings which
    can be parsed by Pyface's color parser, (r, g, b) and (r, g, b, a) tuples
    with either float 0.0 to 1.0 or int 0 to 255, Pyface Color objects, and
    toolkit color objects.
    """
    if isinstance(value, int):
        if 0 <= value <= 0xFFFFFF:
            return (
                (value >> 16) / 255.0,
                ((value >> 8) & 0xFF) / 255.0,
                (value & 0xFF) / 255.0,
                1.0,
            )
        else:
            raise ValueError(
                f"Integer value must be of the form 0xRRGGBB"
            )
    if isinstance(value, str):
        _, value = parse_text(value)
    is_array = isinstance(value, (np.ndarray, np.void))
    if is_array or isinstance(value, SequenceTypes):
        value = tuple(value)
        if len(value) not in {3, 4}:
            raise ValueError("Sequence must have length 3 or 4.")
        if all(isinstance(x, (int, np.integer)) for x in value):
            if len(value) == 3:
                value += (255,)
            if all(0 <= x < 256 for x in value):
                value = ints_to_channels(value)
            else:
                raise ValueError(
                    f"Integer sequence values not in range 0 to 255: {value}"
                )
        if len(value) == 3:
            value += (1.0,)
        if all(0 <= x <= 1.0 for x in value):
            return value
        else:
            raise ValueError(
                f"Float sequence values not in range 0 to 1: {value}"
            )
    if not isinstance(value, PyfaceColor):
        # assume that it is a toolkit color object
        value = PyfaceColor.from_toolkit(value)
    return value.rgba