Updated color names to match ANSI spec

This commit is contained in:
Tigger Kindel
2023-10-11 12:57:38 -06:00
committed by Tig
parent 6f1e3e9a06
commit 30e9b363d3
9 changed files with 84 additions and 54 deletions

View File

@@ -382,7 +382,7 @@ namespace Terminal.Gui.ConfigurationTests {
""Background"": ""Cyan""
},
""HotNormal"": {
""Foreground"": ""Brown"",
""Foreground"": ""Yellow"",
""Background"": ""Black""
},
""HotFocus"": {
@@ -540,7 +540,7 @@ namespace Terminal.Gui.ConfigurationTests {
{
""UserDefined"": {
""hotNormal"": {
""foreground"": ""yellow"",
""foreground"": ""brown"",
""background"": ""1234""
}
}
@@ -552,7 +552,7 @@ namespace Terminal.Gui.ConfigurationTests {
}";
JsonException jsonException = Assert.Throws<JsonException> (() => ConfigurationManager.Settings.Update (json, "test"));
Assert.Equal ("Unexpected color name: yellow.", jsonException.Message);
Assert.Equal ("Unexpected color name: brown.", jsonException.Message);
// AbNormal is not a ColorScheme attribute
json = @"
@@ -621,7 +621,7 @@ namespace Terminal.Gui.ConfigurationTests {
Application.Init (new FakeDriver ());
ConfigurationManager.ThrowOnJsonErrors = false;
// "yellow" is not a color
// "brown" is not a color
string json = @"
{
""Themes"" : [
@@ -631,7 +631,7 @@ namespace Terminal.Gui.ConfigurationTests {
{
""UserDefined"": {
""hotNormal"": {
""foreground"": ""yellow"",
""foreground"": ""brown"",
""background"": ""1234""
}
}

View File

@@ -13,7 +13,7 @@ namespace Terminal.Gui.ConfigurationTests {
[InlineData ("BrightMagenta", Color.BrightMagenta)]
[InlineData ("BrightRed", Color.BrightRed)]
[InlineData ("BrightYellow", Color.BrightYellow)]
[InlineData ("Brown", Color.Brown)]
[InlineData ("Yellow", Color.Yellow)]
[InlineData ("Cyan", Color.Cyan)]
[InlineData ("DarkGray", Color.DarkGray)]
[InlineData ("Gray", Color.Gray)]
@@ -41,7 +41,7 @@ namespace Terminal.Gui.ConfigurationTests {
[InlineData (ColorNames.Gray, "Gray")]
[InlineData (ColorNames.Red, "Red")]
[InlineData (ColorNames.Magenta, "Magenta")]
[InlineData (ColorNames.Brown, "Brown")]
[InlineData (ColorNames.Yellow, "Yellow")]
[InlineData (ColorNames.DarkGray, "DarkGray")]
[InlineData (ColorNames.BrightBlue, "BrightBlue")]
[InlineData (ColorNames.BrightGreen, "BrightGreen")]

View File

@@ -88,7 +88,7 @@ namespace Terminal.Gui.ConfigurationTests {
// is always White/Black
Normal = new Attribute (Color.Red, Color.Green),
Focus = new Attribute (Color.Cyan, Color.BrightCyan),
HotNormal = new Attribute (Color.Brown, Color.BrightYellow),
HotNormal = new Attribute (Color.Yellow, Color.BrightYellow),
HotFocus = new Attribute (Color.Green, Color.BrightGreen),
Disabled = new Attribute (Color.Gray, Color.DarkGray),
};
@@ -143,7 +143,7 @@ namespace Terminal.Gui.ConfigurationTests {
// is always White/Black
Normal = new Attribute (Color.Red, Color.Green),
Focus = new Attribute (Color.Cyan, Color.BrightCyan),
HotNormal = new Attribute (Color.Brown, Color.BrightYellow),
HotNormal = new Attribute (Color.Yellow, Color.BrightYellow),
HotFocus = new Attribute (Color.Green, Color.BrightGreen),
Disabled = new Attribute (Color.Gray, Color.DarkGray),
};