1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Add gradient to hide subtractive colour issues

Good thing is looks better than without.
This commit is contained in:
Dean Herbert 2020-09-29 17:22:47 +09:00
parent 8d8d45a0c0
commit c47652c97a

View File

@ -8,6 +8,7 @@ using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Primitives;
@ -182,7 +183,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
comboColour = drawableHitObject.AccentColour.GetBoundCopy();
comboColour.BindValueChanged(colour =>
{
mainComponents.Colour = drawableHitObject.AccentColour.Value;
mainComponents.Colour = ColourInfo.GradientHorizontal(drawableHitObject.AccentColour.Value, Color4.White);
var col = mainComponents.Colour.AverageColour.Linear;
float brightness = col.R + col.G + col.B;