Пример #1
0
 public static AnyColor Srgb(SrgbColor c) => new AnyColor
 {
     kind = ColorKind.Srgb, srgb = c
 };
Пример #2
0
 /// <summary>
 /// Parses color in RGB, RGBA, RRGGBB or RRGGBBAA format
 /// </summary>
 /// <param name="hex"></param>
 /// <returns></returns>
 public static AnyColor FromHexSrgb(string hex) => new AnyColor
 {
     kind = ColorKind.Srgb, srgb = SrgbColor.FromHex(hex)
 };