mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
New C_ColorUtil native module (src/color/Util.cpp) with the modern color helpers, all pure math/string: ConvertRGBToHSV, ConvertHSVToRGB, ConvertHSVToHSL, ConvertHSLToHSV, ConvertHSLToRGB, GenerateTextColorCode, WrapTextInColor, WrapTextInColorCode. Conventions verified in-game against a retail-family client: hue in degrees [0,360), -1 achromatic sentinel, bare AARRGGBB from GenerateTextColorCode, |c..|r wrapping. Ported the addon Color.lua / ColorUtil.lua to match retail now that the natives exist: ColorMixin:GetHSL/GenerateHexColor/WrapText* delegate to C_ColorUtil (GetHSL now returns degrees), SetRGBA defaults alpha to 1, byte getters use Round; added COLOR_FORMAT_* constants and CreateColorFromBestRGBHexString. Kept 1.12-Lua-5.0-safe syntax and the ClassicAPI-only CAPI_ApplyStandardColorGlobals / ITEM_QUALITY_COLORS bits.