-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy path_Color.cs
28 lines (20 loc) · 878 Bytes
/
_Color.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma warning disable 169 // Field 'x' is never used
#pragma warning disable 414 // Field 'x' is assigned but its value never used
#pragma warning disable 649 // Field 'x' is never assigned
// ReSharper disable MemberCanBePrivate.Global
using System.Runtime.InteropServices;
using RGB.NET.Core;
namespace RGB.NET.Devices.Razer.Native;
// ReSharper disable once InconsistentNaming
[StructLayout(LayoutKind.Sequential, Size = sizeof(uint))]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Native-naming")]
internal struct _Color(byte red, byte green, byte blue)
{
#region Properties & Fields
public uint Color = red + ((uint)green << 8) + ((uint)blue << 16);
#endregion
#region Constructors
public _Color(Color color)
: this(color.GetR(), color.GetG(), color.GetB()) { }
#endregion
}