3 ms·
The builtin System.Drawing.Color namespace already contains much of what you have in regards to colors to and from names. There are a lot of helpful methods av
by Meph504 8y ago
The builtin System.Drawing.Color namespace already contains much of what you have in regards to colors to and from names.
There are a lot of helpful methods available.
Color foo = Color.FromArgb(int);
int foo = Color.ToArgb();
Color foo = Color.FromName("CornflowerBlue");
Color itself also exposes
.IsKnownColor and .IsNamedColor
- nobody271 8y agoThat only works if it's the exact color. If you're one bit off it won't know.