public void TestFromRgbaB() { var color = FinColor.FromRgbaB(1, 2, 3, 4); Assert.AreEqual(1, color.Rb); Assert.AreEqual(2, color.Gb); Assert.AreEqual(3, color.Bb); Assert.AreEqual(4, color.Ab); }
public static FinColor FromRgbaF(float r, float g, float b, float a) => FinColor.FromRgbaB((byte)(r * 255), (byte)(g * 255), (byte)(b * 255), (byte)(a * 255));
public static FinColor FromCColor(Color color) => FinColor.FromRgbaB(color.R, color.G, color.B, color.A);
public static FinColor FromRgbB(byte r, byte g, byte b) => FinColor.FromRgbaB(r, g, b, 255);