On 10 October 2016 at 23:00, Andrea Fontana via Digitalmars-d <[email protected]> wrote: > On Monday, 10 October 2016 at 08:44:49 UTC, Manu wrote: > > From doc: > colorFromString Create a color from a string. May be a hex color in the > standard forms: (#/$)rgb/argb/rrggbb/aarrggbb May also be the name of any > color from the Colors enum. > > It seems it reads just rgb. (+ enum) > > I think that: > colorFromString("red"); > colorFromString!"rgb"("#3212ff"); > colorFromString!"bgra"("#ff1232dd"); > > makes more sense. > > Andrea
Why? I see no value in that function being a template... It's not like you can confuse "#FF0080" and "LightGoldenrodYellow". As far as I know, there's no possible ambiguity in colour strings, so why make them separate functions?
