Named colors
See original GitHub issueSome of the wrapped graphics APIs have concept of named colors (eg. NSColor on macOS). These could be system colors (eg. window background, border color) or custom catalog colors. Converting them to the internal Color type however loses their lazy resolution to actual RGB value (eg. the named color can have different color based on system wide dark mode / light mode). Is there any plan to expose this functionality? Even System.Drawing had it in some limited form.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
<named-color> - CSS: Cascading Style Sheets | MDN
The <named-color> CSS data type is the name of a color, such as red , blue , black , or lightseagreen . Syntactically,...
Read more >Color Names
Modern browsers support 140 named colors, which are listed below. Use them in your HTML and CSS by name, Hex color code or...
Read more >Named Colors
Color Name Hex RGB
Absolute Zero 0048BA 0, 72, 186
Acid green B0BF1A 176, 191, 26
Aero 7CB9E8 124, 185, 232
Read more >List of colors: A–F
Name Hex (RGB) Red (RGB) Green (RGB) Blue (RGB) Hue (HSL/HSV) Satur. (H...
Absolute Zero #0048BA 0% 28% 73% 217° 100%
Acid green #B0BF1A 69%...
Read more >List of named colors
This plots a list of the named colors supported in matplotlib. For more information on colors in matplotlib see. the Specifying colors tutorial;....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is a huge wart in System.Drawing.Color that needs correction. Adding something like names to the Color type causes ineffiency and complex interdependencies.
Maui (not Maui.Graphics) could have functions like
getBorderColor:unit -> Coloretc. or eventryGetColorFromOSNamedColor(name:string):Color?. That would allow users to get these colors without adding complexity to the Color type.@charlesroddie I think there’s quite a distinction between color manipulation type and abstract color description type. System.Drawing.Color tried to do both at the same time and lacked a bit on both. I didn’t ask for specific API shape or even having one type for both.
Just like R,G,B is only describing a color when interpreted in a specific color space (eg. sRGB, Adobe RGB), named colors are also meaningful only within their respective color space (eg. dark theme, light theme).
This library specifically states the goal of abstraction over native graphics libraries for drawing. CoreGraphics has concept of named colors (extensible), Windows has concept of named colors (albeit limited).