paissaheavyindustries / Triggernometry

Triggernometry is a plugin for Advanced Combat Tracker, intended to extend its built-in trigger system with a variety of different actions and configuration options.
MIT License
253 stars 48 forks source link

Fix an RGB Component Conversion Bug of Text Aura Background Color #94

Closed MnFeN closed 1 year ago

MnFeN commented 1 year ago

Corrected the type mismatch between System.Drawing.Color (R/G/B: byte) and the custom Scarborough.Drawing.Color (R/G/B: 0.0f-1.0f) struct.

Original: _bgColor.R = _BackgroundColor.R; Fixed: _bgColor.R = _BackgroundColor.R / 255.0f;

The original code would convert any input non-zero R/G/B value to maximum when displaying a text aura. e.g. background color #0055FF would be displayed as #00FFFF.

image example: https://discord.com/channels/374517624228544512/374555392119930882/1078119169544953864

paissaheavyindustries commented 1 year ago

Good catch, thank you for the PR!