Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 7, 2023

Conversation

MnFeN
Copy link
Contributor

@MnFeN MnFeN commented May 4, 2023

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

Corrected the type mismatch between System.Drawing.Color (R/G/B: 0-255) and the custom Scarborogh.Drawing.Color (R/G/B: 0.0f-1.0f) struct.
@MnFeN MnFeN changed the title Update ScarboroughText.cs Fix an RGB Component Conversion Bug of Text Aura Background Color May 4, 2023
@paissaheavyindustries paissaheavyindustries merged commit 7d7469c into paissaheavyindustries:master May 7, 2023
@paissaheavyindustries
Copy link
Owner

Good catch, thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants