Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom colour palettes for pyreverse #6738

Closed
DudeNr33 opened this issue May 29, 2022 · 3 comments · Fixed by #8223
Closed

Custom colour palettes for pyreverse #6738

DudeNr33 opened this issue May 29, 2022 · 3 comments · Fixed by #8223
Labels
Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component
Milestone

Comments

@DudeNr33
Copy link
Collaborator

Current problem

See this SO question:
The --colorized option uses a fixed colour palette.
If one wants to use other colours, (s)he has to use a text-based output format and do a search-and-replace.

Desired solution

As the colour palette is just a simple list of strings inside pylint.pyreverse.writer.DiagramWriter it should be possible to make this configurable.

Additional context

No response

@DudeNr33 DudeNr33 added Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component labels May 29, 2022
@nickdrozd
Copy link
Collaborator

Related to this is the choice of default colors. Currently colors are chosen in alphabetical order:

        self.available_colors = itertools.cycle(
            [
                "aliceblue",
                "antiquewhite",
                "aquamarine",
                "burlywood",
                "cadetblue",
                "chartreuse",
                "chocolate",
                "coral",
                "cornflowerblue",
                "cyan",
                "darkgoldenrod",
                "darkseagreen",
                "dodgerblue",
                "forestgreen",
                "gold",
                "hotpink",
                "mediumspringgreen",
            ]
        )

Thus the first two colors chosen are alice blue and antique white, which is really a hideous combination.

I think a more thoughtful choice of default colors would be nice. Anyone with a little design sense (definitely not me) should be able to come up with something suitable for general use.

Better defaults would to some extent allay the need for configurability. Personally I don't want to configure colors, I just want colors that aren't ugly.

@DudeNr33
Copy link
Collaborator Author

DudeNr33 commented Feb 5, 2023

I agree, but...

I just want colors that aren't ugly

Ouch. 😄
But yes, I did not put much thought into the color selection and I am also not a design person at all. So you got a point. 😄

When I had to create diagrams for university I really like seaborn. What do you think about taking one of their qualitative color palettes. Maybe even directly the "colorblind" version to improve accessibility.

@nickdrozd
Copy link
Collaborator

When I had to create diagrams for university I really like seaborn. What do you think about taking one of their qualitative color palettes. Maybe even directly the "colorblind" version to improve accessibility.

That looks fine to me. Choosing default colors raises the dangers of bikeshedding and analysis paralysis, so to make the decision easy, I propose using the colorblind palette starting from dark blue and going clockwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants