Add central color class

I didn't move _every_ color here, but most of them. The ones I left
behind are mostly just shades of gray.

Closes #126
This commit is contained in:
Drew DeVault 2017-01-09 17:18:47 -05:00
parent 4899d88d19
commit 70ecf48ca7
21 changed files with 312 additions and 246 deletions

View File

@ -1,72 +1,68 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Input; using osu.Framework.Input;
namespace osu.Game.Beatmaps.Drawables namespace osu.Game.Beatmaps.Drawables
{ {
class BeatmapPanel : Panel class BeatmapPanel : Panel
{ {
public BeatmapInfo Beatmap; public BeatmapInfo Beatmap;
private Sprite background; private Sprite background;
public Action<BeatmapPanel> GainedSelection; public Action<BeatmapPanel> GainedSelection;
public Action<BeatmapPanel> StartRequested; public Action<BeatmapPanel> StartRequested;
Color4 deselectedColour = new Color4(20, 43, 51, 255);
protected override void Selected() protected override void Selected()
{ {
base.Selected(); base.Selected();
GainedSelection?.Invoke(this); GainedSelection?.Invoke(this);
background.ColourInfo = ColourInfo.GradientVertical( background.ColourInfo = OsuColor.BeatmapPanelSelected;
new Color4(20, 43, 51, 255), }
new Color4(40, 86, 102, 255));
}
protected override void Deselected() protected override void Deselected()
{ {
base.Deselected(); base.Deselected();
background.Colour = deselectedColour; background.Colour = OsuColor.BeatmapPanelUnselected;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(InputState state)
{ {
if (State == PanelSelectedState.Selected) if (State == PanelSelectedState.Selected)
StartRequested?.Invoke(this); StartRequested?.Invoke(this);
return base.OnClick(state); return base.OnClick(state);
} }
public BeatmapPanel(BeatmapInfo beatmap) public BeatmapPanel(BeatmapInfo beatmap)
{ {
Beatmap = beatmap; Beatmap = beatmap;
Height *= 0.60f; Height *= 0.60f;
Children = new Drawable[] Children = new Drawable[]
{ {
background = new Box background = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
new Triangles new Triangles
{ {
// The border is drawn in the shader of the children. Being additive, triangles would over-emphasize // The border is drawn in the shader of the children. Being additive, triangles would over-emphasize
// the border wherever they cross it, and thus they get their own masking container without a border. // the border wherever they cross it, and thus they get their own masking container without a border.
@ -74,70 +70,70 @@ namespace osu.Game.Beatmaps.Drawables
CornerRadius = Content.CornerRadius, CornerRadius = Content.CornerRadius,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, BlendingMode = BlendingMode.Additive,
Colour = deselectedColour, Colour = OsuColor.BeatmapPanelUnselected,
}, },
new FlowContainer new FlowContainer
{ {
Padding = new MarginPadding(5), Padding = new MarginPadding(5),
Direction = FlowDirection.HorizontalOnly, Direction = FlowDirection.HorizontalOnly,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Children = new Drawable[] Children = new Drawable[]
{ {
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)) new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255))
{ {
Scale = new Vector2(1.8f), Scale = new Vector2(1.8f),
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
}, },
new FlowContainer new FlowContainer
{ {
Padding = new MarginPadding { Left = 5 }, Padding = new MarginPadding { Left = 5 },
Spacing = new Vector2(0, 5), Spacing = new Vector2(0, 5),
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Children = new Drawable[] Children = new Drawable[]
{ {
new FlowContainer new FlowContainer
{ {
Direction = FlowDirection.HorizontalOnly, Direction = FlowDirection.HorizontalOnly,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Spacing = new Vector2(4, 0), Spacing = new Vector2(4, 0),
Children = new[] Children = new[]
{ {
new SpriteText new SpriteText
{ {
Font = @"Exo2.0-Medium", Font = @"Exo2.0-Medium",
Text = beatmap.Version, Text = beatmap.Version,
TextSize = 20, TextSize = 20,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft Origin = Anchor.BottomLeft
}, },
new SpriteText new SpriteText
{ {
Font = @"Exo2.0-Medium", Font = @"Exo2.0-Medium",
Text = "mapped by", Text = "mapped by",
TextSize = 16, TextSize = 16,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft Origin = Anchor.BottomLeft
}, },
new SpriteText new SpriteText
{ {
Font = @"Exo2.0-MediumItalic", Font = @"Exo2.0-MediumItalic",
Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author}", Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author}",
TextSize = 16, TextSize = 16,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft Origin = Anchor.BottomLeft
}, },
} }
}, },
new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 } new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 }
} }
} }
} }
} }
}; };
} }
} }
} }

View File

@ -1,74 +1,74 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Beatmaps.Drawables namespace osu.Game.Beatmaps.Drawables
{ {
class BeatmapSetHeader : Panel class BeatmapSetHeader : Panel
{ {
public Action<BeatmapSetHeader> GainedSelection; public Action<BeatmapSetHeader> GainedSelection;
private SpriteText title, artist; private SpriteText title, artist;
private OsuConfigManager config; private OsuConfigManager config;
private Bindable<bool> preferUnicode; private Bindable<bool> preferUnicode;
private WorkingBeatmap beatmap; private WorkingBeatmap beatmap;
public BeatmapSetHeader(WorkingBeatmap beatmap) public BeatmapSetHeader(WorkingBeatmap beatmap)
{ {
this.beatmap = beatmap; this.beatmap = beatmap;
Children = new Drawable[] Children = new Drawable[]
{ {
new PanelBackground(beatmap) new PanelBackground(beatmap)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
new FlowContainer new FlowContainer
{ {
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 }, Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 },
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Children = new[] Children = new[]
{ {
title = new SpriteText title = new SpriteText
{ {
Font = @"Exo2.0-BoldItalic", Font = @"Exo2.0-BoldItalic",
Text = beatmap.BeatmapSetInfo.Metadata.Title, Text = beatmap.BeatmapSetInfo.Metadata.Title,
TextSize = 22, TextSize = 22,
Shadow = true, Shadow = true,
}, },
artist = new SpriteText artist = new SpriteText
{ {
Margin = new MarginPadding { Top = -1 }, Margin = new MarginPadding { Top = -1 },
Font = @"Exo2.0-SemiBoldItalic", Font = @"Exo2.0-SemiBoldItalic",
Text = beatmap.BeatmapSetInfo.Metadata.Artist, Text = beatmap.BeatmapSetInfo.Metadata.Artist,
TextSize = 17, TextSize = 17,
Shadow = true, Shadow = true,
}, },
new FlowContainer new FlowContainer
{ {
Margin = new MarginPadding { Top = 5 }, Margin = new MarginPadding { Top = 5 },
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Children = new[] Children = new[]
{ {
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)), new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(159, 198, 0, 255)),
new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(246, 101, 166, 255)), new DifficultyIcon(FontAwesome.fa_dot_circle_o, new Color4(246, 101, 166, 255)),
} }
} }
} }
} }
}; };
} }
protected override void LoadComplete() protected override void LoadComplete()
@ -81,8 +81,8 @@ namespace osu.Game.Beatmaps.Drawables
{ {
base.Selected(); base.Selected();
GainedSelection?.Invoke(this); GainedSelection?.Invoke(this);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuConfigManager config) private void load(OsuConfigManager config)
{ {
@ -90,31 +90,32 @@ namespace osu.Game.Beatmaps.Drawables
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode); preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
preferUnicode.ValueChanged += preferUnicode_changed; preferUnicode.ValueChanged += preferUnicode_changed;
preferUnicode_changed(preferUnicode, null); preferUnicode_changed(preferUnicode, null);
} }
private void preferUnicode_changed(object sender, EventArgs e)
{ private void preferUnicode_changed(object sender, EventArgs e)
title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode); {
artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode); title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode);
artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode);
} }
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)
{ {
if (preferUnicode != null) if (preferUnicode != null)
preferUnicode.ValueChanged -= preferUnicode_changed; preferUnicode.ValueChanged -= preferUnicode_changed;
base.Dispose(isDisposing); base.Dispose(isDisposing);
} }
class PanelBackground : BufferedContainer class PanelBackground : BufferedContainer
{ {
private readonly WorkingBeatmap working; private readonly WorkingBeatmap working;
public PanelBackground(WorkingBeatmap working) public PanelBackground(WorkingBeatmap working)
{ {
this.working = working; this.working = working;
CacheDrawnFrameBuffer = true; CacheDrawnFrameBuffer = true;
Children = new[] Children = new[]
{ {
new FlowContainer new FlowContainer
@ -128,34 +129,34 @@ namespace osu.Game.Beatmaps.Drawables
Children = new[] Children = new[]
{ {
// The left half with no gradient applied // The left half with no gradient applied
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.Black, Colour = Color4.Black,
Width = 0.4f, Width = 0.4f,
}, },
// Piecewise-linear gradient with 3 segments to make it appear smoother // Piecewise-linear gradient with 3 segments to make it appear smoother
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f)), ColourInfo = OsuColor.BeatmapHeaderBackgroundA,
Width = 0.05f, Width = 0.05f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f)), ColourInfo = OsuColor.BeatmapHeaderBackgroundB,
Width = 0.2f, Width = 0.2f,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ColourInfo = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0)), ColourInfo = OsuColor.BeatmapHeaderBackgroundC,
Width = 0.05f, Width = 0.05f,
}, },
} }
}, },
}; };
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -172,6 +173,6 @@ namespace osu.Game.Beatmaps.Drawables
ForceRedraw(); ForceRedraw();
}); });
} }
} }
} }
} }

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Transformations;
using osu.Framework.Input; using osu.Framework.Input;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Beatmaps.Drawables namespace osu.Game.Beatmaps.Drawables
{ {
@ -35,7 +36,7 @@ namespace osu.Game.Beatmaps.Drawables
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Masking = true, Masking = true,
CornerRadius = 10, CornerRadius = 10,
BorderColour = new Color4(221, 255, 255, 255), BorderColour = OsuColor.PanelBorder,
}); });
} }
@ -84,7 +85,7 @@ namespace osu.Game.Beatmaps.Drawables
nestedContainer.EdgeEffect = new EdgeEffect nestedContainer.EdgeEffect = new EdgeEffect
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150), Colour = OsuColor.PanelGlowSelected,
Radius = 20, Radius = 20,
Roundness = 10, Roundness = 10,
}; };
@ -98,7 +99,7 @@ namespace osu.Game.Beatmaps.Drawables
Type = EdgeEffectType.Shadow, Type = EdgeEffectType.Shadow,
Offset = new Vector2(1), Offset = new Vector2(1),
Radius = 10, Radius = 10,
Colour = new Color4(0, 0, 0, 100), Colour = OsuColor.PanelGlowUnselected,
}; };
} }

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using osu.Game.Modes.Objects; using osu.Game.Modes.Objects;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Beatmaps.Formats namespace osu.Game.Beatmaps.Formats
{ {
@ -44,11 +45,11 @@ namespace osu.Game.Beatmaps.Formats
public virtual void ApplyColours(Beatmap b) public virtual void ApplyColours(Beatmap b)
{ {
List<Color4> colours = b.ComboColors ?? new List<Color4>() { List<Color4> colours = b.ComboColors ?? new List<Color4> {
new Color4(17, 136, 170, 255), OsuColor.Combo1,
new Color4(102,136,0, 255), OsuColor.Combo2,
new Color4(204,102,0, 255), OsuColor.Combo3,
new Color4(121,9,13, 255), OsuColor.Combo4,
}; };
if (colours.Count == 0) return; if (colours.Count == 0) return;

View File

@ -0,0 +1,62 @@
using System;
using OpenTK.Graphics;
using osu.Framework.Graphics.Colour;
namespace osu.Game.Graphics
{
public static class OsuColor
{
public static readonly Color4 OsuPink = new Color4(255, 102, 170, 255);
public static readonly Color4 BeatmapPanelUnselected = new Color4(20, 43, 51, 255);
public static readonly ColourInfo BeatmapPanelSelected = ColourInfo.GradientVertical(
new Color4(20, 43, 51, 255),
new Color4(40, 86, 102, 255));
public static readonly ColourInfo BeatmapHeaderBackgroundA =
ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.9f));
public static readonly ColourInfo BeatmapHeaderBackgroundB =
ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.9f), new Color4(0f, 0f, 0f, 0.1f));
public static readonly ColourInfo BeatmapHeaderBackgroundC =
ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.1f), new Color4(0, 0, 0, 0));
public static readonly Color4 PanelBorder = new Color4(221, 255, 255, 255);
public static readonly Color4 PanelGlowSelected = new Color4(130, 204, 255, 150);
public static readonly Color4 PanelGlowUnselected = new Color4(0, 0, 0, 100);
public static readonly Color4 Combo1 = new Color4(17, 136, 170, 255);
public static readonly Color4 Combo2 = new Color4(102, 136, 0, 255);
public static readonly Color4 Combo3 = new Color4(204, 102, 0, 255);
public static readonly Color4 Combo4 = new Color4(121, 9, 13, 255);
public static readonly Color4 BackButtonLeft = new Color4(195, 40, 140, 255);
public static readonly Color4 BackButtonRight = new Color4(238, 51, 153, 255);
public static readonly Color4 Button = new Color4(14, 132, 165, 255);
public static readonly Color4 PlayButton = new Color4(238, 51, 153, 255);
public static readonly Color4 MusicControllerBackground = new Color4(150, 150, 150, 255);
public static readonly Color4 MusicControllerProgress = new Color4(255, 204, 34, 255);
public static readonly Color4 CheckBoxHover = new Color4(255, 221, 238, 255);
public static readonly Color4 CheckBoxGlow = new Color4(187, 17, 119, 0);
public static readonly Color4 DropDownBackground = new Color4(0, 0, 0, 128);
public static readonly Color4 DropDownHover = new Color4(187, 17, 119, 255);
public static readonly Color4 OptionSectionHeader = new Color4(247, 198, 35, 255);
public static readonly Color4 SidebarButtonBackground = new Color4(60, 60, 60, 255);
public static readonly Color4 SidebarButtonSelectionIndicator = new Color4(247, 198, 35, 255);
public static readonly Color4 SliderbarBackground = new Color4(255, 102, 170, 255);
public static readonly Color4 SliderbarNub = new Color4(255, 102, 170, 255);
public static readonly Color4 ToolbarModeButtonIcon = new Color4(255, 194, 224, 255);
public static readonly Color4 ToolbarModeButtonIconActiveGlow = new Color4(255, 194, 224, 100);
public static readonly Color4 BeatmapInfoWedgeBorder = new Color4(221, 255, 255, 255);
public static readonly Color4 BeatmapInfoWedgeGlow = new Color4(130, 204, 255, 150);
}
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Graphics.UserInterface
leftBox = new Box leftBox = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = new Color4(195, 40, 140, 255), Colour = OsuColor.BackButtonLeft,
Shear = new Vector2(shear, 0), Shear = new Vector2(shear, 0),
}, },
icon = new TextAwesome icon = new TextAwesome
@ -67,7 +67,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
rightBox = new Box rightBox = new Box
{ {
Colour = new Color4(238, 51, 153, 255), Colour = OsuColor.BackButtonRight,
Origin = Anchor.TopLeft, Origin = Anchor.TopLeft,
Anchor = Anchor.TopLeft, Anchor = Anchor.TopLeft,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,

View File

@ -12,7 +12,7 @@ namespace osu.Game.Graphics.UserInterface
public OsuButton() public OsuButton()
{ {
Height = 25; Height = 25;
Colour = new Color4(14, 132, 165, 255); Colour = OsuColor.Button;
} }
} }
} }

