public void RemoveColour(Color c) { if (Colours.ContainsKey(c)) { Colours.Remove(c); } }
public IColourInfo GetLeastCommonColourInfo(bool matchWhenChecked) { Color c = GetLeastCommonColour(matchWhenChecked); if (Colours.ContainsKey(c)) { return(Colours[c]); } return(null); }
public override void Parse(XElement definition) { HasAlpha = TryParseBool(definition, "HasAlpha", true); Default = definition.Attribute("Default")?.Value?.ToString(); if (Default == null) { Default = HasAlpha ? "255,255,255,255" : "255,255,255"; } else { if (Colours.ContainsKey(Default)) { Default = Colours[Default]; if (HasAlpha) { Default += ",255"; } } } }