2022-06-27 13:02:31 +08:00

50 lines
1.2 KiB
C#

using System.Drawing;
using LemonUI.Elements;
namespace LemonUI.Menus
{
/// <summary>
/// Represents the Color Information shown on the Panel.
/// </summary>
public class NativeColorData
{
#region Internal Fields
internal readonly ScaledRectangle rectangle = new ScaledRectangle(PointF.Empty, SizeF.Empty);
#endregion
#region Public Properties
/// <summary>
/// The name of the color.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The RGBA values of the color.
/// </summary>
public Color Color
{
get => rectangle.Color;
set => rectangle.Color = value;
}
#endregion
#region Constructor
/// <summary>
/// Creates a new Color Panel information.
/// </summary>
/// <param name="name">The name of the color.</param>
/// <param name="color">The RGBA values of the color.</param>
public NativeColorData(string name, Color color)
{
Name = name;
rectangle.Color = color;
}
#endregion
}
}