from typing import Union


def hex_colour(colour: Union[str, int]) -> str:
    """
    Converts the given representation of a colour to its RGB hex string.

    As we are using a Discord dark theme analogue, black colours are returned as white instead.
    """
    if isinstance(colour, str):
        colour = colour if colour.startswith("#") else f"#{colour}"
    else:
        colour = f"#{colour:0>6X}"
    return colour if colour != "#000000" else "#FFFFFF"