| File: _generated\41\Windows.Win32.COLORREF.g.cs | Web Access |
| Project: src\winforms\src\System.Private.Windows.Core\src\Microsoft.Private.Windows.Core.csproj (Microsoft.Private.Windows.Core) |
// ------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> // ------------------------------------------------------------------------------ #pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981,SYSLIB1092,CS3021,CS3019 using global::System; using global::System.Diagnostics; using global::System.Diagnostics.CodeAnalysis; using global::System.Runtime.CompilerServices; using global::System.Runtime.InteropServices; using global::System.Runtime.Versioning; using winmdroot = global::Windows.Win32; namespace Windows.Win32 { namespace Foundation { /// <summary>The COLORREF value is used to specify an RGB color.</summary> /// <remarks> /// <para>When specifying an explicit [RGB](/windows/desktop/api/Wingdi/nf-wingdi-rgb) color, the **COLORREF** value has the following hexadecimal form: `0x00bbggrr` The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. To create a **COLORREF** color value, use the [RGB](/windows/desktop/api/Wingdi/nf-wingdi-rgb) macro. To extract the individual values for the red, green, and blue components of a color value, use the [**GetRValue**](/windows/desktop/api/Wingdi/nf-wingdi-getrvalue), [GetGValue](/windows/desktop/api/Wingdi/nf-wingdi-getgvalue), and [GetBValue](/windows/desktop/api/Wingdi/nf-wingdi-getbvalue) macros, respectively.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/gdi/colorref#">Read more on learn.microsoft.com</see>.</para> /// </remarks> [DebuggerDisplay("{Value}")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal readonly partial struct COLORREF : IEquatable<COLORREF> { internal readonly uint Value; internal COLORREF(uint value) => this.Value = value; public static implicit operator uint(COLORREF value) => value.Value; public static explicit operator COLORREF(uint value) => new COLORREF(value); public static bool operator ==(COLORREF left, COLORREF right) => left.Value == right.Value; public static bool operator !=(COLORREF left, COLORREF right) => !(left == right); public bool Equals(COLORREF other) => this.Value == other.Value; public override bool Equals(object obj) => obj is COLORREF other && this.Equals(other); public override int GetHashCode() => this.Value.GetHashCode(); public override string ToString() => $"0x{this.Value:x}"; } } }