View File

@ -4,6 +4,7 @@
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Samples;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Modes.Objects namespace osu.Game.Modes.Objects
{ {
@ -17,7 +18,7 @@ namespace osu.Game.Modes.Objects
public bool NewCombo { get; set; } public bool NewCombo { get; set; }
public Color4 Colour = new Color4(17, 136, 170, 255); public Color4 Colour = OsuColor.Combo1;
public double Duration => EndTime - StartTime; public double Duration => EndTime - StartTime;

View File

@ -35,7 +35,7 @@ namespace osu.Game.Online.Chat.Drawables
{ {
Text = Message.Timestamp.LocalDateTime.ToLongTimeString(), Text = Message.Timestamp.LocalDateTime.ToLongTimeString(),
TextSize = text_size, TextSize = text_size,
Colour = new Color4(128, 128, 128, 255) Colour = Color4.Gray
}, },
new SpriteText new SpriteText
{ {

View File

@ -171,7 +171,7 @@ namespace osu.Game.Overlays
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Height = 10, Height = 10,
Colour = new Color4(255, 204, 34, 255), Colour = OsuColor.MusicControllerProgress,
SeekRequested = seek SeekRequested = seek
} }
}; };
@ -393,7 +393,7 @@ namespace osu.Game.Overlays
{ {
sprite = new Sprite sprite = new Sprite
{ {
Colour = new Color4(150, 150, 150, 255), Colour = OsuColor.MusicControllerBackground,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
}, },
new Box new Box

View File

@ -16,6 +16,7 @@ using osu.Framework.Graphics.UserInterface;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Options namespace osu.Game.Overlays.Options
{ {
@ -141,21 +142,17 @@ namespace osu.Game.Overlays.Options
const float border_width = 3; const float border_width = 3;
Color4 hoverColour = new Color4(255, 221, 238, 255);
Color4 defaultColour = new Color4(255, 102, 170, 255);
Color4 glowColour = new Color4(187, 17, 119, 0);
public Light() public Light()
{ {
Size = new Vector2(40, 12); Size = new Vector2(40, 12);
Masking = true; Masking = true;
Colour = defaultColour; Colour = OsuColor.OsuPink;
EdgeEffect = new EdgeEffect EdgeEffect = new EdgeEffect
{ {
Colour = glowColour, Colour = OsuColor.CheckBoxGlow,
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Radius = 10, Radius = 10,
Roundness = 8, Roundness = 8,
@ -182,13 +179,13 @@ namespace osu.Game.Overlays.Options
{ {
if (value) if (value)
{ {
FadeColour(hoverColour, 500, EasingTypes.OutQuint); FadeColour(OsuColor.CheckBoxHover, 500, EasingTypes.OutQuint);
FadeGlowTo(1, 500, EasingTypes.OutQuint); FadeGlowTo(1, 500, EasingTypes.OutQuint);
} }
else else
{ {
FadeGlowTo(0, 500); FadeGlowTo(0, 500);
FadeColour(defaultColour, 500); FadeColour(OsuColor.OsuPink, 500);
} }
} }
} }

View File

@ -131,8 +131,8 @@ namespace osu.Game.Overlays.Options
private class StyledDropDownComboBox : DropDownComboBox private class StyledDropDownComboBox : DropDownComboBox
{ {
protected override Color4 BackgroundColour => new Color4(0, 0, 0, 128); protected override Color4 BackgroundColour => OsuColor.DropDownBackground;
protected override Color4 BackgroundColourHover => new Color4(187, 17, 119, 255); protected override Color4 BackgroundColourHover => OsuColor.DropDownHover;
private SpriteText label; private SpriteText label;
protected override string Label protected override string Label
@ -161,9 +161,9 @@ namespace osu.Game.Overlays.Options
private class StyledDropDownMenuItem<U> : DropDownMenuItem<U> private class StyledDropDownMenuItem<U> : DropDownMenuItem<U>
{ {
protected override Color4 BackgroundColour => new Color4(0, 0, 0, 128); protected override Color4 BackgroundColour => OsuColor.DropDownBackground;
protected override Color4 BackgroundColourSelected => new Color4(0, 0, 0, 128); protected override Color4 BackgroundColourSelected => OsuColor.DropDownBackground;
protected override Color4 BackgroundColourHover => new Color4(187, 17, 119, 255); protected override Color4 BackgroundColourHover => OsuColor.DropDownHover;
public StyledDropDownMenuItem(string text, U value) : base(text, value) public StyledDropDownMenuItem(string text, U value) : base(text, value)
{ {

View File

@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Options
new SpriteText new SpriteText
{ {
TextSize = headerSize, TextSize = headerSize,
Colour = new Color4(247, 198, 35, 255), Colour = OsuColor.OptionSectionHeader,
Text = Header, Text = Header,
}, },
content = new FlowContainer content = new FlowContainer

View File

@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Options
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive, BlendingMode = BlendingMode.Additive,
Colour = new Color4(60, 60, 60, 255), Colour = OsuColor.SidebarButtonBackground,
Alpha = 0, Alpha = 0,
}, },
new Container new Container
@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Options
Width = 5, Width = 5,
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Colour = new Color4(247, 198, 35, 255) Colour = OsuColor.SidebarButtonSelectionIndicator
} }
}; };
} }

View File

@ -16,6 +16,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Options namespace osu.Game.Overlays.Options
{ {
@ -84,7 +85,7 @@ namespace osu.Game.Overlays.Options
RelativeSizeAxes = Axes.None, RelativeSizeAxes = Axes.None,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Colour = new Color4(255, 102, 170, 255), Colour = OsuColor.OsuPink,
}, },
rightBox = new Box rightBox = new Box
{ {
@ -92,7 +93,7 @@ namespace osu.Game.Overlays.Options
RelativeSizeAxes = Axes.None, RelativeSizeAxes = Axes.None,
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Colour = new Color4(255, 102, 170, 255), Colour = OsuColor.SliderbarBackground,
Alpha = 0.5f, Alpha = 0.5f,
}, },
nub = new Container nub = new Container
@ -104,13 +105,14 @@ namespace osu.Game.Overlays.Options
AutoSizeAxes = Axes.None, AutoSizeAxes = Axes.None,
RelativeSizeAxes = Axes.None, RelativeSizeAxes = Axes.None,
Masking = true, Masking = true,
BorderColour = new Color4(255, 102, 170, 255), BorderColour = OsuColor.SliderbarNub,
BorderThickness = 3, BorderThickness = 3,
Children = new[] Children = new[]
{ {
new Box new Box
{ {
Colour = new Color4(255, 102, 170, 0), Colour = new Color4(OsuColor.SliderbarNub.R,
OsuColor.SliderbarNub.G, OsuColor.SliderbarNub.B, 0),
RelativeSizeAxes = Axes.Both RelativeSizeAxes = Axes.Both
} }
} }

View File

@ -23,6 +23,7 @@ using osu.Game.Overlays.Options.Graphics;
using osu.Game.Overlays.Options.Input; using osu.Game.Overlays.Options.Input;
using osu.Game.Overlays.Options.Online; using osu.Game.Overlays.Options.Online;
using System; using System;
using osu.Game.Graphics;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {
@ -94,7 +95,7 @@ namespace osu.Game.Overlays
}, },
new SpriteText new SpriteText
{ {
Colour = new Color4(255, 102, 170, 255), Colour = OsuColor.OsuPink,
Text = "Change the way osu! behaves", Text = "Change the way osu! behaves",
TextSize = 18, TextSize = 18,
Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 }, Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 },

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Toolbar
DrawableIcon.EdgeEffect = new EdgeEffect DrawableIcon.EdgeEffect = new EdgeEffect
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = new Color4(255, 194, 224, 100), Colour = OsuColor.ToolbarModeButtonIconActiveGlow,
Radius = 15, Radius = 15,
Roundness = 15, Roundness = 15,
}; };
@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar
else else
{ {
DrawableIcon.Masking = false; DrawableIcon.Masking = false;
DrawableIcon.Colour = new Color4(255, 194, 224, 255); DrawableIcon.Colour = OsuColor.ToolbarModeButtonIcon;
} }
} }
} }

