mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
fix: Fixing bugs in AnsiUtils color conversion
This commit is contained in:
@@ -28,23 +28,23 @@ namespace ICD.Common.Utils
|
|||||||
private static readonly Dictionary<string, string> s_PuttyColors =
|
private static readonly Dictionary<string, string> s_PuttyColors =
|
||||||
new Dictionary<string, string>
|
new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{"30", "000000"}, // Black
|
{"30", "#000000"}, // Black
|
||||||
{"31", "BB0000"}, // Red
|
{"31", "#BB0000"}, // Red
|
||||||
{"32", "00BB00"}, // Green
|
{"32", "#00BB00"}, // Green
|
||||||
{"33", "BBBB00"}, // Yellow
|
{"33", "#BBBB00"}, // Yellow
|
||||||
{"34", "0000BB"}, // Blue
|
{"34", "#0000BB"}, // Blue
|
||||||
{"35", "BB00BB"}, // Magenta
|
{"35", "#BB00BB"}, // Magenta
|
||||||
{"36", "00BBBB"}, // Cyan
|
{"36", "#00BBBB"}, // Cyan
|
||||||
{"37", "BBBBBB"}, // White
|
{"37", "#BBBBBB"}, // White
|
||||||
|
|
||||||
{"30;1", "555555"}, // Bright Black
|
{"30;1", "#555555"}, // Bright Black
|
||||||
{"31;1", "FF5555"}, // Bright Red
|
{"31;1", "#FF5555"}, // Bright Red
|
||||||
{"32;1", "55FF55"}, // Bright Green
|
{"32;1", "#55FF55"}, // Bright Green
|
||||||
{"33;1", "FFFF55"}, // Bright Yellow
|
{"33;1", "#FFFF55"}, // Bright Yellow
|
||||||
{"34;1", "5555FF"}, // Bright Blue
|
{"34;1", "#5555FF"}, // Bright Blue
|
||||||
{"35;1", "FF55FF"}, // Bright Magenta
|
{"35;1", "#FF55FF"}, // Bright Magenta
|
||||||
{"36;1", "55FFFF"}, // Bright Cyan
|
{"36;1", "#55FFFF"}, // Bright Cyan
|
||||||
{"37;1", "FFFFFF"}, // Bright White
|
{"37;1", "#FFFFFF"}, // Bright White
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -123,7 +123,7 @@ namespace ICD.Common.Utils
|
|||||||
public static string InvertBright(string code)
|
public static string InvertBright(string code)
|
||||||
{
|
{
|
||||||
return code.EndsWith(";1")
|
return code.EndsWith(";1")
|
||||||
? code.Substring(0, code.Length - 1)
|
? code.Substring(0, code.Length - 2)
|
||||||
: code + ";1";
|
: code + ";1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user