Making a static member for each one of 140 HTML/CSS colors would prevent any potential for typos and allow nice code completion when one runs out imagination.
Color struct is currently implemented as an enum which makes it impossible to write an extension that would define a new one. Instead, it would be better to re-implement it as a struct with static members. This achieves the same level of user auto-completion convenience and much more extensible.
It would be also nice to add the full list with colored background to the documentation. XCode probably won't render it but Jazzy will and it makes the cross referencing much more enjoyable.
Making a static member for each one of 140 HTML/CSS colors would prevent any potential for typos and allow nice code completion when one runs out imagination.
Color
struct is currently implemented as an enum which makes it impossible to write an extension that would define a new one. Instead, it would be better to re-implement it as a struct with static members. This achieves the same level of user auto-completion convenience and much more extensible.It would be also nice to add the full list with colored background to the documentation. XCode probably won't render it but Jazzy will and it makes the cross referencing much more enjoyable.
Here's a list a full list of supported HTML/CSS color names with their hex representations: https://www.w3schools.com/colors/colors_names.asp