On Tuesday, 13 September 2016 at 02:50:02 UTC, Manu wrote:
std.conv.to seems to 'just work' for color type conversion.I'd like to support string -> color conversion via std.conv.to; ie:auto c = "#FFFF00".to!RGB8; Is there a simple way to do that?
yes. just define a ctor that accepts string, and you're there. it works both for classes and structs.