Adjust colours a bit to make hold note bodies more accented

This commit is contained in:
Dean Herbert 2023-03-09 20:42:59 +09:00
parent 2ad531f263
commit e12ab165b8
2 changed files with 15 additions and 6 deletions

View File

@ -58,7 +58,7 @@ private void load(DrawableHitObject? drawableObject)
AccentColour.BindValueChanged(colour =>
{
background.Colour = colour.NewValue.Darken(1.2f);
background.Colour = colour.NewValue.Darken(0.6f);
foreground.Colour = colour.NewValue.Opacity(0.2f);
}, true);

View File

@ -21,7 +21,8 @@ internal partial class ArgonHoldNoteTailPiece : CompositeDrawable
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
private readonly Box shadow;
private readonly Box shadeForeground;
private readonly Box foreground;
private readonly Box foregroundAdditive;
public ArgonHoldNoteTailPiece()
{
@ -55,10 +56,16 @@ public ArgonHoldNoteTailPiece()
Masking = true,
Children = new Drawable[]
{
shadeForeground = new Box
foreground = new Box
{
RelativeSizeAxes = Axes.Both,
},
foregroundAdditive = new Box
{
RelativeSizeAxes = Axes.Both,
Blending = BlendingParameters.Additive,
Height = 0.5f,
},
},
},
}
@ -86,9 +93,11 @@ private void onDirectionChanged(ValueChangedEvent<ScrollingDirection> direction)
private void onAccentChanged(ValueChangedEvent<Color4> accent)
{
shadeForeground.Colour = ColourInfo.GradientVertical(
accent.NewValue.Darken(0.2f),
accent.NewValue.Darken(1.2f) // matches body
foreground.Colour = accent.NewValue.Darken(0.6f); // matches body
foregroundAdditive.Colour = ColourInfo.GradientVertical(
accent.NewValue.Opacity(0.4f),
accent.NewValue.Opacity(0)
);
}
}