Luski.Net/Luski.net/Structures/Public/Color.cs
JacobTech 9f641e7429 Public Servers.
Added a bunch of API calls to use in public servers.
2023-08-21 10:58:17 -04:00

40 lines
658 B
C#

using System;
namespace Luski.net.Structures.Public;
public class Color
{
public Color(string servercol)
{
Bytes = servercol;
}
public Color(byte R, byte G, byte B, byte A)
{
Bytes = $"{Convert.ToChar(R)}{Convert.ToChar(G)}{Convert.ToChar(B)}{Convert.ToChar(A)}";
}
private string Bytes;
public string ToDB()
{
return Bytes;
}
public byte A
{
get => (byte)(Bytes[3]);
}
public byte R
{
get => (byte)(Bytes[0]);
}
public byte G
{
get => (byte)(Bytes[1]);
}
public byte B
{
get => (byte)(Bytes[2]);
}
}