Files
AetherBags/KamiToolKit/Classes/ColorHelper.cs
T
KnackAtNite 8db4ce6094
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled
Initial commit: AetherBags + KamiToolKit for FC Gitea
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 14:46:31 -05:00

19 lines
571 B
C#

using System.Numerics;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace KamiToolKit.Classes;
public static unsafe class ColorHelper {
public static Vector4 GetColor(uint colorId)
=> ConvertToVector4(AtkStage.Instance()->AtkUIColorHolder->GetColor(true, colorId));
private static Vector4 ConvertToVector4(uint color) {
var a = (byte)(color >> 24);
var b = (byte)(color >> 16);
var g = (byte)(color >> 8);
var r = (byte)color;
return new Vector4(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
}
}