Add html colors "grey" in addition to "gray" #3671
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
intrait_types.py
will allow the grey names to go through the name check and render the same way as the gray counterpart.Simple test code
Output from current version:

Output from new version:
