public Color this[string colorName] { get { IntPtr name = IntPtr.Zero; UInt32 colorType; try { name = Marshal.StringToHGlobalUni("Immersive" + colorName); colorType = UxTheme.GetImmersiveColorTypeFromName(name); if (colorType == 0xFFFFFFFF) { throw new InvalidOperationException(); } } finally { if (name != IntPtr.Zero) { Marshal.FreeHGlobal(name); name = IntPtr.Zero; } } return(this[colorType]); } }