Class ConsoleColors
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
The colour each kind of console line is drawn in, as data.
public static class ConsoleColors
- Inheritance
-
ConsoleColors
- Inherited Members
Remarks
Free of any UI framework, the same split NotificationPalette keeps from
NotificationBrushes: hex strings are data and can be referenced from
AppSettings, which is serialized to settings.json and should not know Avalonia
exists. The brushes are built next door in ConsolePalette.
Four of the six kinds take their colour from the notification settings, on purpose: red should mean the same thing in a toast and in the console, and asking somebody to pick "the error colour" twice is asking for an app that contradicts itself. Only chat and player events are the console's own, because notifications have no equivalent of either.
Two kinds are deliberately not configurable at all. Ordinary output keeps the grey it has always had — it is the vast majority of every log, and colouring all of it would be the same as colouring none of it. A command you typed is white, because it is the one thing on screen that came from you and not from the server.
Fields
Command
A command you typed, echoed back.
public const string Command = "#FFFFFF"
Field Value
DefaultChat
Player chat. Distinct from everything the server says on its own.
public const string DefaultChat = "#9CDCFE"
Field Value
DefaultPlayers
Somebody joining, leaving or dying.
public const string DefaultPlayers = "#C5A5F5"
Field Value
Info
Ordinary server output: the grey the console has always used.
public const string Info = "#DDDDDD"
Field Value
Methods
HexFor(ConsoleLineKind, NotificationSettings?, string?, string?)
The hex a kind is drawn in, given the settings that apply.
public static string HexFor(ConsoleLineKind kind, NotificationSettings? levels, string? chat, string? players)
Parameters
kindConsoleLineKindlevelsNotificationSettingschatstringplayersstring