diff options
author | Andreas Finkler <3929834+DudeNr33@users.noreply.github.com> | 2023-03-10 21:48:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 20:48:48 +0000 |
commit | 0d26e3cda507bb1a5bca21a0a6e3b86a8ffe92b6 (patch) | |
tree | 5b9cf8d60067ac5a9fa697007df7ae5b28905fd3 /pylint/pyreverse | |
parent | ceb241047100db4821aaf9bd0edcbe4c4f5d86fc (diff) | |
download | pylint-git-0d26e3cda507bb1a5bca21a0a6e3b86a8ffe92b6.tar.gz |
`pyreverse`: use colorblind friendly default colors (#8415)
Using Paul Tol's colorblind palette. Also enable both hex codes and css/html color names
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'pylint/pyreverse')
-rw-r--r-- | pylint/pyreverse/main.py | 27 | ||||
-rw-r--r-- | pylint/pyreverse/plantuml_printer.py | 2 |
2 files changed, 11 insertions, 18 deletions
diff --git a/pylint/pyreverse/main.py b/pylint/pyreverse/main.py index c2eaf699b..8cd0d567e 100644 --- a/pylint/pyreverse/main.py +++ b/pylint/pyreverse/main.py @@ -34,23 +34,16 @@ DIRECTLY_SUPPORTED_FORMATS = ( ) DEFAULT_COLOR_PALETTE = ( - "aliceblue", - "antiquewhite", - "aquamarine", - "burlywood", - "cadetblue", - "chartreuse", - "chocolate", - "coral", - "cornflowerblue", - "cyan", - "darkgoldenrod", - "darkseagreen", - "dodgerblue", - "forestgreen", - "gold", - "hotpink", - "mediumspringgreen", + # colorblind scheme taken from https://personal.sron.nl/~pault/ + "#77AADD", # light blue + "#99DDFF", # light cyan + "#44BB99", # mint + "#BBCC33", # pear + "#AAAA00", # olive + "#EEDD88", # light yellow + "#EE8866", # orange + "#FFAABB", # pink + "#DDDDDD", # pale grey ) OPTIONS: Options = ( diff --git a/pylint/pyreverse/plantuml_printer.py b/pylint/pyreverse/plantuml_printer.py index 73c9b2640..42cd6e43c 100644 --- a/pylint/pyreverse/plantuml_printer.py +++ b/pylint/pyreverse/plantuml_printer.py @@ -56,7 +56,7 @@ class PlantUmlPrinter(Printer): properties = NodeProperties(label=name) nodetype = self.NODES[type_] if properties.color and properties.color != self.DEFAULT_COLOR: - color = f" #{properties.color}" + color = f" #{properties.color.lstrip('#')}" else: color = "" body = [] |