from typing import Callable


def custom_color(x: int) -> Callable[[], str]:
    """Return an escape string for a color by it's number.

    param:
        x:
            The color code (between 0 and 255).

    returns:
        Formatted escape sequence for a color
    """
    return lambda: "38;5;" + str(x) + "m"