mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
6f36da7aa1
- GetStringColor: memoize via a metatable __index cache (single lookup on hits) and store numeric components so ColorMixin comparisons/arithmetic behave, not just setter coercion. - GetStringColorObject: new accessor returning a cached, shared read-only ColorMixin for callers that want an object instead of raw values. - rgbhex: memoize the markup keyed on the byte values that actually determine the output (Round(x*255)), so continuously-varying inputs like health gradients collapse onto a bounded set instead of leaking a cache entry per shade. Build misses via C_ColorUtil.GenerateTextColorCode on a plain table instead of allocating a throwaway ColorMixin. Fix a latent bug where the r/g/b/a temporaries were file-scoped, so a malformed input returned the previous call's color instead of an empty string.