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

Increase moth color blending strength by 25% and replace color blending with the intended helper function #1015

Merged
merged 3 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions Content.Shared/Humanoid/SkinColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,11 @@ public static Color TintedHues(Color color)
/// <param name="skinColor">The skin color to blend with</param>
/// <param name="blendFactor">Blending factor (0.0 to 1.0)</param>
/// <returns>Tinted hue color</returns>
public static Color TintedHuesSkin(Color color, Color skinColor, float blendFactor = 0.5f)
public static Color TintedHuesSkin(Color color, Color skinColor, float blendFactor = 0.75f)
{
blendFactor = MathHelper.Clamp(blendFactor, 0.0f, 1.0f);

var r = MathHelper.Lerp(skinColor.R, color.R, blendFactor);
var g = MathHelper.Lerp(skinColor.G, color.G, blendFactor);
var b = MathHelper.Lerp(skinColor.B, color.B, blendFactor);
var a = color.A;

return new Color(r, g, b, a);
return Color.InterpolateBetween(skinColor, color, blendFactor);
}

/// <summary>
Expand Down
Loading