Skip to content

Colors.py Error fix #356

@RazorSDU

Description

@RazorSDU

The error:
TypeError: Random.shuffle() takes 2 positional arguments but 3 were given

In the code of Colors.py:
image

was fixed by replacing it with:
def shuffled_hue(scale):
palette = list(smooth_hue_palette(scale))
random_keys = [random.random() for _ in palette]
palette = [x for _, x in sorted(zip(random_keys, palette))]
return numpy.array(palette)

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