Skip to content

Commit

Permalink
ENH: Add Cividis (color-vision-deficiency-friendly) colormap
Browse files Browse the repository at this point in the history
[Cividis](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239) is the latest colormap in `matplotlib`. It considers people with color vision defficiency (CVD).

> Here, we present an example CVD-optimized colormap [...] that is optimized for viewing by those without a CVD as well as those with red-green colorblindness. This colormap, cividis, enables nearly-identical visual-data interpretation to both groups, is perceptually uniform in hue and brightness, and increases in brightness linearly.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@28697 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information
lassoan committed Dec 19, 2019
1 parent 64b3833 commit 25cfb1c
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 0 deletions.
256 changes: 256 additions & 0 deletions Base/Logic/Resources/ColorFiles/Cividis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
# Inspired by matplotlib colormaps: https://matplotlib.org/users/colormaps.html (made available under CC0 license)
0 0 0 34 77 255
1 1 0 35 79 255
2 2 0 35 80 255
3 3 0 36 82 255
4 4 0 37 84 255
5 5 0 38 85 255
6 6 0 38 87 255
7 7 0 39 89 255
8 8 0 40 91 255
9 9 0 40 92 255
10 10 0 41 94 255
11 11 0 42 96 255
12 12 0 42 98 255
13 13 0 43 100 255
14 14 0 44 102 255
15 15 0 44 103 255
16 16 0 45 105 255
17 17 0 46 107 255
18 18 0 47 109 255
19 19 0 47 111 255
20 20 0 48 112 255
21 21 0 48 112 255
22 22 0 49 112 255
23 23 0 49 112 255
24 24 4 50 112 255
25 25 8 51 112 255
26 26 11 51 112 255
27 27 14 52 112 255
28 28 17 53 111 255
29 29 20 54 111 255
30 30 22 54 111 255
31 31 24 55 111 255
32 32 26 56 111 255
33 33 28 56 110 255
34 34 29 57 110 255
35 35 31 58 110 255
36 36 33 59 110 255
37 37 34 59 110 255
38 38 36 60 110 255
39 39 37 61 109 255
40 40 39 61 109 255
41 41 40 62 109 255
42 42 42 63 109 255
43 43 43 63 109 255
44 44 44 64 109 255
45 45 46 65 108 255
46 46 47 66 108 255
47 47 48 66 108 255
48 48 49 67 108 255
49 49 50 68 108 255
50 50 52 68 108 255
51 51 53 69 108 255
52 52 54 70 108 255
53 53 55 70 108 255
54 54 56 71 108 255
55 55 57 72 108 255
56 56 58 72 107 255
57 57 59 73 107 255
58 58 61 74 107 255
59 59 62 75 107 255
60 60 63 75 107 255
61 61 64 76 107 255
62 62 65 77 107 255
63 63 66 77 107 255
64 64 67 78 107 255
65 65 68 79 107 255
66 66 69 79 107 255
67 67 70 80 107 255
68 68 71 81 107 255
69 69 72 81 107 255
70 70 73 82 107 255
71 71 74 83 107 255
72 72 75 84 108 255
73 73 76 84 108 255
74 74 77 85 108 255
75 75 78 86 108 255
76 76 78 86 108 255
77 77 79 87 108 255
78 78 80 88 108 255
79 79 81 88 108 255
80 80 82 89 108 255
81 81 83 90 108 255
82 82 84 90 108 255
83 83 85 91 109 255
84 84 86 92 109 255
85 85 87 93 109 255
86 86 88 93 109 255
87 87 89 94 109 255
88 88 89 95 109 255
89 89 90 95 109 255
90 90 91 96 110 255
91 91 92 97 110 255
92 92 93 97 110 255
93 93 94 98 110 255
94 94 95 99 110 255
95 95 96 100 110 255
96 96 97 100 111 255
97 97 97 101 111 255
98 98 98 102 111 255
99 99 99 102 111 255
100 100 100 103 111 255
101 101 101 104 112 255
102 102 102 105 112 255
103 103 103 105 112 255
104 104 104 106 112 255
105 105 104 107 113 255
106 106 105 107 113 255
107 107 106 108 113 255
108 108 107 109 113 255
109 109 108 109 114 255
110 110 109 110 114 255
111 111 110 111 114 255
112 112 110 112 115 255
113 113 111 112 115 255
114 114 112 113 115 255
115 115 113 114 115 255
116 116 114 115 116 255
117 117 115 115 116 255
118 118 116 116 117 255
119 119 116 117 117 255
120 120 117 117 117 255
121 121 118 118 118 255
122 122 119 119 118 255
123 123 120 120 118 255
124 124 121 120 119 255
125 125 121 121 119 255
126 126 122 122 119 255
127 127 123 123 119 255
128 128 124 123 120 255
129 129 125 124 120 255
130 130 126 125 120 255
131 131 127 125 120 255
132 132 128 126 120 255
133 133 129 127 120 255
134 134 130 128 120 255
135 135 131 128 120 255
136 136 132 129 120 255
137 137 133 130 120 255
138 138 133 131 120 255
139 139 134 131 120 255
140 140 135 132 120 255
141 141 136 133 120 255
142 142 137 134 120 255
143 143 138 134 120 255
144 144 139 135 120 255
145 145 140 136 120 255
146 146 141 137 120 255
147 147 142 137 120 255
148 148 143 138 119 255
149 149 144 139 119 255
150 150 145 140 119 255
151 151 146 140 119 255
152 152 147 141 119 255
153 153 148 142 119 255
154 154 149 143 119 255
155 155 150 143 119 255
156 156 151 144 118 255
157 157 152 145 118 255
158 158 153 146 118 255
159 159 154 147 118 255
160 160 155 147 118 255
161 161 156 148 118 255
162 162 157 149 117 255
163 163 158 150 117 255
164 164 159 150 117 255
165 165 160 151 117 255
166 166 161 152 116 255
167 167 162 153 116 255
168 168 163 154 116 255
169 169 164 154 116 255
170 170 165 155 115 255
171 171 166 156 115 255
172 172 167 157 115 255
173 173 168 158 115 255
174 174 169 158 114 255
175 175 170 159 114 255
176 176 171 160 114 255
177 177 172 161 113 255
178 178 173 162 113 255
179 179 174 162 113 255
180 180 175 163 112 255
181 181 176 164 112 255
182 182 177 165 112 255
183 183 178 166 111 255
184 184 179 166 111 255
185 185 180 167 111 255
186 186 181 168 110 255
187 187 182 169 110 255
188 188 183 170 109 255
189 189 184 171 109 255
190 190 185 171 109 255
191 191 186 172 108 255
192 192 187 173 108 255
193 193 188 174 107 255
194 194 189 175 107 255
195 195 190 176 106 255
196 196 191 176 106 255
197 197 193 177 105 255
198 198 194 178 105 255
199 199 195 179 104 255
200 200 196 180 104 255
201 201 197 181 103 255
202 202 198 181 103 255
203 203 199 182 102 255
204 204 200 183 101 255
205 205 201 184 101 255
206 206 202 185 100 255
207 207 203 186 100 255
208 208 204 187 99 255
209 209 205 188 98 255
210 210 206 188 98 255
211 211 207 189 97 255
212 212 208 190 96 255
213 213 210 191 96 255
214 214 211 192 95 255
215 215 212 193 94 255
216 216 213 194 94 255
217 217 214 195 93 255
218 218 215 195 92 255
219 219 216 196 91 255
220 220 217 197 90 255
221 221 218 198 90 255
222 222 219 199 89 255
223 223 220 200 88 255
224 224 222 201 87 255
225 225 223 202 86 255
226 226 224 203 85 255
227 227 225 204 84 255
228 228 226 204 83 255
229 229 227 205 82 255
230 230 228 206 81 255
231 231 229 207 80 255
232 232 230 208 79 255
233 233 232 209 78 255
234 234 233 210 77 255
235 235 234 211 76 255
236 236 235 212 75 255
237 237 236 213 74 255
238 238 237 214 72 255
239 239 238 215 71 255
240 240 239 216 70 255
241 241 241 217 68 255
242 242 242 218 67 255
243 243 243 218 66 255
244 244 244 219 64 255
245 245 245 220 63 255
246 246 246 221 61 255
247 247 248 222 59 255
248 248 249 223 58 255
249 249 250 224 56 255
250 250 251 225 54 255
251 251 253 226 52 255
252 252 253 227 51 255
253 253 253 229 52 255
254 254 253 230 54 255
1 change: 1 addition & 0 deletions Libs/MRML/Logic/vtkMRMLColorLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class VTK_MRML_LOGIC_EXPORT vtkMRMLColorLogic : public vtkMRMLAbstractLogic
/// | ColorTable | None | File | GenericColors | FileGenericColors.txt | vtkMRMLColorTableNodeFileGenericColors.txt |
/// | ColorTable | Default Labels from File | File | 64Color-Nonsemantic | File64Color-Nonsemantic.txt | vtkMRMLColorTableNodeFile64Color-Nonsemantic.txt |
/// | ColorTable | Default Labels from File | File | Plasma | FilePlasma.txt | vtkMRMLColorTableNodeFilePlasma.txt |
/// | ColorTable | Default Labels from File | File | Cividis | FileCividis.txt | vtkMRMLColorTableNodeFileCividis.txt |
/// | ColorTable | Default Labels from File | File | SPL-BrainAtlas-2009-ColorFile | FileSPL-BrainAtlas-2009-ColorFile.txt | vtkMRMLColorTableNodeFileSPL-BrainAtlas-2009-ColorFile.txt |
/// | ColorTable | Default Labels from File | File | SPL-BrainAtlas-2012-ColorFile | FileSPL-BrainAtlas-2012-ColorFile.txt | vtkMRMLColorTableNodeFileSPL-BrainAtlas-2012-ColorFile.txt |
/// | ColorTable | None | File | GenericAnatomyColors | FileGenericAnatomyColors.txt | vtkMRMLColorTableNodeFileGenericAnatomyColors.txt |
Expand Down

0 comments on commit 25cfb1c

Please sign in to comment.