2018-07-18 07:35:06 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using OpenTK.Graphics;
|
2018-07-20 01:07:24 +08:00
|
|
|
|
using osu.Framework.Graphics.Colour;
|
|
|
|
|
using System.Collections.Generic;
|
2018-07-18 07:35:06 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Graphics
|
|
|
|
|
{
|
|
|
|
|
public class StreamColour
|
|
|
|
|
{
|
2018-07-19 01:32:15 +08:00
|
|
|
|
public static readonly Color4 STABLE = new Color4(102, 204, 255, 255);
|
|
|
|
|
public static readonly Color4 STABLEFALLBACK = new Color4(34, 153, 187, 255);
|
|
|
|
|
public static readonly Color4 BETA = new Color4(255, 221, 85, 255);
|
|
|
|
|
public static readonly Color4 CUTTINGEDGE = new Color4(238, 170, 0, 255);
|
|
|
|
|
public static readonly Color4 LAZER = new Color4(237, 18, 33, 255);
|
|
|
|
|
public static readonly Color4 WEB = new Color4(136, 102, 238, 255);
|
2018-07-20 01:07:24 +08:00
|
|
|
|
|
|
|
|
|
private static readonly Dictionary<string, ColourInfo> colours = new Dictionary<string, ColourInfo>
|
|
|
|
|
{
|
|
|
|
|
{ "stable40", STABLE },
|
|
|
|
|
{ "stable", STABLEFALLBACK },
|
|
|
|
|
{ "beta40", BETA },
|
|
|
|
|
{ "cuttingedge", CUTTINGEDGE },
|
|
|
|
|
{ "lazer", LAZER },
|
|
|
|
|
{ "web", WEB },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public static ColourInfo FromStreamName(string name)
|
|
|
|
|
{
|
|
|
|
|
if (colours.TryGetValue(name, out ColourInfo colour))
|
|
|
|
|
return colour;
|
|
|
|
|
else return new Color4(255, 255, 255, 255);
|
|
|
|
|
}
|
2018-07-18 07:35:06 +08:00
|
|
|
|
}
|
|
|
|
|
}
|