from typing import List

import numpy as np


class Color:
    """
    Enum of common colors.
    """

    RED = (0, 0, 255)
    GREEN = (0, 255, 0)
    BLUE = (255, 0, 0)
    WHITE = (255, 255, 255)
    BLACK = (0, 0, 0)

    @staticmethod
    def get_random_bright_colors(n: int) -> List[tuple]:
        """
        Returns a list of random bright colors (one of the components is white).
        :param n: number of colors to return
        :return: list of random bright colors
        """
        colors = []
        for i in range(n):
            components = [np.random.randint(0, 255) for _ in range(2)] + [0]
            # shuffle colors in random order
            np.random.shuffle(components)
            colors.append(tuple([int(component) for component in components]))
        return colors
