public static BaseColor DecodeColor(String s) { if (s == null) return null; s = s.ToLowerInvariant().Trim(); try { return WebColors.GetRGBColor(s); } catch { return null; } }