Commit 6b31f26
authored
Add html colors "grey" in addition to "gray"
HTML supports both spellings "gray" and "grey" (https://www.w3schools.com/colors/colors_names.asp)
There are 7 different types of gray/grey but attempting to use any of the grey versions will raise:
TraitError: The 'value' trait of a ColorPicker instance expected a valid HTML color, not the str 'grey'.
The affected colors are: `['darkgrey', 'darkslategrey', 'dimgrey', 'grey', 'lightgrey', 'lightslategrey', 'slategrey']`
For the ColorPicker widget the default behavior in case of a wrong color (eg. "asdf") is to do nothing, but inputting any of the greys will raise the above exception.
Adding the grey versions of to `_color_names` in `trait_types.py` will allow the grey names to go through the name check and render the same way as the gray counterpart.1 parent e1c4664 commit 6b31f26
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments