mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +00:00
35 lines
880 B
C#
35 lines
880 B
C#
#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))]
|
|
internal struct _Color
|
|
{
|
|
#region Properties & Fields
|
|
|
|
public uint Color;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
public _Color(Color color)
|
|
: this(color.R, color.G, color.B) { }
|
|
|
|
public _Color(byte red, byte green, byte blue)
|
|
: this()
|
|
{
|
|
Color = red + ((uint)green << 8) + ((uint)blue << 16);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|