|
Whoops missed the leading FF in Goldenrod
|
|
|
|
|
There are colors missing - looks like G through L. For instance, where is Gold, Gray, Green... etc.? The colors skip from DarkSlateGray to LightSalmon.
DarkTurquoise = 0xFF00CED1,
DarkViolet = 0xFF9400D3,
DeepPink = 0xFFFF1493,
DeepSkyBlue = 0xFF00BFFF,
DimGray = 0xFF696969,
DodgerBlue = 0xFF1E90FF,
Firebrick = 0xFFB22222,
FloralWhite = 0xFFFFFAF0,
ForestGreen = 0xFF228B22,
Fuchsia = 0xFFFF00FF,
Gainsboro = 0xFFDCDCDC,
GhostWhite = 0xFFF8F8FF,
Gold = 0xFFFFD700,
Goldenrod = 0xDAA520,
Gray = 0xFF808080,
Green = 0xFF008000,
GreenYellow = 0xFFADFF2F,
Honeydew = 0xFFF0FFF0,
HotPink = 0xFFFF69B4,
IndianRed = 0xFFCD5C5C,
Indigo = 0xFF4B0082,
Ivory = 0xFFFFFFF0,
Khaki = 0xFFF0E68C,
Lavender = 0xFFE6E6FA,
LavenderBlush = 0xFFFFF0F5,
LawnGreen = 0xFF7CFC00,
LemonChiffon = 0xFFFFFACD,
LightBlue = 0xFFADD8E6,
LightCoral = 0xFFF08080,
LightCyan = 0xFFE0FFFF,
LightGoldenrodYellow = 0xFFFAFAD2,
LightGray = 0xFFD3D3D3,
LightGreen = 0xFF90EE90,
LightPink = 0xFFFFB6C1,
I do not know if more are missing.
|
|
|
|
|
Since my alternative doesn't contain a list of colours I can only assume that you have replied to me instead of to JSOP (The OP).
In any event, I think that John's code was intended to demonstrate the principal, rather than to be a cut and paste solution.
I could be wrong on any or all of these statements.
|
|
|
|
|
Hey Henry, look at my 3rd edit. It's ultimately the best solution I've found - I was just too lazy to implement it at first.
|
|
|
|
|
May be not. As eventually someone has to iterate through that list (the implementation of Fill maybe). But overall I do not think performance is a major consideration here.
But it is elegant nonetheless. That is what I love about community coding .
|
|
|
|
|
Look at my 2nd edit. I think it will be faster than iterating through a list.
|
|
|
|