mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

Allow custom hex color when opening plot options #848

Closed robertapplin closed 1 year ago

robertapplin commented 1 year ago

Description of work: This PR ensures the color_to_name and name_to_color will return the passed in string if the string is a valid hex code provided by a user. This avoids raising a value error when the color isn't one of the basic types, but is still a color.

To test: Follow the instructions in the issue to test. Click Ok in the plot options to ensure no error when the users custom color is still selected.

Fixes #847