public Hue([NotNull] string swatch, [NotNull] string name, Color foreground, Color background) { if (swatch == null) { throw new ArgumentNullException(nameof(swatch)); } if (name == null) { throw new ArgumentNullException(nameof(name)); } Key = new HueKey(swatch, name); Swatch = swatch; Name = name; Foreground = foreground; Background = background; ForegroundBrush = new SolidColorBrush(foreground); ForegroundBrush.Freeze(); BackgroundBrush = new SolidColorBrush(background); BackgroundBrush.Freeze(); }
private Hue() { Swatch = "<None>"; Name = "<None>"; Key = new HueKey(Swatch, Name); }