View File

@ -13,6 +13,7 @@ using osu.Game.Graphics.Backgrounds;
using osu.Game.Modes; using osu.Game.Modes;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar namespace osu.Game.Overlays.Toolbar
{ {
@ -52,7 +53,7 @@ namespace osu.Game.Overlays.Toolbar
EdgeEffect = new EdgeEffect EdgeEffect = new EdgeEffect
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = new Color4(255, 194, 224, 100), Colour = OsuColor.ToolbarModeButtonIconActiveGlow,
Radius = 15, Radius = 15,
Roundness = 15, Roundness = 15,
}, },

View File

@ -14,6 +14,7 @@ using osu.Game.Beatmaps;
using osu.Game.Database; using osu.Game.Database;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
{ {
@ -29,12 +30,12 @@ namespace osu.Game.Screens.Select
{ {
Shear = wedged_container_shear; Shear = wedged_container_shear;
Masking = true; Masking = true;
BorderColour = new Color4(221, 255, 255, 255); BorderColour = OsuColor.BeatmapInfoWedgeBorder;
BorderThickness = 2.5f; BorderThickness = 2.5f;
EdgeEffect = new EdgeEffect EdgeEffect = new EdgeEffect
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150), Colour = OsuColor.BeatmapInfoWedgeGlow,
Radius = 20, Radius = 20,
Roundness = 15, Roundness = 15,
}; };

View File

@ -30,6 +30,7 @@ using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Input; using osu.Framework.Input;
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Graphics;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
{ {
@ -142,7 +143,7 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = 100, Width = 100,
Text = "Play", Text = "Play",
Colour = new Color4(238, 51, 153, 255), Colour = OsuColor.PlayButton,
Action = start Action = start
}, },
} }

View File

@ -231,6 +231,7 @@
<Compile Include="Configuration\ScreenshotFormat.cs" /> <Compile Include="Configuration\ScreenshotFormat.cs" />
<Compile Include="Configuration\FrameSync.cs" /> <Compile Include="Configuration\FrameSync.cs" />
<Compile Include="Configuration\ConfineMouseMode.cs" /> <Compile Include="Configuration\ConfineMouseMode.cs" />
<Compile Include="Graphics\OsuColor.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj"> <ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj">