Skip to content

Twinkle on the edges of the colour triangle (enhancement) #37

@matteoferla

Description

@matteoferla

A potentially fun talking point, albeit school-level physics, is sampling not within the Maxwell colour triangle, but the edges for fully saturated colours. Namely one gets two random values and letting the third be zero.

def random_color(max_brightness:int=1):
    colors = [random.random() * max_brightness, random.random() * max_brightness, 0.]
    random.shuffle(colors)
    return tuple(colors)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions