From 5f01b97705d1ad58d451b18ea039109b3354b443 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 9 Sep 2020 18:23:05 +0800 Subject: [PATCH 01/43] Add support for more OSC color formats --- .../parser/OutputStateMachineEngine.cpp | 147 +++++++++++++----- 1 file changed, 105 insertions(+), 42 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 15e946602fa..57c1ba6eb4c 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1408,10 +1408,13 @@ static constexpr bool _isHexNumber(const wchar_t wch) noexcept // Routine Description: // - Given a color spec string, attempts to parse the color that's encoded. -// The only supported spec currently is the following: -// spec: a color in the following format: +// The supported specs currently are the following: +// spec1: a color in the following format: // "rgb://" -// where is one or two hex digits, upper or lower case. +// spec2: a color in the following format: +// "#" +// +// In both specs, is a value contains up to 4 hex digits, upper or lower case. // Arguments: // - string - The string containing the color spec string to parse. // - rgb - receives the color that we parsed @@ -1421,50 +1424,75 @@ bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept { bool foundRGB = false; + bool isSharpSignFormat = false; + size_t rgbHexDigitCount = 0; bool foundValidColorSpec = false; - std::array colorValues = { 0 }; + std::array colorValues = { 0 }; + std::array parameterValues = { 0 }; bool success = false; - // We can have anywhere between [11,15] characters - // 9 "rgb:h/h/h" - // 12 "rgb:hh/hh/hh" - // Any fewer cannot be valid, and any more will be too many. - // Return early in this case. - // We'll still have to bounds check when parsing the hh/hh/hh values - if (string.size() < 9 || string.size() > 12) - { - return false; - } + const auto stringSize = string.size(); - // Now we look for "rgb:" + // First we look for "rgb:" // Other colorspaces are theoretically possible, but we don't support them. - auto curr = string.cbegin(); if ((*curr++ == L'r') && (*curr++ == L'g') && (*curr++ == L'b') && (*curr++ == L':')) { + // We can have one of the following formats: + // 9 "rgb:h/h/h" + // 12 "rgb:hh/hh/hh" + // 15 "rgb:hhh/hhh/hhh" + // 18 "rgb:hhhh/hhhh/hhhh" + // Any other cases will be invalid. + if (!(stringSize == 9 || stringSize == 12 || stringSize == 15 || stringSize == 18)) + { + return false; + } + foundRGB = true; + rgbHexDigitCount = ((stringSize - 3) / 3) - 1; + } + + // Try the sharp sign format. + curr--; + if (*curr++ == L'#') + { + // We can have one of the following formats: + // 4 "#hhh" + // 7 "#hhhhhh" + // 10 "#hhhhhhhhh" + // 13 "#hhhhhhhhhhhh" + // Any other cases will be invalid. + if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) + { + return false; + } + + isSharpSignFormat = true; + foundRGB = true; + rgbHexDigitCount = (stringSize - 1) / 3; } if (foundRGB) { - // Colorspecs are up to hh/hh/hh, for 1-2 h's + // Colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's for (size_t component = 0; component < 3; component++) { bool foundColor = false; - auto& value = til::at(colorValues, component); - for (size_t i = 0; i < 3; i++) + auto& parameterValue = til::at(parameterValues, component); + for (size_t i = 0; i < rgbHexDigitCount; i++) { const wchar_t wch = *curr++; if (_isHexNumber(wch)) { - value *= 16; + parameterValue *= 16; unsigned int intVal = 0; if (s_HexToUint(wch, intVal)) { - value += intVal; + parameterValue += intVal; } else { @@ -1472,41 +1500,76 @@ bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, foundColor = false; break; } - // If we're on the blue component, we're not going to see a /. - // Break out once we hit the end. - if (component == 2 && curr >= string.cend()) - { - foundValidColorSpec = true; - break; - } } - else if (wch == L'/') + } + + if (isSharpSignFormat) + { + // Successfully parsed this component. Start the next one. + foundColor = true; + } + else + { + if (curr < string.cend() && *curr == L'/') { - // Break this component, and start the next one. + // Same as above but need to skip the delimiter. + curr++; foundColor = true; - break; } else { - // Encountered something weird oh no + // Invalid delimiter. Treat it as an error. foundColor = false; break; } } + if (!foundColor || curr >= string.cend()) { - // Indicates there was a some error parsing color - // or we're at the end of the string. + // Indicates there was some error parsing color. break; } } + + if (curr >= string.cend()) + { + // We're at the end of the string and we have successfully parsed the color. + foundValidColorSpec = true; + } } + // Only if we find a valid colorspec can we pass it out successfully. if (foundValidColorSpec) { - DWORD color = RGB(LOBYTE(colorValues.at(0)), - LOBYTE(colorValues.at(1)), - LOBYTE(colorValues.at(2))); + for (size_t component = 0; component < 3; component++) + { + auto& parameterValue = til::at(parameterValues, component); + auto& colorValue = til::at(colorValues, component); + + // Calculate the actual color value based on the hex digit count. + switch (rgbHexDigitCount) + { + case 1: + colorValue = (float)parameterValue / 0xf * 0xff; + break; + case 2: + colorValue = (float)parameterValue; + break; + case 3: + colorValue = (float)parameterValue / 0xfff * 0xff; + break; + case 4: + colorValue = (float)parameterValue / 0xffff * 0xff; + break; + default: + // Should not get here. + break; + } + } + + DWORD color = RGB(LOBYTE((unsigned int)colorValues.at(0)), + LOBYTE((unsigned int)colorValues.at(1)), + LOBYTE((unsigned int)colorValues.at(2))); rgb = color; success = true; @@ -1536,13 +1599,13 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri bool foundTableIndex = false; bool success = false; - // We can have anywhere between [11,16] characters - // 11 "#;rgb:h/h/h" - // 16 "###;rgb:hh/hh/hh" + // We can have anywhere between [6,16] characters + // 6 "#;#hhh" + // 22 "###;rgb:hhhh/hhhh/hhhh" // Any fewer cannot be valid, and any more will be too many. // Return early in this case. // We'll still have to bounds check when parsing the hh/hh/hh values - if (string.size() < 11 || string.size() > 16) + if (string.size() < 6 || string.size() > 22) { return false; } @@ -1573,7 +1636,7 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri break; } } - // Now we look for "rgb:" + // Now we look for the actual RGB value. // Other colorspaces are theoretically possible, but we don't support them. if (foundTableIndex) { From 397a38c66bcff4e95a1294cd42fc61a211b74ad7 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 9 Sep 2020 18:33:55 +0800 Subject: [PATCH 02/43] Spell check --- .github/actions/spell-check/expect/expect.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/spell-check/expect/expect.txt b/.github/actions/spell-check/expect/expect.txt index ddb33c771f3..fa5f644eb95 100644 --- a/.github/actions/spell-check/expect/expect.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -959,6 +959,8 @@ hfile hfont hglobal hh +hhh +hhhh hhook hhx HIBYTE From e3ffb96c149cea3bc703a9b469adcfcc1b1a06bd Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 9 Sep 2020 18:37:09 +0800 Subject: [PATCH 03/43] Comment --- src/terminal/parser/OutputStateMachineEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 57c1ba6eb4c..0e88226d2be 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1599,12 +1599,12 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri bool foundTableIndex = false; bool success = false; - // We can have anywhere between [6,16] characters + // We can have anywhere between [6,22] characters // 6 "#;#hhh" // 22 "###;rgb:hhhh/hhhh/hhhh" // Any fewer cannot be valid, and any more will be too many. // Return early in this case. - // We'll still have to bounds check when parsing the hh/hh/hh values + // We'll still have to bounds check when parsing the actual RGB values if (string.size() < 6 || string.size() > 22) { return false; From ee8ae33eaed8d239086221ddffd60320c6e5f5b4 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 9 Sep 2020 18:48:08 +0800 Subject: [PATCH 04/43] 0xf haha --- .github/actions/spell-check/patterns/patterns.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spell-check/patterns/patterns.txt b/.github/actions/spell-check/patterns/patterns.txt index f8c3d65534a..ee4ca8d6854 100644 --- a/.github/actions/spell-check/patterns/patterns.txt +++ b/.github/actions/spell-check/patterns/patterns.txt @@ -16,6 +16,7 @@ Scro\&ll TestUtils::VerifyExpectedString\(tb, L"[^"]+" (?:hostSm|mach)\.ProcessString\(L"[^"]+" \b([A-Za-z])\1{3,}\b +0x[0-9A-Za-z]+ Base64::s_(?:En|De)code\(L"[^"]+" VERIFY_ARE_EQUAL\(L"[^"]+" L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/" From f2f09dc2dda1b795be263372a5e55f71d0f773d5 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Thu, 10 Sep 2020 09:48:03 +0800 Subject: [PATCH 05/43] Spell check --- .github/actions/spell-check/expect/expect.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/spell-check/expect/expect.txt b/.github/actions/spell-check/expect/expect.txt index fa5f644eb95..5205fc37b63 100644 --- a/.github/actions/spell-check/expect/expect.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -2789,6 +2789,9 @@ XCount xdy xe XEncoding +xes +Xes +XES xff XFile xlang From 4ad0b6ad120bde5ca384e618adbb9036ba8dd46b Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Fri, 11 Sep 2020 20:17:58 +0800 Subject: [PATCH 06/43] Resolve comments --- src/host/ut_host/ScreenBufferTests.cpp | 35 +- .../parser/OutputStateMachineEngine.cpp | 223 ++--- .../parser/OutputStateMachineEngine.hpp | 4 + .../parser/ut_parser/OutputEngineTest.cpp | 202 +++++ src/types/inc/utils.hpp | 1 + src/types/utils.cpp | 799 ++++++++++++++++++ 6 files changed, 1131 insertions(+), 133 deletions(-) diff --git a/src/host/ut_host/ScreenBufferTests.cpp b/src/host/ut_host/ScreenBufferTests.cpp index 1e559505914..efde79b5e44 100644 --- a/src/host/ut_host/ScreenBufferTests.cpp +++ b/src/host/ut_host/ScreenBufferTests.cpp @@ -1566,13 +1566,13 @@ void ScreenBufferTests::VtSetColorTable() L"Process some valid sequences for setting the table")); stateMachine.ProcessString(L"\x1b]4;0;rgb:1/1/1\x7"); - VERIFY_ARE_EQUAL(RGB(1, 1, 1), gci.GetColorTableEntry(::XtermToWindowsIndex(0))); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), gci.GetColorTableEntry(::XtermToWindowsIndex(0))); stateMachine.ProcessString(L"\x1b]4;1;rgb:1/23/1\x7"); - VERIFY_ARE_EQUAL(RGB(1, 0x23, 1), gci.GetColorTableEntry(::XtermToWindowsIndex(1))); + VERIFY_ARE_EQUAL(RGB(0x11, 0x23, 0x11), gci.GetColorTableEntry(::XtermToWindowsIndex(1))); stateMachine.ProcessString(L"\x1b]4;2;rgb:1/23/12\x7"); - VERIFY_ARE_EQUAL(RGB(1, 0x23, 0x12), gci.GetColorTableEntry(::XtermToWindowsIndex(2))); + VERIFY_ARE_EQUAL(RGB(0x11, 0x23, 0x12), gci.GetColorTableEntry(::XtermToWindowsIndex(2))); stateMachine.ProcessString(L"\x1b]4;3;rgb:12/23/12\x7"); VERIFY_ARE_EQUAL(RGB(0x12, 0x23, 0x12), gci.GetColorTableEntry(::XtermToWindowsIndex(3))); @@ -1587,7 +1587,7 @@ void ScreenBufferTests::VtSetColorTable() L"Try a bunch of invalid sequences.")); Log::Comment(NoThrowString().Format( L"First start by setting an entry to a known value to compare to.")); - stateMachine.ProcessString(L"\x1b]4;5;rgb:9/9/9\x1b\\"); + stateMachine.ProcessString(L"\x1b]4;5;rgb:09/09/09\x1b\\"); VERIFY_ARE_EQUAL(RGB(9, 9, 9), gci.GetColorTableEntry(::XtermToWindowsIndex(5))); Log::Comment(NoThrowString().Format( @@ -1595,11 +1595,6 @@ void ScreenBufferTests::VtSetColorTable() stateMachine.ProcessString(L"\x1b]4;5;rgb:/1/1\x1b\\"); VERIFY_ARE_EQUAL(RGB(9, 9, 9), gci.GetColorTableEntry(::XtermToWindowsIndex(5))); - Log::Comment(NoThrowString().Format( - L"invalid: too many characters in a component")); - stateMachine.ProcessString(L"\x1b]4;5;rgb:111/1/1\x1b\\"); - VERIFY_ARE_EQUAL(RGB(9, 9, 9), gci.GetColorTableEntry(::XtermToWindowsIndex(5))); - Log::Comment(NoThrowString().Format( L"invalid: too many components")); stateMachine.ProcessString(L"\x1b]4;5;rgb:1/1/1/1\x1b\\"); @@ -2845,17 +2840,8 @@ void ScreenBufferTests::SetDefaultForegroundColor() newColor = gci.GetDefaultForegroundColor(); VERIFY_ARE_EQUAL(testColor, newColor); - Log::Comment(L"Invalid Decimal Notation"); - originalColor = newColor; - testColor = RGB(153, 102, 51); - stateMachine.ProcessString(L"\x1b]10;rgb:153/102/51\x1b\\"); - - newColor = gci.GetDefaultForegroundColor(); - VERIFY_ARE_NOT_EQUAL(testColor, newColor); - // it will, in fact leave the color the way it was - VERIFY_ARE_EQUAL(originalColor, newColor); - Log::Comment(L"Invalid syntax"); + originalColor = newColor; testColor = RGB(153, 102, 51); stateMachine.ProcessString(L"\x1b]10;99/66/33\x1b\\"); @@ -2899,17 +2885,8 @@ void ScreenBufferTests::SetDefaultBackgroundColor() newColor = gci.GetDefaultBackgroundColor(); VERIFY_ARE_EQUAL(testColor, newColor); - Log::Comment(L"Invalid Decimal Notation"); - originalColor = newColor; - testColor = RGB(153, 102, 51); - stateMachine.ProcessString(L"\x1b]11;rgb:153/102/51\x1b\\"); - - newColor = gci.GetDefaultBackgroundColor(); - VERIFY_ARE_NOT_EQUAL(testColor, newColor); - // it will, in fact leave the color the way it was - VERIFY_ARE_EQUAL(originalColor, newColor); - Log::Comment(L"Invalid Syntax"); + originalColor = newColor; testColor = RGB(153, 102, 51); stateMachine.ProcessString(L"\x1b]11;99/66/33\x1b\\"); diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 0e88226d2be..118005d9e6b 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -8,6 +8,7 @@ #include "base64.hpp" #include "ascii.hpp" +#include "../../types/inc/utils.hpp" using namespace Microsoft::Console; using namespace Microsoft::Console::VirtualTerminal; @@ -1422,12 +1423,14 @@ static constexpr bool _isHexNumber(const wchar_t wch) noexcept // - True if a color was successfully parsed bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept +try { - bool foundRGB = false; + bool foundRGBColorSpec = false; + bool foundValidColorSpec = false; + bool isSharpSignFormat = false; size_t rgbHexDigitCount = 0; - bool foundValidColorSpec = false; - std::array colorValues = { 0 }; + std::array colorValues = { 0 }; std::array parameterValues = { 0 }; bool success = false; const auto stringSize = string.size(); @@ -1435,100 +1438,147 @@ bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, // First we look for "rgb:" // Other colorspaces are theoretically possible, but we don't support them. auto curr = string.cbegin(); - if ((*curr++ == L'r') && - (*curr++ == L'g') && - (*curr++ == L'b') && - (*curr++ == L':')) - { - // We can have one of the following formats: - // 9 "rgb:h/h/h" - // 12 "rgb:hh/hh/hh" - // 15 "rgb:hhh/hhh/hhh" - // 18 "rgb:hhhh/hhhh/hhhh" - // Any other cases will be invalid. - if (!(stringSize == 9 || stringSize == 12 || stringSize == 15 || stringSize == 18)) + if (stringSize > 4) + { + auto prefix = std::wstring(string.substr(0, 4)); + std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); + if (prefix.compare(L"rgb:") == 0) { - return false; - } + // We can have one of the following formats: + // 9 "rgb:h/h/h" + // 12 "rgb:hh/hh/hh" + // 15 "rgb:hhh/hhh/hhh" + // 18 "rgb:hhhh/hhhh/hhhh" + // Any fewer cannot be valid, and any more will be too many. + // Return early in this case. + if (stringSize < 9 || stringSize > 18) + { + return false; + } + + foundRGBColorSpec = true; - foundRGB = true; - rgbHexDigitCount = ((stringSize - 3) / 3) - 1; + std::advance(curr, 4); + } } // Try the sharp sign format. - curr--; - if (*curr++ == L'#') - { - // We can have one of the following formats: - // 4 "#hhh" - // 7 "#hhhhhh" - // 10 "#hhhhhhhhh" - // 13 "#hhhhhhhhhhhh" - // Any other cases will be invalid. - if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) + if (!foundRGBColorSpec && stringSize > 1) + { + const auto prefix = string.substr(0, 1); + if (prefix.compare(L"#") == 0) { - return false; + // We can have one of the following formats: + // 4 "#hhh" + // 7 "#hhhhhh" + // 10 "#hhhhhhhhh" + // 13 "#hhhhhhhhhhhh" + // Any other cases will be invalid. + // Return early in this case. + if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) + { + return false; + } + + isSharpSignFormat = true; + foundRGBColorSpec = true; + rgbHexDigitCount = (stringSize - 1) / 3; + + std::advance(curr, 1); } + } - isSharpSignFormat = true; - foundRGB = true; - rgbHexDigitCount = (stringSize - 1) / 3; + // Try the XOrg app color name. + if (!foundRGBColorSpec) + { + try + { + til::color color = Utils::ColorFromXOrgAppColorName(string); + rgb = RGB(color.r, color.g, color.b); + success = true; + } + catch (...) + { + } } - if (foundRGB) + if (foundRGBColorSpec) { - // Colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's for (size_t component = 0; component < 3; component++) { bool foundColor = false; auto& parameterValue = til::at(parameterValues, component); - for (size_t i = 0; i < rgbHexDigitCount; i++) + // For "sharp sign" format, the rgbHexDigitCount is known. + // For "rgb:" format, colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's + const auto iteration = isSharpSignFormat ? rgbHexDigitCount : 4; + for (size_t i = 0; i < iteration && curr < string.cend(); i++) { const wchar_t wch = *curr++; - if (_isHexNumber(wch)) + if (!_isHexNumber(wch)) { - parameterValue *= 16; - unsigned int intVal = 0; - if (s_HexToUint(wch, intVal)) - { - parameterValue += intVal; - } - else - { - // Encountered something weird oh no - foundColor = false; - break; - } + return false; } - } - if (isSharpSignFormat) - { - // Successfully parsed this component. Start the next one. - foundColor = true; - } - else - { - if (curr < string.cend() && *curr == L'/') + parameterValue *= 16; + unsigned int intVal = 0; + const auto ret = s_HexToUint(wch, intVal); + if (!ret) { - // Same as above but need to skip the delimiter. - curr++; + // Encountered something weird oh no + return false; + } + + parameterValue += intVal; + + if (isSharpSignFormat) + { + // If we get this far, any number can be seen as a valid part + // of this component. foundColor = true; + + if (i >= rgbHexDigitCount) + { + // Successfully parsed this component. Start the next one. + break; + } } else { - // Invalid delimiter. Treat it as an error. - foundColor = false; - break; + // Record the hex digit count of the current component. + rgbHexDigitCount = i + 1; + + // If this is the first 2 component... + if (component < 2 && curr < string.cend() && *curr == L'/') + { + // ...and we have successfully parsed this component, we need + // to skip the delimiter before starting the next one. + curr++; + foundColor = true; + break; + } + // Or we have reached the end of the string... + else if (curr >= string.cend()) + { + // ...meaning that this is the last component. We're not going to + // see any delimiter. We can just break out. + foundColor = true; + break; + } } } - if (!foundColor || curr >= string.cend()) + if (!foundColor) { // Indicates there was some error parsing color. - break; + return false; } + + // Calculate the actual color value based on the hex digit count. + auto& colorValue = til::at(colorValues, component); + const auto scaleMultiplier = 0x11; + const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); + colorValue = parameterValue * scaleMultiplier / scaleDivisor; } if (curr >= string.cend()) @@ -1541,41 +1591,16 @@ bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, // Only if we find a valid colorspec can we pass it out successfully. if (foundValidColorSpec) { - for (size_t component = 0; component < 3; component++) - { - auto& parameterValue = til::at(parameterValues, component); - auto& colorValue = til::at(colorValues, component); - - // Calculate the actual color value based on the hex digit count. - switch (rgbHexDigitCount) - { - case 1: - colorValue = (float)parameterValue / 0xf * 0xff; - break; - case 2: - colorValue = (float)parameterValue; - break; - case 3: - colorValue = (float)parameterValue / 0xfff * 0xff; - break; - case 4: - colorValue = (float)parameterValue / 0xffff * 0xff; - break; - default: - // Should not get here. - break; - } - } - - DWORD color = RGB(LOBYTE((unsigned int)colorValues.at(0)), - LOBYTE((unsigned int)colorValues.at(1)), - LOBYTE((unsigned int)colorValues.at(2))); + DWORD color = RGB(LOBYTE(colorValues.at(0)), + LOBYTE(colorValues.at(1)), + LOBYTE(colorValues.at(2))); rgb = color; success = true; } return success; } +CATCH_LOG_RETURN_FALSE() // Routine Description: // - OSC 4 ; c ; spec ST @@ -1599,16 +1624,6 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri bool foundTableIndex = false; bool success = false; - // We can have anywhere between [6,22] characters - // 6 "#;#hhh" - // 22 "###;rgb:hhhh/hhhh/hhhh" - // Any fewer cannot be valid, and any more will be too many. - // Return early in this case. - // We'll still have to bounds check when parsing the actual RGB values - if (string.size() < 6 || string.size() > 22) - { - return false; - } // First try to get the table index, a number between [0,256] size_t current = 0; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 794a9d59f9e..770ad61020b 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -257,5 +257,9 @@ namespace Microsoft::Console::VirtualTerminal std::wstring& uri) const; void _ClearLastChar() noexcept; + +#ifdef UNIT_TESTING + friend class OutputEngineTest; +#endif }; } diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index aafb0cafbe3..265e497ba53 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -596,6 +596,110 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final VERIFY_ARE_EQUAL(mach._state, StateMachine::VTStates::Ground); } + TEST_METHOD(TestOscParseColorSpec) + { + DWORD color = 0; + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"RGB:1/1/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:111/1/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1111/1/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/11/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/111/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1111/1", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/11", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/111", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1111", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/4", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x44)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/45", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x45)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/456", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x45)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/34/5", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x55)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/34/56", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x56)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/345/67", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x67)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/345/678", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x67)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/456/789", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/4564/789", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/4564/7897", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1231/4564/7897", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#111", color)); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x56)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456789", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123145647897", color)); + VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"orange", color)); + VERIFY_ARE_EQUAL(color, RGB(255, 165, 0)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"dark green", color)); + VERIFY_ARE_EQUAL(color, RGB(0, 100, 0)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"medium sea green", color)); + VERIFY_ARE_EQUAL(color, RGB(60, 179, 113)); + VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"LightYellow", color)); + VERIFY_ARE_EQUAL(color, RGB(255, 255, 224)); + + // Invalid sequences. + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"r:", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rg:", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb://", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:///", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/11/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:this/is/invalid", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgba:1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgbi:1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"cmyk:1/1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb#111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:#111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#11111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#11/1/", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#/1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#rgb:1/1/1", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#111invalid", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111111111111111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#invalid111", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"12/34/56", color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"123456", color)); + } + TEST_METHOD(TestDcsEntry) { auto dispatch = std::make_unique(); @@ -816,6 +920,10 @@ class StatefulDispatch final : public TermDispatch _isDECCOLMAllowed{ false }, _windowWidth{ 80 }, _win32InputMode{ false }, + _setDefaultForeground(false), + _defaultForegroundColor{ RGB(0, 0, 0) }, + _setDefaultBackground(false), + _defaultBackgroundColor{ RGB(0, 0, 0) }, _hyperlinkMode{ false }, _options{ s_cMaxOptions, static_cast(s_uiGraphicsCleared) } // fill with cleared option { @@ -1163,6 +1271,20 @@ class StatefulDispatch final : public TermDispatch return true; } + bool SetDefaultForeground(const DWORD color) noexcept override + { + _setDefaultForeground = true; + _defaultForegroundColor = color; + return true; + } + + bool SetDefaultBackground(const DWORD color) noexcept override + { + _setDefaultBackground = true; + _defaultBackgroundColor = color; + return true; + } + bool SetClipboard(std::wstring_view content) noexcept override { _copyContent = { content.begin(), content.end() }; @@ -1234,6 +1356,10 @@ class StatefulDispatch final : public TermDispatch bool _isDECCOLMAllowed; size_t _windowWidth; bool _win32InputMode; + bool _setDefaultForeground; + DWORD _defaultForegroundColor; + bool _setDefaultBackground; + DWORD _defaultBackgroundColor; bool _hyperlinkMode; std::wstring _copyContent; std::wstring _uri; @@ -2416,6 +2542,82 @@ class StateMachineExternalTest final VERIFY_IS_TRUE(pDispatch->_vt52DeviceAttributes); } + TEST_METHOD(TestOscSetDefaultForeground) + { + auto dispatch = std::make_unique(); + auto pDispatch = dispatch.get(); + auto engine = std::make_unique(std::move(dispatch)); + StateMachine mach(std::move(engine)); + + mach.ProcessString(L"\033]10;rgb:1/1/1\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;rgb:12/34/56\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x12, 0x34, 0x56), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#123456\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x12, 0x34, 0x56), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;DarkOrange\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(255, 140, 0), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + } + + TEST_METHOD(TestOscSetDefaultBackground) + { + auto dispatch = std::make_unique(); + auto pDispatch = dispatch.get(); + auto engine = std::make_unique(std::move(dispatch)); + StateMachine mach(std::move(engine)); + + mach.ProcessString(L"\033]11;rgb:1/1/1\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;rgb:12/34/56\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x12, 0x34, 0x56), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#123456\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x12, 0x34, 0x56), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;DarkOrange\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(255, 140, 0), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + } + TEST_METHOD(TestSetClipboard) { auto dispatch = std::make_unique(); diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index 05ba610e9d5..9818f17210f 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -45,6 +45,7 @@ namespace Microsoft::Console::Utils std::string ColorToHexString(const til::color color); til::color ColorFromHexString(const std::string_view wstr); + til::color ColorFromXOrgAppColorName(const std::wstring_view wstr); void InitializeCampbellColorTable(const gsl::span table); void InitializeCampbellColorTableForConhost(const gsl::span table); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 86ff8b522aa..15337aefa3a 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -3,6 +3,7 @@ #include "precomp.h" #include "inc/utils.hpp" +#include "til/static_map.h" using namespace Microsoft::Console; @@ -284,6 +285,791 @@ static constexpr std::array standardXterm256ColorTable{ til::color{ 0xEE, 0xEE, 0xEE }, }; +static til::static_map, 782> xorgAppColorTable{ + std::pair{ L"snow", til::color{ 255, 250, 250 } }, + std::pair{ L"ghost white", til::color{ 248, 248, 255 } }, + std::pair{ L"GhostWhite", til::color{ 248, 248, 255 } }, + std::pair{ L"white smoke", til::color{ 245, 245, 245 } }, + std::pair{ L"WhiteSmoke", til::color{ 245, 245, 245 } }, + std::pair{ L"gainsboro", til::color{ 220, 220, 220 } }, + std::pair{ L"floral white", til::color{ 255, 250, 240 } }, + std::pair{ L"FloralWhite", til::color{ 255, 250, 240 } }, + std::pair{ L"old lace", til::color{ 253, 245, 230 } }, + std::pair{ L"OldLace", til::color{ 253, 245, 230 } }, + std::pair{ L"linen", til::color{ 250, 240, 230 } }, + std::pair{ L"antique white", til::color{ 250, 235, 215 } }, + std::pair{ L"AntiqueWhite", til::color{ 250, 235, 215 } }, + std::pair{ L"papaya whip", til::color{ 255, 239, 213 } }, + std::pair{ L"PapayaWhip", til::color{ 255, 239, 213 } }, + std::pair{ L"blanched almond", til::color{ 255, 235, 205 } }, + std::pair{ L"BlanchedAlmond", til::color{ 255, 235, 205 } }, + std::pair{ L"bisque", til::color{ 255, 228, 196 } }, + std::pair{ L"peach puff", til::color{ 255, 218, 185 } }, + std::pair{ L"PeachPuff", til::color{ 255, 218, 185 } }, + std::pair{ L"navajo white", til::color{ 255, 222, 173 } }, + std::pair{ L"NavajoWhite", til::color{ 255, 222, 173 } }, + std::pair{ L"moccasin", til::color{ 255, 228, 181 } }, + std::pair{ L"cornsilk", til::color{ 255, 248, 220 } }, + std::pair{ L"ivory", til::color{ 255, 255, 240 } }, + std::pair{ L"lemon chiffon", til::color{ 255, 250, 205 } }, + std::pair{ L"LemonChiffon", til::color{ 255, 250, 205 } }, + std::pair{ L"seashell", til::color{ 255, 245, 238 } }, + std::pair{ L"honeydew", til::color{ 240, 255, 240 } }, + std::pair{ L"mint cream", til::color{ 245, 255, 250 } }, + std::pair{ L"MintCream", til::color{ 245, 255, 250 } }, + std::pair{ L"azure", til::color{ 240, 255, 255 } }, + std::pair{ L"alice blue", til::color{ 240, 248, 255 } }, + std::pair{ L"AliceBlue", til::color{ 240, 248, 255 } }, + std::pair{ L"lavender", til::color{ 230, 230, 250 } }, + std::pair{ L"lavender blush", til::color{ 255, 240, 245 } }, + std::pair{ L"LavenderBlush", til::color{ 255, 240, 245 } }, + std::pair{ L"misty rose", til::color{ 255, 228, 225 } }, + std::pair{ L"MistyRose", til::color{ 255, 228, 225 } }, + std::pair{ L"white", til::color{ 255, 255, 255 } }, + std::pair{ L"black", til::color{ 0, 0, 0 } }, + std::pair{ L"dark slate gray", til::color{ 47, 79, 79 } }, + std::pair{ L"DarkSlateGray", til::color{ 47, 79, 79 } }, + std::pair{ L"dark slate grey", til::color{ 47, 79, 79 } }, + std::pair{ L"DarkSlateGrey", til::color{ 47, 79, 79 } }, + std::pair{ L"dim gray", til::color{ 105, 105, 105 } }, + std::pair{ L"DimGray", til::color{ 105, 105, 105 } }, + std::pair{ L"dim grey", til::color{ 105, 105, 105 } }, + std::pair{ L"DimGrey", til::color{ 105, 105, 105 } }, + std::pair{ L"slate gray", til::color{ 112, 128, 144 } }, + std::pair{ L"SlateGray", til::color{ 112, 128, 144 } }, + std::pair{ L"slate grey", til::color{ 112, 128, 144 } }, + std::pair{ L"SlateGrey", til::color{ 112, 128, 144 } }, + std::pair{ L"light slate gray", til::color{ 119, 136, 153 } }, + std::pair{ L"LightSlateGray", til::color{ 119, 136, 153 } }, + std::pair{ L"light slate grey", til::color{ 119, 136, 153 } }, + std::pair{ L"LightSlateGrey", til::color{ 119, 136, 153 } }, + std::pair{ L"gray", til::color{ 190, 190, 190 } }, + std::pair{ L"grey", til::color{ 190, 190, 190 } }, + std::pair{ L"x11 gray", til::color{ 190, 190, 190 } }, + std::pair{ L"X11Gray", til::color{ 190, 190, 190 } }, + std::pair{ L"x11 grey", til::color{ 190, 190, 190 } }, + std::pair{ L"X11Grey", til::color{ 190, 190, 190 } }, + std::pair{ L"web gray", til::color{ 128, 128, 128 } }, + std::pair{ L"WebGray", til::color{ 128, 128, 128 } }, + std::pair{ L"web grey", til::color{ 128, 128, 128 } }, + std::pair{ L"WebGrey", til::color{ 128, 128, 128 } }, + std::pair{ L"light grey", til::color{ 211, 211, 211 } }, + std::pair{ L"LightGrey", til::color{ 211, 211, 211 } }, + std::pair{ L"light gray", til::color{ 211, 211, 211 } }, + std::pair{ L"LightGray", til::color{ 211, 211, 211 } }, + std::pair{ L"midnight blue", til::color{ 25, 25, 112 } }, + std::pair{ L"MidnightBlue", til::color{ 25, 25, 112 } }, + std::pair{ L"navy", til::color{ 0, 0, 128 } }, + std::pair{ L"navy blue", til::color{ 0, 0, 128 } }, + std::pair{ L"NavyBlue", til::color{ 0, 0, 128 } }, + std::pair{ L"cornflower blue", til::color{ 100, 149, 237 } }, + std::pair{ L"CornflowerBlue", til::color{ 100, 149, 237 } }, + std::pair{ L"dark slate blue", til::color{ 72, 61, 139 } }, + std::pair{ L"DarkSlateBlue", til::color{ 72, 61, 139 } }, + std::pair{ L"slate blue", til::color{ 106, 90, 205 } }, + std::pair{ L"SlateBlue", til::color{ 106, 90, 205 } }, + std::pair{ L"medium slate blue", til::color{ 123, 104, 238 } }, + std::pair{ L"MediumSlateBlue", til::color{ 123, 104, 238 } }, + std::pair{ L"light slate blue", til::color{ 132, 112, 255 } }, + std::pair{ L"LightSlateBlue", til::color{ 132, 112, 255 } }, + std::pair{ L"medium blue", til::color{ 0, 0, 205 } }, + std::pair{ L"MediumBlue", til::color{ 0, 0, 205 } }, + std::pair{ L"royal blue", til::color{ 65, 105, 225 } }, + std::pair{ L"RoyalBlue", til::color{ 65, 105, 225 } }, + std::pair{ L"blue", til::color{ 0, 0, 255 } }, + std::pair{ L"dodger blue", til::color{ 30, 144, 255 } }, + std::pair{ L"DodgerBlue", til::color{ 30, 144, 255 } }, + std::pair{ L"deep sky blue", til::color{ 0, 191, 255 } }, + std::pair{ L"DeepSkyBlue", til::color{ 0, 191, 255 } }, + std::pair{ L"sky blue", til::color{ 135, 206, 235 } }, + std::pair{ L"SkyBlue", til::color{ 135, 206, 235 } }, + std::pair{ L"light sky blue", til::color{ 135, 206, 250 } }, + std::pair{ L"LightSkyBlue", til::color{ 135, 206, 250 } }, + std::pair{ L"steel blue", til::color{ 70, 130, 180 } }, + std::pair{ L"SteelBlue", til::color{ 70, 130, 180 } }, + std::pair{ L"light steel blue", til::color{ 176, 196, 222 } }, + std::pair{ L"LightSteelBlue", til::color{ 176, 196, 222 } }, + std::pair{ L"light blue", til::color{ 173, 216, 230 } }, + std::pair{ L"LightBlue", til::color{ 173, 216, 230 } }, + std::pair{ L"powder blue", til::color{ 176, 224, 230 } }, + std::pair{ L"PowderBlue", til::color{ 176, 224, 230 } }, + std::pair{ L"pale turquoise", til::color{ 175, 238, 238 } }, + std::pair{ L"PaleTurquoise", til::color{ 175, 238, 238 } }, + std::pair{ L"dark turquoise", til::color{ 0, 206, 209 } }, + std::pair{ L"DarkTurquoise", til::color{ 0, 206, 209 } }, + std::pair{ L"medium turquoise", til::color{ 72, 209, 204 } }, + std::pair{ L"MediumTurquoise", til::color{ 72, 209, 204 } }, + std::pair{ L"turquoise", til::color{ 64, 224, 208 } }, + std::pair{ L"cyan", til::color{ 0, 255, 255 } }, + std::pair{ L"aqua", til::color{ 0, 255, 255 } }, + std::pair{ L"light cyan", til::color{ 224, 255, 255 } }, + std::pair{ L"LightCyan", til::color{ 224, 255, 255 } }, + std::pair{ L"cadet blue", til::color{ 95, 158, 160 } }, + std::pair{ L"CadetBlue", til::color{ 95, 158, 160 } }, + std::pair{ L"medium aquamarine", til::color{ 102, 205, 170 } }, + std::pair{ L"MediumAquamarine", til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine", til::color{ 127, 255, 212 } }, + std::pair{ L"dark green", til::color{ 0, 100, 0 } }, + std::pair{ L"DarkGreen", til::color{ 0, 100, 0 } }, + std::pair{ L"dark olive green", til::color{ 85, 107, 47 } }, + std::pair{ L"DarkOliveGreen", til::color{ 85, 107, 47 } }, + std::pair{ L"dark sea green", til::color{ 143, 188, 143 } }, + std::pair{ L"DarkSeaGreen", til::color{ 143, 188, 143 } }, + std::pair{ L"sea green", til::color{ 46, 139, 87 } }, + std::pair{ L"SeaGreen", til::color{ 46, 139, 87 } }, + std::pair{ L"medium sea green", til::color{ 60, 179, 113 } }, + std::pair{ L"MediumSeaGreen", til::color{ 60, 179, 113 } }, + std::pair{ L"light sea green", til::color{ 32, 178, 170 } }, + std::pair{ L"LightSeaGreen", til::color{ 32, 178, 170 } }, + std::pair{ L"pale green", til::color{ 152, 251, 152 } }, + std::pair{ L"PaleGreen", til::color{ 152, 251, 152 } }, + std::pair{ L"spring green", til::color{ 0, 255, 127 } }, + std::pair{ L"SpringGreen", til::color{ 0, 255, 127 } }, + std::pair{ L"lawn green", til::color{ 124, 252, 0 } }, + std::pair{ L"LawnGreen", til::color{ 124, 252, 0 } }, + std::pair{ L"green", til::color{ 0, 255, 0 } }, + std::pair{ L"lime", til::color{ 0, 255, 0 } }, + std::pair{ L"x11 green", til::color{ 0, 255, 0 } }, + std::pair{ L"X11Green", til::color{ 0, 255, 0 } }, + std::pair{ L"web green", til::color{ 0, 128, 0 } }, + std::pair{ L"WebGreen", til::color{ 0, 128, 0 } }, + std::pair{ L"chartreuse", til::color{ 127, 255, 0 } }, + std::pair{ L"medium spring green", til::color{ 0, 250, 154 } }, + std::pair{ L"MediumSpringGreen", til::color{ 0, 250, 154 } }, + std::pair{ L"green yellow", til::color{ 173, 255, 47 } }, + std::pair{ L"GreenYellow", til::color{ 173, 255, 47 } }, + std::pair{ L"lime green", til::color{ 50, 205, 50 } }, + std::pair{ L"LimeGreen", til::color{ 50, 205, 50 } }, + std::pair{ L"yellow green", til::color{ 154, 205, 50 } }, + std::pair{ L"YellowGreen", til::color{ 154, 205, 50 } }, + std::pair{ L"forest green", til::color{ 34, 139, 34 } }, + std::pair{ L"ForestGreen", til::color{ 34, 139, 34 } }, + std::pair{ L"olive drab", til::color{ 107, 142, 35 } }, + std::pair{ L"OliveDrab", til::color{ 107, 142, 35 } }, + std::pair{ L"dark khaki", til::color{ 189, 183, 107 } }, + std::pair{ L"DarkKhaki", til::color{ 189, 183, 107 } }, + std::pair{ L"khaki", til::color{ 240, 230, 140 } }, + std::pair{ L"pale goldenrod", til::color{ 238, 232, 170 } }, + std::pair{ L"PaleGoldenrod", til::color{ 238, 232, 170 } }, + std::pair{ L"light goldenrod yellow", til::color{ 250, 250, 210 } }, + std::pair{ L"LightGoldenrodYellow", til::color{ 250, 250, 210 } }, + std::pair{ L"light yellow", til::color{ 255, 255, 224 } }, + std::pair{ L"LightYellow", til::color{ 255, 255, 224 } }, + std::pair{ L"yellow", til::color{ 255, 255, 0 } }, + std::pair{ L"gold", til::color{ 255, 215, 0 } }, + std::pair{ L"light goldenrod", til::color{ 238, 221, 130 } }, + std::pair{ L"LightGoldenrod", til::color{ 238, 221, 130 } }, + std::pair{ L"goldenrod", til::color{ 218, 165, 32 } }, + std::pair{ L"dark goldenrod", til::color{ 184, 134, 11 } }, + std::pair{ L"DarkGoldenrod", til::color{ 184, 134, 11 } }, + std::pair{ L"rosy brown", til::color{ 188, 143, 143 } }, + std::pair{ L"RosyBrown", til::color{ 188, 143, 143 } }, + std::pair{ L"indian red", til::color{ 205, 92, 92 } }, + std::pair{ L"IndianRed", til::color{ 205, 92, 92 } }, + std::pair{ L"saddle brown", til::color{ 139, 69, 19 } }, + std::pair{ L"SaddleBrown", til::color{ 139, 69, 19 } }, + std::pair{ L"sienna", til::color{ 160, 82, 45 } }, + std::pair{ L"peru", til::color{ 205, 133, 63 } }, + std::pair{ L"burlywood", til::color{ 222, 184, 135 } }, + std::pair{ L"beige", til::color{ 245, 245, 220 } }, + std::pair{ L"wheat", til::color{ 245, 222, 179 } }, + std::pair{ L"sandy brown", til::color{ 244, 164, 96 } }, + std::pair{ L"SandyBrown", til::color{ 244, 164, 96 } }, + std::pair{ L"tan", til::color{ 210, 180, 140 } }, + std::pair{ L"chocolate", til::color{ 210, 105, 30 } }, + std::pair{ L"firebrick", til::color{ 178, 34, 34 } }, + std::pair{ L"brown", til::color{ 165, 42, 42 } }, + std::pair{ L"dark salmon", til::color{ 233, 150, 122 } }, + std::pair{ L"DarkSalmon", til::color{ 233, 150, 122 } }, + std::pair{ L"salmon", til::color{ 250, 128, 114 } }, + std::pair{ L"light salmon", til::color{ 255, 160, 122 } }, + std::pair{ L"LightSalmon", til::color{ 255, 160, 122 } }, + std::pair{ L"orange", til::color{ 255, 165, 0 } }, + std::pair{ L"dark orange", til::color{ 255, 140, 0 } }, + std::pair{ L"DarkOrange", til::color{ 255, 140, 0 } }, + std::pair{ L"coral", til::color{ 255, 127, 80 } }, + std::pair{ L"light coral", til::color{ 240, 128, 128 } }, + std::pair{ L"LightCoral", til::color{ 240, 128, 128 } }, + std::pair{ L"tomato", til::color{ 255, 99, 71 } }, + std::pair{ L"orange red", til::color{ 255, 69, 0 } }, + std::pair{ L"OrangeRed", til::color{ 255, 69, 0 } }, + std::pair{ L"red", til::color{ 255, 0, 0 } }, + std::pair{ L"hot pink", til::color{ 255, 105, 180 } }, + std::pair{ L"HotPink", til::color{ 255, 105, 180 } }, + std::pair{ L"deep pink", til::color{ 255, 20, 147 } }, + std::pair{ L"DeepPink", til::color{ 255, 20, 147 } }, + std::pair{ L"pink", til::color{ 255, 192, 203 } }, + std::pair{ L"light pink", til::color{ 255, 182, 193 } }, + std::pair{ L"LightPink", til::color{ 255, 182, 193 } }, + std::pair{ L"pale violet red", til::color{ 219, 112, 147 } }, + std::pair{ L"PaleVioletRed", til::color{ 219, 112, 147 } }, + std::pair{ L"maroon", til::color{ 176, 48, 96 } }, + std::pair{ L"x11 maroon", til::color{ 176, 48, 96 } }, + std::pair{ L"X11Maroon", til::color{ 176, 48, 96 } }, + std::pair{ L"web maroon", til::color{ 128, 0, 0 } }, + std::pair{ L"WebMaroon", til::color{ 128, 0, 0 } }, + std::pair{ L"medium violet red", til::color{ 199, 21, 133 } }, + std::pair{ L"MediumVioletRed", til::color{ 199, 21, 133 } }, + std::pair{ L"violet red", til::color{ 208, 32, 144 } }, + std::pair{ L"VioletRed", til::color{ 208, 32, 144 } }, + std::pair{ L"magenta", til::color{ 255, 0, 255 } }, + std::pair{ L"fuchsia", til::color{ 255, 0, 255 } }, + std::pair{ L"violet", til::color{ 238, 130, 238 } }, + std::pair{ L"plum", til::color{ 221, 160, 221 } }, + std::pair{ L"orchid", til::color{ 218, 112, 214 } }, + std::pair{ L"medium orchid", til::color{ 186, 85, 211 } }, + std::pair{ L"MediumOrchid", til::color{ 186, 85, 211 } }, + std::pair{ L"dark orchid", til::color{ 153, 50, 204 } }, + std::pair{ L"DarkOrchid", til::color{ 153, 50, 204 } }, + std::pair{ L"dark violet", til::color{ 148, 0, 211 } }, + std::pair{ L"DarkViolet", til::color{ 148, 0, 211 } }, + std::pair{ L"blue violet", til::color{ 138, 43, 226 } }, + std::pair{ L"BlueViolet", til::color{ 138, 43, 226 } }, + std::pair{ L"purple", til::color{ 160, 32, 240 } }, + std::pair{ L"x11 purple", til::color{ 160, 32, 240 } }, + std::pair{ L"X11Purple", til::color{ 160, 32, 240 } }, + std::pair{ L"web purple", til::color{ 128, 0, 128 } }, + std::pair{ L"WebPurple", til::color{ 128, 0, 128 } }, + std::pair{ L"medium purple", til::color{ 147, 112, 219 } }, + std::pair{ L"MediumPurple", til::color{ 147, 112, 219 } }, + std::pair{ L"thistle", til::color{ 216, 191, 216 } }, + std::pair{ L"snow1", til::color{ 255, 250, 250 } }, + std::pair{ L"snow2", til::color{ 238, 233, 233 } }, + std::pair{ L"snow3", til::color{ 205, 201, 201 } }, + std::pair{ L"snow4", til::color{ 139, 137, 137 } }, + std::pair{ L"seashell1", til::color{ 255, 245, 238 } }, + std::pair{ L"seashell2", til::color{ 238, 229, 222 } }, + std::pair{ L"seashell3", til::color{ 205, 197, 191 } }, + std::pair{ L"seashell4", til::color{ 139, 134, 130 } }, + std::pair{ L"AntiqueWhite1", til::color{ 255, 239, 219 } }, + std::pair{ L"AntiqueWhite2", til::color{ 238, 223, 204 } }, + std::pair{ L"AntiqueWhite3", til::color{ 205, 192, 176 } }, + std::pair{ L"AntiqueWhite4", til::color{ 139, 131, 120 } }, + std::pair{ L"bisque1", til::color{ 255, 228, 196 } }, + std::pair{ L"bisque2", til::color{ 238, 213, 183 } }, + std::pair{ L"bisque3", til::color{ 205, 183, 158 } }, + std::pair{ L"bisque4", til::color{ 139, 125, 107 } }, + std::pair{ L"PeachPuff1", til::color{ 255, 218, 185 } }, + std::pair{ L"PeachPuff2", til::color{ 238, 203, 173 } }, + std::pair{ L"PeachPuff3", til::color{ 205, 175, 149 } }, + std::pair{ L"PeachPuff4", til::color{ 139, 119, 101 } }, + std::pair{ L"NavajoWhite1", til::color{ 255, 222, 173 } }, + std::pair{ L"NavajoWhite2", til::color{ 238, 207, 161 } }, + std::pair{ L"NavajoWhite3", til::color{ 205, 179, 139 } }, + std::pair{ L"NavajoWhite4", til::color{ 139, 121, 94 } }, + std::pair{ L"LemonChiffon1", til::color{ 255, 250, 205 } }, + std::pair{ L"LemonChiffon2", til::color{ 238, 233, 191 } }, + std::pair{ L"LemonChiffon3", til::color{ 205, 201, 165 } }, + std::pair{ L"LemonChiffon4", til::color{ 139, 137, 112 } }, + std::pair{ L"cornsilk1", til::color{ 255, 248, 220 } }, + std::pair{ L"cornsilk2", til::color{ 238, 232, 205 } }, + std::pair{ L"cornsilk3", til::color{ 205, 200, 177 } }, + std::pair{ L"cornsilk4", til::color{ 139, 136, 120 } }, + std::pair{ L"ivory1", til::color{ 255, 255, 240 } }, + std::pair{ L"ivory2", til::color{ 238, 238, 224 } }, + std::pair{ L"ivory3", til::color{ 205, 205, 193 } }, + std::pair{ L"ivory4", til::color{ 139, 139, 131 } }, + std::pair{ L"honeydew1", til::color{ 240, 255, 240 } }, + std::pair{ L"honeydew2", til::color{ 224, 238, 224 } }, + std::pair{ L"honeydew3", til::color{ 193, 205, 193 } }, + std::pair{ L"honeydew4", til::color{ 131, 139, 131 } }, + std::pair{ L"LavenderBlush1", til::color{ 255, 240, 245 } }, + std::pair{ L"LavenderBlush2", til::color{ 238, 224, 229 } }, + std::pair{ L"LavenderBlush3", til::color{ 205, 193, 197 } }, + std::pair{ L"LavenderBlush4", til::color{ 139, 131, 134 } }, + std::pair{ L"MistyRose1", til::color{ 255, 228, 225 } }, + std::pair{ L"MistyRose2", til::color{ 238, 213, 210 } }, + std::pair{ L"MistyRose3", til::color{ 205, 183, 181 } }, + std::pair{ L"MistyRose4", til::color{ 139, 125, 123 } }, + std::pair{ L"azure1", til::color{ 240, 255, 255 } }, + std::pair{ L"azure2", til::color{ 224, 238, 238 } }, + std::pair{ L"azure3", til::color{ 193, 205, 205 } }, + std::pair{ L"azure4", til::color{ 131, 139, 139 } }, + std::pair{ L"SlateBlue1", til::color{ 131, 111, 255 } }, + std::pair{ L"SlateBlue2", til::color{ 122, 103, 238 } }, + std::pair{ L"SlateBlue3", til::color{ 105, 89, 205 } }, + std::pair{ L"SlateBlue4", til::color{ 71, 60, 139 } }, + std::pair{ L"RoyalBlue1", til::color{ 72, 118, 255 } }, + std::pair{ L"RoyalBlue2", til::color{ 67, 110, 238 } }, + std::pair{ L"RoyalBlue3", til::color{ 58, 95, 205 } }, + std::pair{ L"RoyalBlue4", til::color{ 39, 64, 139 } }, + std::pair{ L"blue1", til::color{ 0, 0, 255 } }, + std::pair{ L"blue2", til::color{ 0, 0, 238 } }, + std::pair{ L"blue3", til::color{ 0, 0, 205 } }, + std::pair{ L"blue4", til::color{ 0, 0, 139 } }, + std::pair{ L"DodgerBlue1", til::color{ 30, 144, 255 } }, + std::pair{ L"DodgerBlue2", til::color{ 28, 134, 238 } }, + std::pair{ L"DodgerBlue3", til::color{ 24, 116, 205 } }, + std::pair{ L"DodgerBlue4", til::color{ 16, 78, 139 } }, + std::pair{ L"SteelBlue1", til::color{ 99, 184, 255 } }, + std::pair{ L"SteelBlue2", til::color{ 92, 172, 238 } }, + std::pair{ L"SteelBlue3", til::color{ 79, 148, 205 } }, + std::pair{ L"SteelBlue4", til::color{ 54, 100, 139 } }, + std::pair{ L"DeepSkyBlue1", til::color{ 0, 191, 255 } }, + std::pair{ L"DeepSkyBlue2", til::color{ 0, 178, 238 } }, + std::pair{ L"DeepSkyBlue3", til::color{ 0, 154, 205 } }, + std::pair{ L"DeepSkyBlue4", til::color{ 0, 104, 139 } }, + std::pair{ L"SkyBlue1", til::color{ 135, 206, 255 } }, + std::pair{ L"SkyBlue2", til::color{ 126, 192, 238 } }, + std::pair{ L"SkyBlue3", til::color{ 108, 166, 205 } }, + std::pair{ L"SkyBlue4", til::color{ 74, 112, 139 } }, + std::pair{ L"LightSkyBlue1", til::color{ 176, 226, 255 } }, + std::pair{ L"LightSkyBlue2", til::color{ 164, 211, 238 } }, + std::pair{ L"LightSkyBlue3", til::color{ 141, 182, 205 } }, + std::pair{ L"LightSkyBlue4", til::color{ 96, 123, 139 } }, + std::pair{ L"SlateGray1", til::color{ 198, 226, 255 } }, + std::pair{ L"SlateGray2", til::color{ 185, 211, 238 } }, + std::pair{ L"SlateGray3", til::color{ 159, 182, 205 } }, + std::pair{ L"SlateGray4", til::color{ 108, 123, 139 } }, + std::pair{ L"LightSteelBlue1", til::color{ 202, 225, 255 } }, + std::pair{ L"LightSteelBlue2", til::color{ 188, 210, 238 } }, + std::pair{ L"LightSteelBlue3", til::color{ 162, 181, 205 } }, + std::pair{ L"LightSteelBlue4", til::color{ 110, 123, 139 } }, + std::pair{ L"LightBlue1", til::color{ 191, 239, 255 } }, + std::pair{ L"LightBlue2", til::color{ 178, 223, 238 } }, + std::pair{ L"LightBlue3", til::color{ 154, 192, 205 } }, + std::pair{ L"LightBlue4", til::color{ 104, 131, 139 } }, + std::pair{ L"LightCyan1", til::color{ 224, 255, 255 } }, + std::pair{ L"LightCyan2", til::color{ 209, 238, 238 } }, + std::pair{ L"LightCyan3", til::color{ 180, 205, 205 } }, + std::pair{ L"LightCyan4", til::color{ 122, 139, 139 } }, + std::pair{ L"PaleTurquoise1", til::color{ 187, 255, 255 } }, + std::pair{ L"PaleTurquoise2", til::color{ 174, 238, 238 } }, + std::pair{ L"PaleTurquoise3", til::color{ 150, 205, 205 } }, + std::pair{ L"PaleTurquoise4", til::color{ 102, 139, 139 } }, + std::pair{ L"CadetBlue1", til::color{ 152, 245, 255 } }, + std::pair{ L"CadetBlue2", til::color{ 142, 229, 238 } }, + std::pair{ L"CadetBlue3", til::color{ 122, 197, 205 } }, + std::pair{ L"CadetBlue4", til::color{ 83, 134, 139 } }, + std::pair{ L"turquoise1", til::color{ 0, 245, 255 } }, + std::pair{ L"turquoise2", til::color{ 0, 229, 238 } }, + std::pair{ L"turquoise3", til::color{ 0, 197, 205 } }, + std::pair{ L"turquoise4", til::color{ 0, 134, 139 } }, + std::pair{ L"cyan1", til::color{ 0, 255, 255 } }, + std::pair{ L"cyan2", til::color{ 0, 238, 238 } }, + std::pair{ L"cyan3", til::color{ 0, 205, 205 } }, + std::pair{ L"cyan4", til::color{ 0, 139, 139 } }, + std::pair{ L"DarkSlateGray1", til::color{ 151, 255, 255 } }, + std::pair{ L"DarkSlateGray2", til::color{ 141, 238, 238 } }, + std::pair{ L"DarkSlateGray3", til::color{ 121, 205, 205 } }, + std::pair{ L"DarkSlateGray4", til::color{ 82, 139, 139 } }, + std::pair{ L"aquamarine1", til::color{ 127, 255, 212 } }, + std::pair{ L"aquamarine2", til::color{ 118, 238, 198 } }, + std::pair{ L"aquamarine3", til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine4", til::color{ 69, 139, 116 } }, + std::pair{ L"DarkSeaGreen1", til::color{ 193, 255, 193 } }, + std::pair{ L"DarkSeaGreen2", til::color{ 180, 238, 180 } }, + std::pair{ L"DarkSeaGreen3", til::color{ 155, 205, 155 } }, + std::pair{ L"DarkSeaGreen4", til::color{ 105, 139, 105 } }, + std::pair{ L"SeaGreen1", til::color{ 84, 255, 159 } }, + std::pair{ L"SeaGreen2", til::color{ 78, 238, 148 } }, + std::pair{ L"SeaGreen3", til::color{ 67, 205, 128 } }, + std::pair{ L"SeaGreen4", til::color{ 46, 139, 87 } }, + std::pair{ L"PaleGreen1", til::color{ 154, 255, 154 } }, + std::pair{ L"PaleGreen2", til::color{ 144, 238, 144 } }, + std::pair{ L"PaleGreen3", til::color{ 124, 205, 124 } }, + std::pair{ L"PaleGreen4", til::color{ 84, 139, 84 } }, + std::pair{ L"SpringGreen1", til::color{ 0, 255, 127 } }, + std::pair{ L"SpringGreen2", til::color{ 0, 238, 118 } }, + std::pair{ L"SpringGreen3", til::color{ 0, 205, 102 } }, + std::pair{ L"SpringGreen4", til::color{ 0, 139, 69 } }, + std::pair{ L"green1", til::color{ 0, 255, 0 } }, + std::pair{ L"green2", til::color{ 0, 238, 0 } }, + std::pair{ L"green3", til::color{ 0, 205, 0 } }, + std::pair{ L"green4", til::color{ 0, 139, 0 } }, + std::pair{ L"chartreuse1", til::color{ 127, 255, 0 } }, + std::pair{ L"chartreuse2", til::color{ 118, 238, 0 } }, + std::pair{ L"chartreuse3", til::color{ 102, 205, 0 } }, + std::pair{ L"chartreuse4", til::color{ 69, 139, 0 } }, + std::pair{ L"OliveDrab1", til::color{ 192, 255, 62 } }, + std::pair{ L"OliveDrab2", til::color{ 179, 238, 58 } }, + std::pair{ L"OliveDrab3", til::color{ 154, 205, 50 } }, + std::pair{ L"OliveDrab4", til::color{ 105, 139, 34 } }, + std::pair{ L"DarkOliveGreen1", til::color{ 202, 255, 112 } }, + std::pair{ L"DarkOliveGreen2", til::color{ 188, 238, 104 } }, + std::pair{ L"DarkOliveGreen3", til::color{ 162, 205, 90 } }, + std::pair{ L"DarkOliveGreen4", til::color{ 110, 139, 61 } }, + std::pair{ L"khaki1", til::color{ 255, 246, 143 } }, + std::pair{ L"khaki2", til::color{ 238, 230, 133 } }, + std::pair{ L"khaki3", til::color{ 205, 198, 115 } }, + std::pair{ L"khaki4", til::color{ 139, 134, 78 } }, + std::pair{ L"LightGoldenrod1", til::color{ 255, 236, 139 } }, + std::pair{ L"LightGoldenrod2", til::color{ 238, 220, 130 } }, + std::pair{ L"LightGoldenrod3", til::color{ 205, 190, 112 } }, + std::pair{ L"LightGoldenrod4", til::color{ 139, 129, 76 } }, + std::pair{ L"LightYellow1", til::color{ 255, 255, 224 } }, + std::pair{ L"LightYellow2", til::color{ 238, 238, 209 } }, + std::pair{ L"LightYellow3", til::color{ 205, 205, 180 } }, + std::pair{ L"LightYellow4", til::color{ 139, 139, 122 } }, + std::pair{ L"yellow1", til::color{ 255, 255, 0 } }, + std::pair{ L"yellow2", til::color{ 238, 238, 0 } }, + std::pair{ L"yellow3", til::color{ 205, 205, 0 } }, + std::pair{ L"yellow4", til::color{ 139, 139, 0 } }, + std::pair{ L"gold1", til::color{ 255, 215, 0 } }, + std::pair{ L"gold2", til::color{ 238, 201, 0 } }, + std::pair{ L"gold3", til::color{ 205, 173, 0 } }, + std::pair{ L"gold4", til::color{ 139, 117, 0 } }, + std::pair{ L"goldenrod1", til::color{ 255, 193, 37 } }, + std::pair{ L"goldenrod2", til::color{ 238, 180, 34 } }, + std::pair{ L"goldenrod3", til::color{ 205, 155, 29 } }, + std::pair{ L"goldenrod4", til::color{ 139, 105, 20 } }, + std::pair{ L"DarkGoldenrod1", til::color{ 255, 185, 15 } }, + std::pair{ L"DarkGoldenrod2", til::color{ 238, 173, 14 } }, + std::pair{ L"DarkGoldenrod3", til::color{ 205, 149, 12 } }, + std::pair{ L"DarkGoldenrod4", til::color{ 139, 101, 8 } }, + std::pair{ L"RosyBrown1", til::color{ 255, 193, 193 } }, + std::pair{ L"RosyBrown2", til::color{ 238, 180, 180 } }, + std::pair{ L"RosyBrown3", til::color{ 205, 155, 155 } }, + std::pair{ L"RosyBrown4", til::color{ 139, 105, 105 } }, + std::pair{ L"IndianRed1", til::color{ 255, 106, 106 } }, + std::pair{ L"IndianRed2", til::color{ 238, 99, 99 } }, + std::pair{ L"IndianRed3", til::color{ 205, 85, 85 } }, + std::pair{ L"IndianRed4", til::color{ 139, 58, 58 } }, + std::pair{ L"sienna1", til::color{ 255, 130, 71 } }, + std::pair{ L"sienna2", til::color{ 238, 121, 66 } }, + std::pair{ L"sienna3", til::color{ 205, 104, 57 } }, + std::pair{ L"sienna4", til::color{ 139, 71, 38 } }, + std::pair{ L"burlywood1", til::color{ 255, 211, 155 } }, + std::pair{ L"burlywood2", til::color{ 238, 197, 145 } }, + std::pair{ L"burlywood3", til::color{ 205, 170, 125 } }, + std::pair{ L"burlywood4", til::color{ 139, 115, 85 } }, + std::pair{ L"wheat1", til::color{ 255, 231, 186 } }, + std::pair{ L"wheat2", til::color{ 238, 216, 174 } }, + std::pair{ L"wheat3", til::color{ 205, 186, 150 } }, + std::pair{ L"wheat4", til::color{ 139, 126, 102 } }, + std::pair{ L"tan1", til::color{ 255, 165, 79 } }, + std::pair{ L"tan2", til::color{ 238, 154, 73 } }, + std::pair{ L"tan3", til::color{ 205, 133, 63 } }, + std::pair{ L"tan4", til::color{ 139, 90, 43 } }, + std::pair{ L"chocolate1", til::color{ 255, 127, 36 } }, + std::pair{ L"chocolate2", til::color{ 238, 118, 33 } }, + std::pair{ L"chocolate3", til::color{ 205, 102, 29 } }, + std::pair{ L"chocolate4", til::color{ 139, 69, 19 } }, + std::pair{ L"firebrick1", til::color{ 255, 48, 48 } }, + std::pair{ L"firebrick2", til::color{ 238, 44, 44 } }, + std::pair{ L"firebrick3", til::color{ 205, 38, 38 } }, + std::pair{ L"firebrick4", til::color{ 139, 26, 26 } }, + std::pair{ L"brown1", til::color{ 255, 64, 64 } }, + std::pair{ L"brown2", til::color{ 238, 59, 59 } }, + std::pair{ L"brown3", til::color{ 205, 51, 51 } }, + std::pair{ L"brown4", til::color{ 139, 35, 35 } }, + std::pair{ L"salmon1", til::color{ 255, 140, 105 } }, + std::pair{ L"salmon2", til::color{ 238, 130, 98 } }, + std::pair{ L"salmon3", til::color{ 205, 112, 84 } }, + std::pair{ L"salmon4", til::color{ 139, 76, 57 } }, + std::pair{ L"LightSalmon1", til::color{ 255, 160, 122 } }, + std::pair{ L"LightSalmon2", til::color{ 238, 149, 114 } }, + std::pair{ L"LightSalmon3", til::color{ 205, 129, 98 } }, + std::pair{ L"LightSalmon4", til::color{ 139, 87, 66 } }, + std::pair{ L"orange1", til::color{ 255, 165, 0 } }, + std::pair{ L"orange2", til::color{ 238, 154, 0 } }, + std::pair{ L"orange3", til::color{ 205, 133, 0 } }, + std::pair{ L"orange4", til::color{ 139, 90, 0 } }, + std::pair{ L"DarkOrange1", til::color{ 255, 127, 0 } }, + std::pair{ L"DarkOrange2", til::color{ 238, 118, 0 } }, + std::pair{ L"DarkOrange3", til::color{ 205, 102, 0 } }, + std::pair{ L"DarkOrange4", til::color{ 139, 69, 0 } }, + std::pair{ L"coral1", til::color{ 255, 114, 86 } }, + std::pair{ L"coral2", til::color{ 238, 106, 80 } }, + std::pair{ L"coral3", til::color{ 205, 91, 69 } }, + std::pair{ L"coral4", til::color{ 139, 62, 47 } }, + std::pair{ L"tomato1", til::color{ 255, 99, 71 } }, + std::pair{ L"tomato2", til::color{ 238, 92, 66 } }, + std::pair{ L"tomato3", til::color{ 205, 79, 57 } }, + std::pair{ L"tomato4", til::color{ 139, 54, 38 } }, + std::pair{ L"OrangeRed1", til::color{ 255, 69, 0 } }, + std::pair{ L"OrangeRed2", til::color{ 238, 64, 0 } }, + std::pair{ L"OrangeRed3", til::color{ 205, 55, 0 } }, + std::pair{ L"OrangeRed4", til::color{ 139, 37, 0 } }, + std::pair{ L"red1", til::color{ 255, 0, 0 } }, + std::pair{ L"red2", til::color{ 238, 0, 0 } }, + std::pair{ L"red3", til::color{ 205, 0, 0 } }, + std::pair{ L"red4", til::color{ 139, 0, 0 } }, + std::pair{ L"DeepPink1", til::color{ 255, 20, 147 } }, + std::pair{ L"DeepPink2", til::color{ 238, 18, 137 } }, + std::pair{ L"DeepPink3", til::color{ 205, 16, 118 } }, + std::pair{ L"DeepPink4", til::color{ 139, 10, 80 } }, + std::pair{ L"HotPink1", til::color{ 255, 110, 180 } }, + std::pair{ L"HotPink2", til::color{ 238, 106, 167 } }, + std::pair{ L"HotPink3", til::color{ 205, 96, 144 } }, + std::pair{ L"HotPink4", til::color{ 139, 58, 98 } }, + std::pair{ L"pink1", til::color{ 255, 181, 197 } }, + std::pair{ L"pink2", til::color{ 238, 169, 184 } }, + std::pair{ L"pink3", til::color{ 205, 145, 158 } }, + std::pair{ L"pink4", til::color{ 139, 99, 108 } }, + std::pair{ L"LightPink1", til::color{ 255, 174, 185 } }, + std::pair{ L"LightPink2", til::color{ 238, 162, 173 } }, + std::pair{ L"LightPink3", til::color{ 205, 140, 149 } }, + std::pair{ L"LightPink4", til::color{ 139, 95, 101 } }, + std::pair{ L"PaleVioletRed1", til::color{ 255, 130, 171 } }, + std::pair{ L"PaleVioletRed2", til::color{ 238, 121, 159 } }, + std::pair{ L"PaleVioletRed3", til::color{ 205, 104, 137 } }, + std::pair{ L"PaleVioletRed4", til::color{ 139, 71, 93 } }, + std::pair{ L"maroon1", til::color{ 255, 52, 179 } }, + std::pair{ L"maroon2", til::color{ 238, 48, 167 } }, + std::pair{ L"maroon3", til::color{ 205, 41, 144 } }, + std::pair{ L"maroon4", til::color{ 139, 28, 98 } }, + std::pair{ L"VioletRed1", til::color{ 255, 62, 150 } }, + std::pair{ L"VioletRed2", til::color{ 238, 58, 140 } }, + std::pair{ L"VioletRed3", til::color{ 205, 50, 120 } }, + std::pair{ L"VioletRed4", til::color{ 139, 34, 82 } }, + std::pair{ L"magenta1", til::color{ 255, 0, 255 } }, + std::pair{ L"magenta2", til::color{ 238, 0, 238 } }, + std::pair{ L"magenta3", til::color{ 205, 0, 205 } }, + std::pair{ L"magenta4", til::color{ 139, 0, 139 } }, + std::pair{ L"orchid1", til::color{ 255, 131, 250 } }, + std::pair{ L"orchid2", til::color{ 238, 122, 233 } }, + std::pair{ L"orchid3", til::color{ 205, 105, 201 } }, + std::pair{ L"orchid4", til::color{ 139, 71, 137 } }, + std::pair{ L"plum1", til::color{ 255, 187, 255 } }, + std::pair{ L"plum2", til::color{ 238, 174, 238 } }, + std::pair{ L"plum3", til::color{ 205, 150, 205 } }, + std::pair{ L"plum4", til::color{ 139, 102, 139 } }, + std::pair{ L"MediumOrchid1", til::color{ 224, 102, 255 } }, + std::pair{ L"MediumOrchid2", til::color{ 209, 95, 238 } }, + std::pair{ L"MediumOrchid3", til::color{ 180, 82, 205 } }, + std::pair{ L"MediumOrchid4", til::color{ 122, 55, 139 } }, + std::pair{ L"DarkOrchid1", til::color{ 191, 62, 255 } }, + std::pair{ L"DarkOrchid2", til::color{ 178, 58, 238 } }, + std::pair{ L"DarkOrchid3", til::color{ 154, 50, 205 } }, + std::pair{ L"DarkOrchid4", til::color{ 104, 34, 139 } }, + std::pair{ L"purple1", til::color{ 155, 48, 255 } }, + std::pair{ L"purple2", til::color{ 145, 44, 238 } }, + std::pair{ L"purple3", til::color{ 125, 38, 205 } }, + std::pair{ L"purple4", til::color{ 85, 26, 139 } }, + std::pair{ L"MediumPurple1", til::color{ 171, 130, 255 } }, + std::pair{ L"MediumPurple2", til::color{ 159, 121, 238 } }, + std::pair{ L"MediumPurple3", til::color{ 137, 104, 205 } }, + std::pair{ L"MediumPurple4", til::color{ 93, 71, 139 } }, + std::pair{ L"thistle1", til::color{ 255, 225, 255 } }, + std::pair{ L"thistle2", til::color{ 238, 210, 238 } }, + std::pair{ L"thistle3", til::color{ 205, 181, 205 } }, + std::pair{ L"thistle4", til::color{ 139, 123, 139 } }, + std::pair{ L"gray0", til::color{ 0, 0, 0 } }, + std::pair{ L"grey0", til::color{ 0, 0, 0 } }, + std::pair{ L"gray1", til::color{ 3, 3, 3 } }, + std::pair{ L"grey1", til::color{ 3, 3, 3 } }, + std::pair{ L"gray2", til::color{ 5, 5, 5 } }, + std::pair{ L"grey2", til::color{ 5, 5, 5 } }, + std::pair{ L"gray3", til::color{ 8, 8, 8 } }, + std::pair{ L"grey3", til::color{ 8, 8, 8 } }, + std::pair{ L"gray4", til::color{ 10, 10, 10 } }, + std::pair{ L"grey4", til::color{ 10, 10, 10 } }, + std::pair{ L"gray5", til::color{ 13, 13, 13 } }, + std::pair{ L"grey5", til::color{ 13, 13, 13 } }, + std::pair{ L"gray6", til::color{ 15, 15, 15 } }, + std::pair{ L"grey6", til::color{ 15, 15, 15 } }, + std::pair{ L"gray7", til::color{ 18, 18, 18 } }, + std::pair{ L"grey7", til::color{ 18, 18, 18 } }, + std::pair{ L"gray8", til::color{ 20, 20, 20 } }, + std::pair{ L"grey8", til::color{ 20, 20, 20 } }, + std::pair{ L"gray9", til::color{ 23, 23, 23 } }, + std::pair{ L"grey9", til::color{ 23, 23, 23 } }, + std::pair{ L"gray10", til::color{ 26, 26, 26 } }, + std::pair{ L"grey10", til::color{ 26, 26, 26 } }, + std::pair{ L"gray11", til::color{ 28, 28, 28 } }, + std::pair{ L"grey11", til::color{ 28, 28, 28 } }, + std::pair{ L"gray12", til::color{ 31, 31, 31 } }, + std::pair{ L"grey12", til::color{ 31, 31, 31 } }, + std::pair{ L"gray13", til::color{ 33, 33, 33 } }, + std::pair{ L"grey13", til::color{ 33, 33, 33 } }, + std::pair{ L"gray14", til::color{ 36, 36, 36 } }, + std::pair{ L"grey14", til::color{ 36, 36, 36 } }, + std::pair{ L"gray15", til::color{ 38, 38, 38 } }, + std::pair{ L"grey15", til::color{ 38, 38, 38 } }, + std::pair{ L"gray16", til::color{ 41, 41, 41 } }, + std::pair{ L"grey16", til::color{ 41, 41, 41 } }, + std::pair{ L"gray17", til::color{ 43, 43, 43 } }, + std::pair{ L"grey17", til::color{ 43, 43, 43 } }, + std::pair{ L"gray18", til::color{ 46, 46, 46 } }, + std::pair{ L"grey18", til::color{ 46, 46, 46 } }, + std::pair{ L"gray19", til::color{ 48, 48, 48 } }, + std::pair{ L"grey19", til::color{ 48, 48, 48 } }, + std::pair{ L"gray20", til::color{ 51, 51, 51 } }, + std::pair{ L"grey20", til::color{ 51, 51, 51 } }, + std::pair{ L"gray21", til::color{ 54, 54, 54 } }, + std::pair{ L"grey21", til::color{ 54, 54, 54 } }, + std::pair{ L"gray22", til::color{ 56, 56, 56 } }, + std::pair{ L"grey22", til::color{ 56, 56, 56 } }, + std::pair{ L"gray23", til::color{ 59, 59, 59 } }, + std::pair{ L"grey23", til::color{ 59, 59, 59 } }, + std::pair{ L"gray24", til::color{ 61, 61, 61 } }, + std::pair{ L"grey24", til::color{ 61, 61, 61 } }, + std::pair{ L"gray25", til::color{ 64, 64, 64 } }, + std::pair{ L"grey25", til::color{ 64, 64, 64 } }, + std::pair{ L"gray26", til::color{ 66, 66, 66 } }, + std::pair{ L"grey26", til::color{ 66, 66, 66 } }, + std::pair{ L"gray27", til::color{ 69, 69, 69 } }, + std::pair{ L"grey27", til::color{ 69, 69, 69 } }, + std::pair{ L"gray28", til::color{ 71, 71, 71 } }, + std::pair{ L"grey28", til::color{ 71, 71, 71 } }, + std::pair{ L"gray29", til::color{ 74, 74, 74 } }, + std::pair{ L"grey29", til::color{ 74, 74, 74 } }, + std::pair{ L"gray30", til::color{ 77, 77, 77 } }, + std::pair{ L"grey30", til::color{ 77, 77, 77 } }, + std::pair{ L"gray31", til::color{ 79, 79, 79 } }, + std::pair{ L"grey31", til::color{ 79, 79, 79 } }, + std::pair{ L"gray32", til::color{ 82, 82, 82 } }, + std::pair{ L"grey32", til::color{ 82, 82, 82 } }, + std::pair{ L"gray33", til::color{ 84, 84, 84 } }, + std::pair{ L"grey33", til::color{ 84, 84, 84 } }, + std::pair{ L"gray34", til::color{ 87, 87, 87 } }, + std::pair{ L"grey34", til::color{ 87, 87, 87 } }, + std::pair{ L"gray35", til::color{ 89, 89, 89 } }, + std::pair{ L"grey35", til::color{ 89, 89, 89 } }, + std::pair{ L"gray36", til::color{ 92, 92, 92 } }, + std::pair{ L"grey36", til::color{ 92, 92, 92 } }, + std::pair{ L"gray37", til::color{ 94, 94, 94 } }, + std::pair{ L"grey37", til::color{ 94, 94, 94 } }, + std::pair{ L"gray38", til::color{ 97, 97, 97 } }, + std::pair{ L"grey38", til::color{ 97, 97, 97 } }, + std::pair{ L"gray39", til::color{ 99, 99, 99 } }, + std::pair{ L"grey39", til::color{ 99, 99, 99 } }, + std::pair{ L"gray40", til::color{ 102, 102, 102 } }, + std::pair{ L"grey40", til::color{ 102, 102, 102 } }, + std::pair{ L"gray41", til::color{ 105, 105, 105 } }, + std::pair{ L"grey41", til::color{ 105, 105, 105 } }, + std::pair{ L"gray42", til::color{ 107, 107, 107 } }, + std::pair{ L"grey42", til::color{ 107, 107, 107 } }, + std::pair{ L"gray43", til::color{ 110, 110, 110 } }, + std::pair{ L"grey43", til::color{ 110, 110, 110 } }, + std::pair{ L"gray44", til::color{ 112, 112, 112 } }, + std::pair{ L"grey44", til::color{ 112, 112, 112 } }, + std::pair{ L"gray45", til::color{ 115, 115, 115 } }, + std::pair{ L"grey45", til::color{ 115, 115, 115 } }, + std::pair{ L"gray46", til::color{ 117, 117, 117 } }, + std::pair{ L"grey46", til::color{ 117, 117, 117 } }, + std::pair{ L"gray47", til::color{ 120, 120, 120 } }, + std::pair{ L"grey47", til::color{ 120, 120, 120 } }, + std::pair{ L"gray48", til::color{ 122, 122, 122 } }, + std::pair{ L"grey48", til::color{ 122, 122, 122 } }, + std::pair{ L"gray49", til::color{ 125, 125, 125 } }, + std::pair{ L"grey49", til::color{ 125, 125, 125 } }, + std::pair{ L"gray50", til::color{ 127, 127, 127 } }, + std::pair{ L"grey50", til::color{ 127, 127, 127 } }, + std::pair{ L"gray51", til::color{ 130, 130, 130 } }, + std::pair{ L"grey51", til::color{ 130, 130, 130 } }, + std::pair{ L"gray52", til::color{ 133, 133, 133 } }, + std::pair{ L"grey52", til::color{ 133, 133, 133 } }, + std::pair{ L"gray53", til::color{ 135, 135, 135 } }, + std::pair{ L"grey53", til::color{ 135, 135, 135 } }, + std::pair{ L"gray54", til::color{ 138, 138, 138 } }, + std::pair{ L"grey54", til::color{ 138, 138, 138 } }, + std::pair{ L"gray55", til::color{ 140, 140, 140 } }, + std::pair{ L"grey55", til::color{ 140, 140, 140 } }, + std::pair{ L"gray56", til::color{ 143, 143, 143 } }, + std::pair{ L"grey56", til::color{ 143, 143, 143 } }, + std::pair{ L"gray57", til::color{ 145, 145, 145 } }, + std::pair{ L"grey57", til::color{ 145, 145, 145 } }, + std::pair{ L"gray58", til::color{ 148, 148, 148 } }, + std::pair{ L"grey58", til::color{ 148, 148, 148 } }, + std::pair{ L"gray59", til::color{ 150, 150, 150 } }, + std::pair{ L"grey59", til::color{ 150, 150, 150 } }, + std::pair{ L"gray60", til::color{ 153, 153, 153 } }, + std::pair{ L"grey60", til::color{ 153, 153, 153 } }, + std::pair{ L"gray61", til::color{ 156, 156, 156 } }, + std::pair{ L"grey61", til::color{ 156, 156, 156 } }, + std::pair{ L"gray62", til::color{ 158, 158, 158 } }, + std::pair{ L"grey62", til::color{ 158, 158, 158 } }, + std::pair{ L"gray63", til::color{ 161, 161, 161 } }, + std::pair{ L"grey63", til::color{ 161, 161, 161 } }, + std::pair{ L"gray64", til::color{ 163, 163, 163 } }, + std::pair{ L"grey64", til::color{ 163, 163, 163 } }, + std::pair{ L"gray65", til::color{ 166, 166, 166 } }, + std::pair{ L"grey65", til::color{ 166, 166, 166 } }, + std::pair{ L"gray66", til::color{ 168, 168, 168 } }, + std::pair{ L"grey66", til::color{ 168, 168, 168 } }, + std::pair{ L"gray67", til::color{ 171, 171, 171 } }, + std::pair{ L"grey67", til::color{ 171, 171, 171 } }, + std::pair{ L"gray68", til::color{ 173, 173, 173 } }, + std::pair{ L"grey68", til::color{ 173, 173, 173 } }, + std::pair{ L"gray69", til::color{ 176, 176, 176 } }, + std::pair{ L"grey69", til::color{ 176, 176, 176 } }, + std::pair{ L"gray70", til::color{ 179, 179, 179 } }, + std::pair{ L"grey70", til::color{ 179, 179, 179 } }, + std::pair{ L"gray71", til::color{ 181, 181, 181 } }, + std::pair{ L"grey71", til::color{ 181, 181, 181 } }, + std::pair{ L"gray72", til::color{ 184, 184, 184 } }, + std::pair{ L"grey72", til::color{ 184, 184, 184 } }, + std::pair{ L"gray73", til::color{ 186, 186, 186 } }, + std::pair{ L"grey73", til::color{ 186, 186, 186 } }, + std::pair{ L"gray74", til::color{ 189, 189, 189 } }, + std::pair{ L"grey74", til::color{ 189, 189, 189 } }, + std::pair{ L"gray75", til::color{ 191, 191, 191 } }, + std::pair{ L"grey75", til::color{ 191, 191, 191 } }, + std::pair{ L"gray76", til::color{ 194, 194, 194 } }, + std::pair{ L"grey76", til::color{ 194, 194, 194 } }, + std::pair{ L"gray77", til::color{ 196, 196, 196 } }, + std::pair{ L"grey77", til::color{ 196, 196, 196 } }, + std::pair{ L"gray78", til::color{ 199, 199, 199 } }, + std::pair{ L"grey78", til::color{ 199, 199, 199 } }, + std::pair{ L"gray79", til::color{ 201, 201, 201 } }, + std::pair{ L"grey79", til::color{ 201, 201, 201 } }, + std::pair{ L"gray80", til::color{ 204, 204, 204 } }, + std::pair{ L"grey80", til::color{ 204, 204, 204 } }, + std::pair{ L"gray81", til::color{ 207, 207, 207 } }, + std::pair{ L"grey81", til::color{ 207, 207, 207 } }, + std::pair{ L"gray82", til::color{ 209, 209, 209 } }, + std::pair{ L"grey82", til::color{ 209, 209, 209 } }, + std::pair{ L"gray83", til::color{ 212, 212, 212 } }, + std::pair{ L"grey83", til::color{ 212, 212, 212 } }, + std::pair{ L"gray84", til::color{ 214, 214, 214 } }, + std::pair{ L"grey84", til::color{ 214, 214, 214 } }, + std::pair{ L"gray85", til::color{ 217, 217, 217 } }, + std::pair{ L"grey85", til::color{ 217, 217, 217 } }, + std::pair{ L"gray86", til::color{ 219, 219, 219 } }, + std::pair{ L"grey86", til::color{ 219, 219, 219 } }, + std::pair{ L"gray87", til::color{ 222, 222, 222 } }, + std::pair{ L"grey87", til::color{ 222, 222, 222 } }, + std::pair{ L"gray88", til::color{ 224, 224, 224 } }, + std::pair{ L"grey88", til::color{ 224, 224, 224 } }, + std::pair{ L"gray89", til::color{ 227, 227, 227 } }, + std::pair{ L"grey89", til::color{ 227, 227, 227 } }, + std::pair{ L"gray90", til::color{ 229, 229, 229 } }, + std::pair{ L"grey90", til::color{ 229, 229, 229 } }, + std::pair{ L"gray91", til::color{ 232, 232, 232 } }, + std::pair{ L"grey91", til::color{ 232, 232, 232 } }, + std::pair{ L"gray92", til::color{ 235, 235, 235 } }, + std::pair{ L"grey92", til::color{ 235, 235, 235 } }, + std::pair{ L"gray93", til::color{ 237, 237, 237 } }, + std::pair{ L"grey93", til::color{ 237, 237, 237 } }, + std::pair{ L"gray94", til::color{ 240, 240, 240 } }, + std::pair{ L"grey94", til::color{ 240, 240, 240 } }, + std::pair{ L"gray95", til::color{ 242, 242, 242 } }, + std::pair{ L"grey95", til::color{ 242, 242, 242 } }, + std::pair{ L"gray96", til::color{ 245, 245, 245 } }, + std::pair{ L"grey96", til::color{ 245, 245, 245 } }, + std::pair{ L"gray97", til::color{ 247, 247, 247 } }, + std::pair{ L"grey97", til::color{ 247, 247, 247 } }, + std::pair{ L"gray98", til::color{ 250, 250, 250 } }, + std::pair{ L"grey98", til::color{ 250, 250, 250 } }, + std::pair{ L"gray99", til::color{ 252, 252, 252 } }, + std::pair{ L"grey99", til::color{ 252, 252, 252 } }, + std::pair{ L"gray100", til::color{ 255, 255, 255 } }, + std::pair{ L"grey100", til::color{ 255, 255, 255 } }, + std::pair{ L"dark grey", til::color{ 169, 169, 169 } }, + std::pair{ L"DarkGrey", til::color{ 169, 169, 169 } }, + std::pair{ L"dark gray", til::color{ 169, 169, 169 } }, + std::pair{ L"DarkGray", til::color{ 169, 169, 169 } }, + std::pair{ L"dark blue", til::color{ 0, 0, 139 } }, + std::pair{ L"DarkBlue", til::color{ 0, 0, 139 } }, + std::pair{ L"dark cyan", til::color{ 0, 139, 139 } }, + std::pair{ L"DarkCyan", til::color{ 0, 139, 139 } }, + std::pair{ L"dark magenta", til::color{ 139, 0, 139 } }, + std::pair{ L"DarkMagenta", til::color{ 139, 0, 139 } }, + std::pair{ L"dark red", til::color{ 139, 0, 0 } }, + std::pair{ L"DarkRed", til::color{ 139, 0, 0 } }, + std::pair{ L"light green", til::color{ 144, 238, 144 } }, + std::pair{ L"LightGreen", til::color{ 144, 238, 144 } }, + std::pair{ L"crimson", til::color{ 220, 20, 60 } }, + std::pair{ L"indigo", til::color{ 75, 0, 130 } }, + std::pair{ L"olive", til::color{ 128, 128, 0 } }, + std::pair{ L"rebecca purple", til::color{ 102, 51, 153 } }, + std::pair{ L"RebeccaPurple", til::color{ 102, 51, 153 } }, + std::pair{ L"silver", til::color{ 192, 192, 192 } }, + std::pair{ L"teal", til::color{ 0, 128, 128 } } +}; + // Function Description: // - Creates a String representation of a guid, in the format // "{12345678-ABCD-EF12-3456-7890ABCDEF12}" @@ -377,6 +1163,19 @@ til::color Utils::ColorFromHexString(const std::string_view str) return til::color{ r, g, b }; } +// Function Description: +// - Parses a color from a string based on the XOrg app color name table. +// Arguments: +// - str: a string representation of the color name to parse +// Return Value: +// - A til::color if the string could successfully be parsed. If the string is not +// in the table, throws runtime_error +til::color Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) +{ + const std::wstring key(wstr); + return xorgAppColorTable.at(key); +} + // Routine Description: // - Shorthand check if a handle value is null or invalid. // Arguments: From 178c84bd379d43fafe87687971906f92feabfb5f Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Fri, 11 Sep 2020 20:42:06 +0800 Subject: [PATCH 07/43] Spell check --- .github/actions/spell-check/dictionary/dictionary.txt | 3 +++ .github/actions/spell-check/dictionary/names.txt | 1 + .github/actions/spell-check/expect/expect.txt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/actions/spell-check/dictionary/dictionary.txt b/.github/actions/spell-check/dictionary/dictionary.txt index 7344a626ea2..4de8ac932c4 100644 --- a/.github/actions/spell-check/dictionary/dictionary.txt +++ b/.github/actions/spell-check/dictionary/dictionary.txt @@ -55872,6 +55872,7 @@ burly burly-boned burly-faced burly-headed +burlywood Burma burma Burman @@ -87385,6 +87386,7 @@ cornrows corns cornsack corn-salad +cornsilk corn-snake Cornstalk corn-stalk @@ -154290,6 +154292,7 @@ gainsayer gainsayers gainsaying gainsays +gainsboro Gainsborough gainset gainsome diff --git a/.github/actions/spell-check/dictionary/names.txt b/.github/actions/spell-check/dictionary/names.txt index c7f4c1f2b15..7b524299c78 100644 --- a/.github/actions/spell-check/dictionary/names.txt +++ b/.github/actions/spell-check/dictionary/names.txt @@ -44,6 +44,7 @@ pauldotknopf PGP Pham Rincewind +rebecca rprichard Schoonover Somuah diff --git a/.github/actions/spell-check/expect/expect.txt b/.github/actions/spell-check/expect/expect.txt index 5205fc37b63..345ae60084d 100644 --- a/.github/actions/spell-check/expect/expect.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -2801,6 +2801,8 @@ XMFLOAT xml xmlns xor +xorg +XOrg Xpath XPosition XResource From 6d43bec8df07c8b3b515c9d1be234de4494536bb Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 12 Sep 2020 09:07:32 +0800 Subject: [PATCH 08/43] I think spell check won't be happy... --- .../parser/OutputStateMachineEngine.cpp | 2 +- .../parser/ut_parser/OutputEngineTest.cpp | 6 +- src/types/utils.cpp | 1573 +++++++++-------- 3 files changed, 793 insertions(+), 788 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 118005d9e6b..2797c330428 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1576,7 +1576,7 @@ try // Calculate the actual color value based on the hex digit count. auto& colorValue = til::at(colorValues, component); - const auto scaleMultiplier = 0x11; + const auto scaleMultiplier = isSharpSignFormat ? 0x10 : 0x11; const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); colorValue = parameterValue * scaleMultiplier / scaleDivisor; } diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 265e497ba53..96d4be8b8dc 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -644,7 +644,7 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#111", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + VERIFY_ARE_EQUAL(color, RGB(0x10, 0x10, 0x10)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456", color)); VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x56)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456789", color)); @@ -2563,7 +2563,7 @@ class StateMachineExternalTest final mach.ProcessString(L"\033]10;#111\033\\"); VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); - VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultForegroundColor); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); pDispatch->ClearState(); @@ -2601,7 +2601,7 @@ class StateMachineExternalTest final mach.ProcessString(L"\033]11;#111\033\\"); VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); - VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_defaultBackgroundColor); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultBackgroundColor); pDispatch->ClearState(); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 15337aefa3a..88fdf941edd 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -3,8 +3,10 @@ #include "precomp.h" #include "inc/utils.hpp" +#include "inc/convert.hpp" #include "til/static_map.h" +using namespace std::string_view_literals; using namespace Microsoft::Console; static constexpr std::array campbellColorTable{ @@ -285,789 +287,789 @@ static constexpr std::array standardXterm256ColorTable{ til::color{ 0xEE, 0xEE, 0xEE }, }; -static til::static_map, 782> xorgAppColorTable{ - std::pair{ L"snow", til::color{ 255, 250, 250 } }, - std::pair{ L"ghost white", til::color{ 248, 248, 255 } }, - std::pair{ L"GhostWhite", til::color{ 248, 248, 255 } }, - std::pair{ L"white smoke", til::color{ 245, 245, 245 } }, - std::pair{ L"WhiteSmoke", til::color{ 245, 245, 245 } }, - std::pair{ L"gainsboro", til::color{ 220, 220, 220 } }, - std::pair{ L"floral white", til::color{ 255, 250, 240 } }, - std::pair{ L"FloralWhite", til::color{ 255, 250, 240 } }, - std::pair{ L"old lace", til::color{ 253, 245, 230 } }, - std::pair{ L"OldLace", til::color{ 253, 245, 230 } }, - std::pair{ L"linen", til::color{ 250, 240, 230 } }, - std::pair{ L"antique white", til::color{ 250, 235, 215 } }, - std::pair{ L"AntiqueWhite", til::color{ 250, 235, 215 } }, - std::pair{ L"papaya whip", til::color{ 255, 239, 213 } }, - std::pair{ L"PapayaWhip", til::color{ 255, 239, 213 } }, - std::pair{ L"blanched almond", til::color{ 255, 235, 205 } }, - std::pair{ L"BlanchedAlmond", til::color{ 255, 235, 205 } }, - std::pair{ L"bisque", til::color{ 255, 228, 196 } }, - std::pair{ L"peach puff", til::color{ 255, 218, 185 } }, - std::pair{ L"PeachPuff", til::color{ 255, 218, 185 } }, - std::pair{ L"navajo white", til::color{ 255, 222, 173 } }, - std::pair{ L"NavajoWhite", til::color{ 255, 222, 173 } }, - std::pair{ L"moccasin", til::color{ 255, 228, 181 } }, - std::pair{ L"cornsilk", til::color{ 255, 248, 220 } }, - std::pair{ L"ivory", til::color{ 255, 255, 240 } }, - std::pair{ L"lemon chiffon", til::color{ 255, 250, 205 } }, - std::pair{ L"LemonChiffon", til::color{ 255, 250, 205 } }, - std::pair{ L"seashell", til::color{ 255, 245, 238 } }, - std::pair{ L"honeydew", til::color{ 240, 255, 240 } }, - std::pair{ L"mint cream", til::color{ 245, 255, 250 } }, - std::pair{ L"MintCream", til::color{ 245, 255, 250 } }, - std::pair{ L"azure", til::color{ 240, 255, 255 } }, - std::pair{ L"alice blue", til::color{ 240, 248, 255 } }, - std::pair{ L"AliceBlue", til::color{ 240, 248, 255 } }, - std::pair{ L"lavender", til::color{ 230, 230, 250 } }, - std::pair{ L"lavender blush", til::color{ 255, 240, 245 } }, - std::pair{ L"LavenderBlush", til::color{ 255, 240, 245 } }, - std::pair{ L"misty rose", til::color{ 255, 228, 225 } }, - std::pair{ L"MistyRose", til::color{ 255, 228, 225 } }, - std::pair{ L"white", til::color{ 255, 255, 255 } }, - std::pair{ L"black", til::color{ 0, 0, 0 } }, - std::pair{ L"dark slate gray", til::color{ 47, 79, 79 } }, - std::pair{ L"DarkSlateGray", til::color{ 47, 79, 79 } }, - std::pair{ L"dark slate grey", til::color{ 47, 79, 79 } }, - std::pair{ L"DarkSlateGrey", til::color{ 47, 79, 79 } }, - std::pair{ L"dim gray", til::color{ 105, 105, 105 } }, - std::pair{ L"DimGray", til::color{ 105, 105, 105 } }, - std::pair{ L"dim grey", til::color{ 105, 105, 105 } }, - std::pair{ L"DimGrey", til::color{ 105, 105, 105 } }, - std::pair{ L"slate gray", til::color{ 112, 128, 144 } }, - std::pair{ L"SlateGray", til::color{ 112, 128, 144 } }, - std::pair{ L"slate grey", til::color{ 112, 128, 144 } }, - std::pair{ L"SlateGrey", til::color{ 112, 128, 144 } }, - std::pair{ L"light slate gray", til::color{ 119, 136, 153 } }, - std::pair{ L"LightSlateGray", til::color{ 119, 136, 153 } }, - std::pair{ L"light slate grey", til::color{ 119, 136, 153 } }, - std::pair{ L"LightSlateGrey", til::color{ 119, 136, 153 } }, - std::pair{ L"gray", til::color{ 190, 190, 190 } }, - std::pair{ L"grey", til::color{ 190, 190, 190 } }, - std::pair{ L"x11 gray", til::color{ 190, 190, 190 } }, - std::pair{ L"X11Gray", til::color{ 190, 190, 190 } }, - std::pair{ L"x11 grey", til::color{ 190, 190, 190 } }, - std::pair{ L"X11Grey", til::color{ 190, 190, 190 } }, - std::pair{ L"web gray", til::color{ 128, 128, 128 } }, - std::pair{ L"WebGray", til::color{ 128, 128, 128 } }, - std::pair{ L"web grey", til::color{ 128, 128, 128 } }, - std::pair{ L"WebGrey", til::color{ 128, 128, 128 } }, - std::pair{ L"light grey", til::color{ 211, 211, 211 } }, - std::pair{ L"LightGrey", til::color{ 211, 211, 211 } }, - std::pair{ L"light gray", til::color{ 211, 211, 211 } }, - std::pair{ L"LightGray", til::color{ 211, 211, 211 } }, - std::pair{ L"midnight blue", til::color{ 25, 25, 112 } }, - std::pair{ L"MidnightBlue", til::color{ 25, 25, 112 } }, - std::pair{ L"navy", til::color{ 0, 0, 128 } }, - std::pair{ L"navy blue", til::color{ 0, 0, 128 } }, - std::pair{ L"NavyBlue", til::color{ 0, 0, 128 } }, - std::pair{ L"cornflower blue", til::color{ 100, 149, 237 } }, - std::pair{ L"CornflowerBlue", til::color{ 100, 149, 237 } }, - std::pair{ L"dark slate blue", til::color{ 72, 61, 139 } }, - std::pair{ L"DarkSlateBlue", til::color{ 72, 61, 139 } }, - std::pair{ L"slate blue", til::color{ 106, 90, 205 } }, - std::pair{ L"SlateBlue", til::color{ 106, 90, 205 } }, - std::pair{ L"medium slate blue", til::color{ 123, 104, 238 } }, - std::pair{ L"MediumSlateBlue", til::color{ 123, 104, 238 } }, - std::pair{ L"light slate blue", til::color{ 132, 112, 255 } }, - std::pair{ L"LightSlateBlue", til::color{ 132, 112, 255 } }, - std::pair{ L"medium blue", til::color{ 0, 0, 205 } }, - std::pair{ L"MediumBlue", til::color{ 0, 0, 205 } }, - std::pair{ L"royal blue", til::color{ 65, 105, 225 } }, - std::pair{ L"RoyalBlue", til::color{ 65, 105, 225 } }, - std::pair{ L"blue", til::color{ 0, 0, 255 } }, - std::pair{ L"dodger blue", til::color{ 30, 144, 255 } }, - std::pair{ L"DodgerBlue", til::color{ 30, 144, 255 } }, - std::pair{ L"deep sky blue", til::color{ 0, 191, 255 } }, - std::pair{ L"DeepSkyBlue", til::color{ 0, 191, 255 } }, - std::pair{ L"sky blue", til::color{ 135, 206, 235 } }, - std::pair{ L"SkyBlue", til::color{ 135, 206, 235 } }, - std::pair{ L"light sky blue", til::color{ 135, 206, 250 } }, - std::pair{ L"LightSkyBlue", til::color{ 135, 206, 250 } }, - std::pair{ L"steel blue", til::color{ 70, 130, 180 } }, - std::pair{ L"SteelBlue", til::color{ 70, 130, 180 } }, - std::pair{ L"light steel blue", til::color{ 176, 196, 222 } }, - std::pair{ L"LightSteelBlue", til::color{ 176, 196, 222 } }, - std::pair{ L"light blue", til::color{ 173, 216, 230 } }, - std::pair{ L"LightBlue", til::color{ 173, 216, 230 } }, - std::pair{ L"powder blue", til::color{ 176, 224, 230 } }, - std::pair{ L"PowderBlue", til::color{ 176, 224, 230 } }, - std::pair{ L"pale turquoise", til::color{ 175, 238, 238 } }, - std::pair{ L"PaleTurquoise", til::color{ 175, 238, 238 } }, - std::pair{ L"dark turquoise", til::color{ 0, 206, 209 } }, - std::pair{ L"DarkTurquoise", til::color{ 0, 206, 209 } }, - std::pair{ L"medium turquoise", til::color{ 72, 209, 204 } }, - std::pair{ L"MediumTurquoise", til::color{ 72, 209, 204 } }, - std::pair{ L"turquoise", til::color{ 64, 224, 208 } }, - std::pair{ L"cyan", til::color{ 0, 255, 255 } }, - std::pair{ L"aqua", til::color{ 0, 255, 255 } }, - std::pair{ L"light cyan", til::color{ 224, 255, 255 } }, - std::pair{ L"LightCyan", til::color{ 224, 255, 255 } }, - std::pair{ L"cadet blue", til::color{ 95, 158, 160 } }, - std::pair{ L"CadetBlue", til::color{ 95, 158, 160 } }, - std::pair{ L"medium aquamarine", til::color{ 102, 205, 170 } }, - std::pair{ L"MediumAquamarine", til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine", til::color{ 127, 255, 212 } }, - std::pair{ L"dark green", til::color{ 0, 100, 0 } }, - std::pair{ L"DarkGreen", til::color{ 0, 100, 0 } }, - std::pair{ L"dark olive green", til::color{ 85, 107, 47 } }, - std::pair{ L"DarkOliveGreen", til::color{ 85, 107, 47 } }, - std::pair{ L"dark sea green", til::color{ 143, 188, 143 } }, - std::pair{ L"DarkSeaGreen", til::color{ 143, 188, 143 } }, - std::pair{ L"sea green", til::color{ 46, 139, 87 } }, - std::pair{ L"SeaGreen", til::color{ 46, 139, 87 } }, - std::pair{ L"medium sea green", til::color{ 60, 179, 113 } }, - std::pair{ L"MediumSeaGreen", til::color{ 60, 179, 113 } }, - std::pair{ L"light sea green", til::color{ 32, 178, 170 } }, - std::pair{ L"LightSeaGreen", til::color{ 32, 178, 170 } }, - std::pair{ L"pale green", til::color{ 152, 251, 152 } }, - std::pair{ L"PaleGreen", til::color{ 152, 251, 152 } }, - std::pair{ L"spring green", til::color{ 0, 255, 127 } }, - std::pair{ L"SpringGreen", til::color{ 0, 255, 127 } }, - std::pair{ L"lawn green", til::color{ 124, 252, 0 } }, - std::pair{ L"LawnGreen", til::color{ 124, 252, 0 } }, - std::pair{ L"green", til::color{ 0, 255, 0 } }, - std::pair{ L"lime", til::color{ 0, 255, 0 } }, - std::pair{ L"x11 green", til::color{ 0, 255, 0 } }, - std::pair{ L"X11Green", til::color{ 0, 255, 0 } }, - std::pair{ L"web green", til::color{ 0, 128, 0 } }, - std::pair{ L"WebGreen", til::color{ 0, 128, 0 } }, - std::pair{ L"chartreuse", til::color{ 127, 255, 0 } }, - std::pair{ L"medium spring green", til::color{ 0, 250, 154 } }, - std::pair{ L"MediumSpringGreen", til::color{ 0, 250, 154 } }, - std::pair{ L"green yellow", til::color{ 173, 255, 47 } }, - std::pair{ L"GreenYellow", til::color{ 173, 255, 47 } }, - std::pair{ L"lime green", til::color{ 50, 205, 50 } }, - std::pair{ L"LimeGreen", til::color{ 50, 205, 50 } }, - std::pair{ L"yellow green", til::color{ 154, 205, 50 } }, - std::pair{ L"YellowGreen", til::color{ 154, 205, 50 } }, - std::pair{ L"forest green", til::color{ 34, 139, 34 } }, - std::pair{ L"ForestGreen", til::color{ 34, 139, 34 } }, - std::pair{ L"olive drab", til::color{ 107, 142, 35 } }, - std::pair{ L"OliveDrab", til::color{ 107, 142, 35 } }, - std::pair{ L"dark khaki", til::color{ 189, 183, 107 } }, - std::pair{ L"DarkKhaki", til::color{ 189, 183, 107 } }, - std::pair{ L"khaki", til::color{ 240, 230, 140 } }, - std::pair{ L"pale goldenrod", til::color{ 238, 232, 170 } }, - std::pair{ L"PaleGoldenrod", til::color{ 238, 232, 170 } }, - std::pair{ L"light goldenrod yellow", til::color{ 250, 250, 210 } }, - std::pair{ L"LightGoldenrodYellow", til::color{ 250, 250, 210 } }, - std::pair{ L"light yellow", til::color{ 255, 255, 224 } }, - std::pair{ L"LightYellow", til::color{ 255, 255, 224 } }, - std::pair{ L"yellow", til::color{ 255, 255, 0 } }, - std::pair{ L"gold", til::color{ 255, 215, 0 } }, - std::pair{ L"light goldenrod", til::color{ 238, 221, 130 } }, - std::pair{ L"LightGoldenrod", til::color{ 238, 221, 130 } }, - std::pair{ L"goldenrod", til::color{ 218, 165, 32 } }, - std::pair{ L"dark goldenrod", til::color{ 184, 134, 11 } }, - std::pair{ L"DarkGoldenrod", til::color{ 184, 134, 11 } }, - std::pair{ L"rosy brown", til::color{ 188, 143, 143 } }, - std::pair{ L"RosyBrown", til::color{ 188, 143, 143 } }, - std::pair{ L"indian red", til::color{ 205, 92, 92 } }, - std::pair{ L"IndianRed", til::color{ 205, 92, 92 } }, - std::pair{ L"saddle brown", til::color{ 139, 69, 19 } }, - std::pair{ L"SaddleBrown", til::color{ 139, 69, 19 } }, - std::pair{ L"sienna", til::color{ 160, 82, 45 } }, - std::pair{ L"peru", til::color{ 205, 133, 63 } }, - std::pair{ L"burlywood", til::color{ 222, 184, 135 } }, - std::pair{ L"beige", til::color{ 245, 245, 220 } }, - std::pair{ L"wheat", til::color{ 245, 222, 179 } }, - std::pair{ L"sandy brown", til::color{ 244, 164, 96 } }, - std::pair{ L"SandyBrown", til::color{ 244, 164, 96 } }, - std::pair{ L"tan", til::color{ 210, 180, 140 } }, - std::pair{ L"chocolate", til::color{ 210, 105, 30 } }, - std::pair{ L"firebrick", til::color{ 178, 34, 34 } }, - std::pair{ L"brown", til::color{ 165, 42, 42 } }, - std::pair{ L"dark salmon", til::color{ 233, 150, 122 } }, - std::pair{ L"DarkSalmon", til::color{ 233, 150, 122 } }, - std::pair{ L"salmon", til::color{ 250, 128, 114 } }, - std::pair{ L"light salmon", til::color{ 255, 160, 122 } }, - std::pair{ L"LightSalmon", til::color{ 255, 160, 122 } }, - std::pair{ L"orange", til::color{ 255, 165, 0 } }, - std::pair{ L"dark orange", til::color{ 255, 140, 0 } }, - std::pair{ L"DarkOrange", til::color{ 255, 140, 0 } }, - std::pair{ L"coral", til::color{ 255, 127, 80 } }, - std::pair{ L"light coral", til::color{ 240, 128, 128 } }, - std::pair{ L"LightCoral", til::color{ 240, 128, 128 } }, - std::pair{ L"tomato", til::color{ 255, 99, 71 } }, - std::pair{ L"orange red", til::color{ 255, 69, 0 } }, - std::pair{ L"OrangeRed", til::color{ 255, 69, 0 } }, - std::pair{ L"red", til::color{ 255, 0, 0 } }, - std::pair{ L"hot pink", til::color{ 255, 105, 180 } }, - std::pair{ L"HotPink", til::color{ 255, 105, 180 } }, - std::pair{ L"deep pink", til::color{ 255, 20, 147 } }, - std::pair{ L"DeepPink", til::color{ 255, 20, 147 } }, - std::pair{ L"pink", til::color{ 255, 192, 203 } }, - std::pair{ L"light pink", til::color{ 255, 182, 193 } }, - std::pair{ L"LightPink", til::color{ 255, 182, 193 } }, - std::pair{ L"pale violet red", til::color{ 219, 112, 147 } }, - std::pair{ L"PaleVioletRed", til::color{ 219, 112, 147 } }, - std::pair{ L"maroon", til::color{ 176, 48, 96 } }, - std::pair{ L"x11 maroon", til::color{ 176, 48, 96 } }, - std::pair{ L"X11Maroon", til::color{ 176, 48, 96 } }, - std::pair{ L"web maroon", til::color{ 128, 0, 0 } }, - std::pair{ L"WebMaroon", til::color{ 128, 0, 0 } }, - std::pair{ L"medium violet red", til::color{ 199, 21, 133 } }, - std::pair{ L"MediumVioletRed", til::color{ 199, 21, 133 } }, - std::pair{ L"violet red", til::color{ 208, 32, 144 } }, - std::pair{ L"VioletRed", til::color{ 208, 32, 144 } }, - std::pair{ L"magenta", til::color{ 255, 0, 255 } }, - std::pair{ L"fuchsia", til::color{ 255, 0, 255 } }, - std::pair{ L"violet", til::color{ 238, 130, 238 } }, - std::pair{ L"plum", til::color{ 221, 160, 221 } }, - std::pair{ L"orchid", til::color{ 218, 112, 214 } }, - std::pair{ L"medium orchid", til::color{ 186, 85, 211 } }, - std::pair{ L"MediumOrchid", til::color{ 186, 85, 211 } }, - std::pair{ L"dark orchid", til::color{ 153, 50, 204 } }, - std::pair{ L"DarkOrchid", til::color{ 153, 50, 204 } }, - std::pair{ L"dark violet", til::color{ 148, 0, 211 } }, - std::pair{ L"DarkViolet", til::color{ 148, 0, 211 } }, - std::pair{ L"blue violet", til::color{ 138, 43, 226 } }, - std::pair{ L"BlueViolet", til::color{ 138, 43, 226 } }, - std::pair{ L"purple", til::color{ 160, 32, 240 } }, - std::pair{ L"x11 purple", til::color{ 160, 32, 240 } }, - std::pair{ L"X11Purple", til::color{ 160, 32, 240 } }, - std::pair{ L"web purple", til::color{ 128, 0, 128 } }, - std::pair{ L"WebPurple", til::color{ 128, 0, 128 } }, - std::pair{ L"medium purple", til::color{ 147, 112, 219 } }, - std::pair{ L"MediumPurple", til::color{ 147, 112, 219 } }, - std::pair{ L"thistle", til::color{ 216, 191, 216 } }, - std::pair{ L"snow1", til::color{ 255, 250, 250 } }, - std::pair{ L"snow2", til::color{ 238, 233, 233 } }, - std::pair{ L"snow3", til::color{ 205, 201, 201 } }, - std::pair{ L"snow4", til::color{ 139, 137, 137 } }, - std::pair{ L"seashell1", til::color{ 255, 245, 238 } }, - std::pair{ L"seashell2", til::color{ 238, 229, 222 } }, - std::pair{ L"seashell3", til::color{ 205, 197, 191 } }, - std::pair{ L"seashell4", til::color{ 139, 134, 130 } }, - std::pair{ L"AntiqueWhite1", til::color{ 255, 239, 219 } }, - std::pair{ L"AntiqueWhite2", til::color{ 238, 223, 204 } }, - std::pair{ L"AntiqueWhite3", til::color{ 205, 192, 176 } }, - std::pair{ L"AntiqueWhite4", til::color{ 139, 131, 120 } }, - std::pair{ L"bisque1", til::color{ 255, 228, 196 } }, - std::pair{ L"bisque2", til::color{ 238, 213, 183 } }, - std::pair{ L"bisque3", til::color{ 205, 183, 158 } }, - std::pair{ L"bisque4", til::color{ 139, 125, 107 } }, - std::pair{ L"PeachPuff1", til::color{ 255, 218, 185 } }, - std::pair{ L"PeachPuff2", til::color{ 238, 203, 173 } }, - std::pair{ L"PeachPuff3", til::color{ 205, 175, 149 } }, - std::pair{ L"PeachPuff4", til::color{ 139, 119, 101 } }, - std::pair{ L"NavajoWhite1", til::color{ 255, 222, 173 } }, - std::pair{ L"NavajoWhite2", til::color{ 238, 207, 161 } }, - std::pair{ L"NavajoWhite3", til::color{ 205, 179, 139 } }, - std::pair{ L"NavajoWhite4", til::color{ 139, 121, 94 } }, - std::pair{ L"LemonChiffon1", til::color{ 255, 250, 205 } }, - std::pair{ L"LemonChiffon2", til::color{ 238, 233, 191 } }, - std::pair{ L"LemonChiffon3", til::color{ 205, 201, 165 } }, - std::pair{ L"LemonChiffon4", til::color{ 139, 137, 112 } }, - std::pair{ L"cornsilk1", til::color{ 255, 248, 220 } }, - std::pair{ L"cornsilk2", til::color{ 238, 232, 205 } }, - std::pair{ L"cornsilk3", til::color{ 205, 200, 177 } }, - std::pair{ L"cornsilk4", til::color{ 139, 136, 120 } }, - std::pair{ L"ivory1", til::color{ 255, 255, 240 } }, - std::pair{ L"ivory2", til::color{ 238, 238, 224 } }, - std::pair{ L"ivory3", til::color{ 205, 205, 193 } }, - std::pair{ L"ivory4", til::color{ 139, 139, 131 } }, - std::pair{ L"honeydew1", til::color{ 240, 255, 240 } }, - std::pair{ L"honeydew2", til::color{ 224, 238, 224 } }, - std::pair{ L"honeydew3", til::color{ 193, 205, 193 } }, - std::pair{ L"honeydew4", til::color{ 131, 139, 131 } }, - std::pair{ L"LavenderBlush1", til::color{ 255, 240, 245 } }, - std::pair{ L"LavenderBlush2", til::color{ 238, 224, 229 } }, - std::pair{ L"LavenderBlush3", til::color{ 205, 193, 197 } }, - std::pair{ L"LavenderBlush4", til::color{ 139, 131, 134 } }, - std::pair{ L"MistyRose1", til::color{ 255, 228, 225 } }, - std::pair{ L"MistyRose2", til::color{ 238, 213, 210 } }, - std::pair{ L"MistyRose3", til::color{ 205, 183, 181 } }, - std::pair{ L"MistyRose4", til::color{ 139, 125, 123 } }, - std::pair{ L"azure1", til::color{ 240, 255, 255 } }, - std::pair{ L"azure2", til::color{ 224, 238, 238 } }, - std::pair{ L"azure3", til::color{ 193, 205, 205 } }, - std::pair{ L"azure4", til::color{ 131, 139, 139 } }, - std::pair{ L"SlateBlue1", til::color{ 131, 111, 255 } }, - std::pair{ L"SlateBlue2", til::color{ 122, 103, 238 } }, - std::pair{ L"SlateBlue3", til::color{ 105, 89, 205 } }, - std::pair{ L"SlateBlue4", til::color{ 71, 60, 139 } }, - std::pair{ L"RoyalBlue1", til::color{ 72, 118, 255 } }, - std::pair{ L"RoyalBlue2", til::color{ 67, 110, 238 } }, - std::pair{ L"RoyalBlue3", til::color{ 58, 95, 205 } }, - std::pair{ L"RoyalBlue4", til::color{ 39, 64, 139 } }, - std::pair{ L"blue1", til::color{ 0, 0, 255 } }, - std::pair{ L"blue2", til::color{ 0, 0, 238 } }, - std::pair{ L"blue3", til::color{ 0, 0, 205 } }, - std::pair{ L"blue4", til::color{ 0, 0, 139 } }, - std::pair{ L"DodgerBlue1", til::color{ 30, 144, 255 } }, - std::pair{ L"DodgerBlue2", til::color{ 28, 134, 238 } }, - std::pair{ L"DodgerBlue3", til::color{ 24, 116, 205 } }, - std::pair{ L"DodgerBlue4", til::color{ 16, 78, 139 } }, - std::pair{ L"SteelBlue1", til::color{ 99, 184, 255 } }, - std::pair{ L"SteelBlue2", til::color{ 92, 172, 238 } }, - std::pair{ L"SteelBlue3", til::color{ 79, 148, 205 } }, - std::pair{ L"SteelBlue4", til::color{ 54, 100, 139 } }, - std::pair{ L"DeepSkyBlue1", til::color{ 0, 191, 255 } }, - std::pair{ L"DeepSkyBlue2", til::color{ 0, 178, 238 } }, - std::pair{ L"DeepSkyBlue3", til::color{ 0, 154, 205 } }, - std::pair{ L"DeepSkyBlue4", til::color{ 0, 104, 139 } }, - std::pair{ L"SkyBlue1", til::color{ 135, 206, 255 } }, - std::pair{ L"SkyBlue2", til::color{ 126, 192, 238 } }, - std::pair{ L"SkyBlue3", til::color{ 108, 166, 205 } }, - std::pair{ L"SkyBlue4", til::color{ 74, 112, 139 } }, - std::pair{ L"LightSkyBlue1", til::color{ 176, 226, 255 } }, - std::pair{ L"LightSkyBlue2", til::color{ 164, 211, 238 } }, - std::pair{ L"LightSkyBlue3", til::color{ 141, 182, 205 } }, - std::pair{ L"LightSkyBlue4", til::color{ 96, 123, 139 } }, - std::pair{ L"SlateGray1", til::color{ 198, 226, 255 } }, - std::pair{ L"SlateGray2", til::color{ 185, 211, 238 } }, - std::pair{ L"SlateGray3", til::color{ 159, 182, 205 } }, - std::pair{ L"SlateGray4", til::color{ 108, 123, 139 } }, - std::pair{ L"LightSteelBlue1", til::color{ 202, 225, 255 } }, - std::pair{ L"LightSteelBlue2", til::color{ 188, 210, 238 } }, - std::pair{ L"LightSteelBlue3", til::color{ 162, 181, 205 } }, - std::pair{ L"LightSteelBlue4", til::color{ 110, 123, 139 } }, - std::pair{ L"LightBlue1", til::color{ 191, 239, 255 } }, - std::pair{ L"LightBlue2", til::color{ 178, 223, 238 } }, - std::pair{ L"LightBlue3", til::color{ 154, 192, 205 } }, - std::pair{ L"LightBlue4", til::color{ 104, 131, 139 } }, - std::pair{ L"LightCyan1", til::color{ 224, 255, 255 } }, - std::pair{ L"LightCyan2", til::color{ 209, 238, 238 } }, - std::pair{ L"LightCyan3", til::color{ 180, 205, 205 } }, - std::pair{ L"LightCyan4", til::color{ 122, 139, 139 } }, - std::pair{ L"PaleTurquoise1", til::color{ 187, 255, 255 } }, - std::pair{ L"PaleTurquoise2", til::color{ 174, 238, 238 } }, - std::pair{ L"PaleTurquoise3", til::color{ 150, 205, 205 } }, - std::pair{ L"PaleTurquoise4", til::color{ 102, 139, 139 } }, - std::pair{ L"CadetBlue1", til::color{ 152, 245, 255 } }, - std::pair{ L"CadetBlue2", til::color{ 142, 229, 238 } }, - std::pair{ L"CadetBlue3", til::color{ 122, 197, 205 } }, - std::pair{ L"CadetBlue4", til::color{ 83, 134, 139 } }, - std::pair{ L"turquoise1", til::color{ 0, 245, 255 } }, - std::pair{ L"turquoise2", til::color{ 0, 229, 238 } }, - std::pair{ L"turquoise3", til::color{ 0, 197, 205 } }, - std::pair{ L"turquoise4", til::color{ 0, 134, 139 } }, - std::pair{ L"cyan1", til::color{ 0, 255, 255 } }, - std::pair{ L"cyan2", til::color{ 0, 238, 238 } }, - std::pair{ L"cyan3", til::color{ 0, 205, 205 } }, - std::pair{ L"cyan4", til::color{ 0, 139, 139 } }, - std::pair{ L"DarkSlateGray1", til::color{ 151, 255, 255 } }, - std::pair{ L"DarkSlateGray2", til::color{ 141, 238, 238 } }, - std::pair{ L"DarkSlateGray3", til::color{ 121, 205, 205 } }, - std::pair{ L"DarkSlateGray4", til::color{ 82, 139, 139 } }, - std::pair{ L"aquamarine1", til::color{ 127, 255, 212 } }, - std::pair{ L"aquamarine2", til::color{ 118, 238, 198 } }, - std::pair{ L"aquamarine3", til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine4", til::color{ 69, 139, 116 } }, - std::pair{ L"DarkSeaGreen1", til::color{ 193, 255, 193 } }, - std::pair{ L"DarkSeaGreen2", til::color{ 180, 238, 180 } }, - std::pair{ L"DarkSeaGreen3", til::color{ 155, 205, 155 } }, - std::pair{ L"DarkSeaGreen4", til::color{ 105, 139, 105 } }, - std::pair{ L"SeaGreen1", til::color{ 84, 255, 159 } }, - std::pair{ L"SeaGreen2", til::color{ 78, 238, 148 } }, - std::pair{ L"SeaGreen3", til::color{ 67, 205, 128 } }, - std::pair{ L"SeaGreen4", til::color{ 46, 139, 87 } }, - std::pair{ L"PaleGreen1", til::color{ 154, 255, 154 } }, - std::pair{ L"PaleGreen2", til::color{ 144, 238, 144 } }, - std::pair{ L"PaleGreen3", til::color{ 124, 205, 124 } }, - std::pair{ L"PaleGreen4", til::color{ 84, 139, 84 } }, - std::pair{ L"SpringGreen1", til::color{ 0, 255, 127 } }, - std::pair{ L"SpringGreen2", til::color{ 0, 238, 118 } }, - std::pair{ L"SpringGreen3", til::color{ 0, 205, 102 } }, - std::pair{ L"SpringGreen4", til::color{ 0, 139, 69 } }, - std::pair{ L"green1", til::color{ 0, 255, 0 } }, - std::pair{ L"green2", til::color{ 0, 238, 0 } }, - std::pair{ L"green3", til::color{ 0, 205, 0 } }, - std::pair{ L"green4", til::color{ 0, 139, 0 } }, - std::pair{ L"chartreuse1", til::color{ 127, 255, 0 } }, - std::pair{ L"chartreuse2", til::color{ 118, 238, 0 } }, - std::pair{ L"chartreuse3", til::color{ 102, 205, 0 } }, - std::pair{ L"chartreuse4", til::color{ 69, 139, 0 } }, - std::pair{ L"OliveDrab1", til::color{ 192, 255, 62 } }, - std::pair{ L"OliveDrab2", til::color{ 179, 238, 58 } }, - std::pair{ L"OliveDrab3", til::color{ 154, 205, 50 } }, - std::pair{ L"OliveDrab4", til::color{ 105, 139, 34 } }, - std::pair{ L"DarkOliveGreen1", til::color{ 202, 255, 112 } }, - std::pair{ L"DarkOliveGreen2", til::color{ 188, 238, 104 } }, - std::pair{ L"DarkOliveGreen3", til::color{ 162, 205, 90 } }, - std::pair{ L"DarkOliveGreen4", til::color{ 110, 139, 61 } }, - std::pair{ L"khaki1", til::color{ 255, 246, 143 } }, - std::pair{ L"khaki2", til::color{ 238, 230, 133 } }, - std::pair{ L"khaki3", til::color{ 205, 198, 115 } }, - std::pair{ L"khaki4", til::color{ 139, 134, 78 } }, - std::pair{ L"LightGoldenrod1", til::color{ 255, 236, 139 } }, - std::pair{ L"LightGoldenrod2", til::color{ 238, 220, 130 } }, - std::pair{ L"LightGoldenrod3", til::color{ 205, 190, 112 } }, - std::pair{ L"LightGoldenrod4", til::color{ 139, 129, 76 } }, - std::pair{ L"LightYellow1", til::color{ 255, 255, 224 } }, - std::pair{ L"LightYellow2", til::color{ 238, 238, 209 } }, - std::pair{ L"LightYellow3", til::color{ 205, 205, 180 } }, - std::pair{ L"LightYellow4", til::color{ 139, 139, 122 } }, - std::pair{ L"yellow1", til::color{ 255, 255, 0 } }, - std::pair{ L"yellow2", til::color{ 238, 238, 0 } }, - std::pair{ L"yellow3", til::color{ 205, 205, 0 } }, - std::pair{ L"yellow4", til::color{ 139, 139, 0 } }, - std::pair{ L"gold1", til::color{ 255, 215, 0 } }, - std::pair{ L"gold2", til::color{ 238, 201, 0 } }, - std::pair{ L"gold3", til::color{ 205, 173, 0 } }, - std::pair{ L"gold4", til::color{ 139, 117, 0 } }, - std::pair{ L"goldenrod1", til::color{ 255, 193, 37 } }, - std::pair{ L"goldenrod2", til::color{ 238, 180, 34 } }, - std::pair{ L"goldenrod3", til::color{ 205, 155, 29 } }, - std::pair{ L"goldenrod4", til::color{ 139, 105, 20 } }, - std::pair{ L"DarkGoldenrod1", til::color{ 255, 185, 15 } }, - std::pair{ L"DarkGoldenrod2", til::color{ 238, 173, 14 } }, - std::pair{ L"DarkGoldenrod3", til::color{ 205, 149, 12 } }, - std::pair{ L"DarkGoldenrod4", til::color{ 139, 101, 8 } }, - std::pair{ L"RosyBrown1", til::color{ 255, 193, 193 } }, - std::pair{ L"RosyBrown2", til::color{ 238, 180, 180 } }, - std::pair{ L"RosyBrown3", til::color{ 205, 155, 155 } }, - std::pair{ L"RosyBrown4", til::color{ 139, 105, 105 } }, - std::pair{ L"IndianRed1", til::color{ 255, 106, 106 } }, - std::pair{ L"IndianRed2", til::color{ 238, 99, 99 } }, - std::pair{ L"IndianRed3", til::color{ 205, 85, 85 } }, - std::pair{ L"IndianRed4", til::color{ 139, 58, 58 } }, - std::pair{ L"sienna1", til::color{ 255, 130, 71 } }, - std::pair{ L"sienna2", til::color{ 238, 121, 66 } }, - std::pair{ L"sienna3", til::color{ 205, 104, 57 } }, - std::pair{ L"sienna4", til::color{ 139, 71, 38 } }, - std::pair{ L"burlywood1", til::color{ 255, 211, 155 } }, - std::pair{ L"burlywood2", til::color{ 238, 197, 145 } }, - std::pair{ L"burlywood3", til::color{ 205, 170, 125 } }, - std::pair{ L"burlywood4", til::color{ 139, 115, 85 } }, - std::pair{ L"wheat1", til::color{ 255, 231, 186 } }, - std::pair{ L"wheat2", til::color{ 238, 216, 174 } }, - std::pair{ L"wheat3", til::color{ 205, 186, 150 } }, - std::pair{ L"wheat4", til::color{ 139, 126, 102 } }, - std::pair{ L"tan1", til::color{ 255, 165, 79 } }, - std::pair{ L"tan2", til::color{ 238, 154, 73 } }, - std::pair{ L"tan3", til::color{ 205, 133, 63 } }, - std::pair{ L"tan4", til::color{ 139, 90, 43 } }, - std::pair{ L"chocolate1", til::color{ 255, 127, 36 } }, - std::pair{ L"chocolate2", til::color{ 238, 118, 33 } }, - std::pair{ L"chocolate3", til::color{ 205, 102, 29 } }, - std::pair{ L"chocolate4", til::color{ 139, 69, 19 } }, - std::pair{ L"firebrick1", til::color{ 255, 48, 48 } }, - std::pair{ L"firebrick2", til::color{ 238, 44, 44 } }, - std::pair{ L"firebrick3", til::color{ 205, 38, 38 } }, - std::pair{ L"firebrick4", til::color{ 139, 26, 26 } }, - std::pair{ L"brown1", til::color{ 255, 64, 64 } }, - std::pair{ L"brown2", til::color{ 238, 59, 59 } }, - std::pair{ L"brown3", til::color{ 205, 51, 51 } }, - std::pair{ L"brown4", til::color{ 139, 35, 35 } }, - std::pair{ L"salmon1", til::color{ 255, 140, 105 } }, - std::pair{ L"salmon2", til::color{ 238, 130, 98 } }, - std::pair{ L"salmon3", til::color{ 205, 112, 84 } }, - std::pair{ L"salmon4", til::color{ 139, 76, 57 } }, - std::pair{ L"LightSalmon1", til::color{ 255, 160, 122 } }, - std::pair{ L"LightSalmon2", til::color{ 238, 149, 114 } }, - std::pair{ L"LightSalmon3", til::color{ 205, 129, 98 } }, - std::pair{ L"LightSalmon4", til::color{ 139, 87, 66 } }, - std::pair{ L"orange1", til::color{ 255, 165, 0 } }, - std::pair{ L"orange2", til::color{ 238, 154, 0 } }, - std::pair{ L"orange3", til::color{ 205, 133, 0 } }, - std::pair{ L"orange4", til::color{ 139, 90, 0 } }, - std::pair{ L"DarkOrange1", til::color{ 255, 127, 0 } }, - std::pair{ L"DarkOrange2", til::color{ 238, 118, 0 } }, - std::pair{ L"DarkOrange3", til::color{ 205, 102, 0 } }, - std::pair{ L"DarkOrange4", til::color{ 139, 69, 0 } }, - std::pair{ L"coral1", til::color{ 255, 114, 86 } }, - std::pair{ L"coral2", til::color{ 238, 106, 80 } }, - std::pair{ L"coral3", til::color{ 205, 91, 69 } }, - std::pair{ L"coral4", til::color{ 139, 62, 47 } }, - std::pair{ L"tomato1", til::color{ 255, 99, 71 } }, - std::pair{ L"tomato2", til::color{ 238, 92, 66 } }, - std::pair{ L"tomato3", til::color{ 205, 79, 57 } }, - std::pair{ L"tomato4", til::color{ 139, 54, 38 } }, - std::pair{ L"OrangeRed1", til::color{ 255, 69, 0 } }, - std::pair{ L"OrangeRed2", til::color{ 238, 64, 0 } }, - std::pair{ L"OrangeRed3", til::color{ 205, 55, 0 } }, - std::pair{ L"OrangeRed4", til::color{ 139, 37, 0 } }, - std::pair{ L"red1", til::color{ 255, 0, 0 } }, - std::pair{ L"red2", til::color{ 238, 0, 0 } }, - std::pair{ L"red3", til::color{ 205, 0, 0 } }, - std::pair{ L"red4", til::color{ 139, 0, 0 } }, - std::pair{ L"DeepPink1", til::color{ 255, 20, 147 } }, - std::pair{ L"DeepPink2", til::color{ 238, 18, 137 } }, - std::pair{ L"DeepPink3", til::color{ 205, 16, 118 } }, - std::pair{ L"DeepPink4", til::color{ 139, 10, 80 } }, - std::pair{ L"HotPink1", til::color{ 255, 110, 180 } }, - std::pair{ L"HotPink2", til::color{ 238, 106, 167 } }, - std::pair{ L"HotPink3", til::color{ 205, 96, 144 } }, - std::pair{ L"HotPink4", til::color{ 139, 58, 98 } }, - std::pair{ L"pink1", til::color{ 255, 181, 197 } }, - std::pair{ L"pink2", til::color{ 238, 169, 184 } }, - std::pair{ L"pink3", til::color{ 205, 145, 158 } }, - std::pair{ L"pink4", til::color{ 139, 99, 108 } }, - std::pair{ L"LightPink1", til::color{ 255, 174, 185 } }, - std::pair{ L"LightPink2", til::color{ 238, 162, 173 } }, - std::pair{ L"LightPink3", til::color{ 205, 140, 149 } }, - std::pair{ L"LightPink4", til::color{ 139, 95, 101 } }, - std::pair{ L"PaleVioletRed1", til::color{ 255, 130, 171 } }, - std::pair{ L"PaleVioletRed2", til::color{ 238, 121, 159 } }, - std::pair{ L"PaleVioletRed3", til::color{ 205, 104, 137 } }, - std::pair{ L"PaleVioletRed4", til::color{ 139, 71, 93 } }, - std::pair{ L"maroon1", til::color{ 255, 52, 179 } }, - std::pair{ L"maroon2", til::color{ 238, 48, 167 } }, - std::pair{ L"maroon3", til::color{ 205, 41, 144 } }, - std::pair{ L"maroon4", til::color{ 139, 28, 98 } }, - std::pair{ L"VioletRed1", til::color{ 255, 62, 150 } }, - std::pair{ L"VioletRed2", til::color{ 238, 58, 140 } }, - std::pair{ L"VioletRed3", til::color{ 205, 50, 120 } }, - std::pair{ L"VioletRed4", til::color{ 139, 34, 82 } }, - std::pair{ L"magenta1", til::color{ 255, 0, 255 } }, - std::pair{ L"magenta2", til::color{ 238, 0, 238 } }, - std::pair{ L"magenta3", til::color{ 205, 0, 205 } }, - std::pair{ L"magenta4", til::color{ 139, 0, 139 } }, - std::pair{ L"orchid1", til::color{ 255, 131, 250 } }, - std::pair{ L"orchid2", til::color{ 238, 122, 233 } }, - std::pair{ L"orchid3", til::color{ 205, 105, 201 } }, - std::pair{ L"orchid4", til::color{ 139, 71, 137 } }, - std::pair{ L"plum1", til::color{ 255, 187, 255 } }, - std::pair{ L"plum2", til::color{ 238, 174, 238 } }, - std::pair{ L"plum3", til::color{ 205, 150, 205 } }, - std::pair{ L"plum4", til::color{ 139, 102, 139 } }, - std::pair{ L"MediumOrchid1", til::color{ 224, 102, 255 } }, - std::pair{ L"MediumOrchid2", til::color{ 209, 95, 238 } }, - std::pair{ L"MediumOrchid3", til::color{ 180, 82, 205 } }, - std::pair{ L"MediumOrchid4", til::color{ 122, 55, 139 } }, - std::pair{ L"DarkOrchid1", til::color{ 191, 62, 255 } }, - std::pair{ L"DarkOrchid2", til::color{ 178, 58, 238 } }, - std::pair{ L"DarkOrchid3", til::color{ 154, 50, 205 } }, - std::pair{ L"DarkOrchid4", til::color{ 104, 34, 139 } }, - std::pair{ L"purple1", til::color{ 155, 48, 255 } }, - std::pair{ L"purple2", til::color{ 145, 44, 238 } }, - std::pair{ L"purple3", til::color{ 125, 38, 205 } }, - std::pair{ L"purple4", til::color{ 85, 26, 139 } }, - std::pair{ L"MediumPurple1", til::color{ 171, 130, 255 } }, - std::pair{ L"MediumPurple2", til::color{ 159, 121, 238 } }, - std::pair{ L"MediumPurple3", til::color{ 137, 104, 205 } }, - std::pair{ L"MediumPurple4", til::color{ 93, 71, 139 } }, - std::pair{ L"thistle1", til::color{ 255, 225, 255 } }, - std::pair{ L"thistle2", til::color{ 238, 210, 238 } }, - std::pair{ L"thistle3", til::color{ 205, 181, 205 } }, - std::pair{ L"thistle4", til::color{ 139, 123, 139 } }, - std::pair{ L"gray0", til::color{ 0, 0, 0 } }, - std::pair{ L"grey0", til::color{ 0, 0, 0 } }, - std::pair{ L"gray1", til::color{ 3, 3, 3 } }, - std::pair{ L"grey1", til::color{ 3, 3, 3 } }, - std::pair{ L"gray2", til::color{ 5, 5, 5 } }, - std::pair{ L"grey2", til::color{ 5, 5, 5 } }, - std::pair{ L"gray3", til::color{ 8, 8, 8 } }, - std::pair{ L"grey3", til::color{ 8, 8, 8 } }, - std::pair{ L"gray4", til::color{ 10, 10, 10 } }, - std::pair{ L"grey4", til::color{ 10, 10, 10 } }, - std::pair{ L"gray5", til::color{ 13, 13, 13 } }, - std::pair{ L"grey5", til::color{ 13, 13, 13 } }, - std::pair{ L"gray6", til::color{ 15, 15, 15 } }, - std::pair{ L"grey6", til::color{ 15, 15, 15 } }, - std::pair{ L"gray7", til::color{ 18, 18, 18 } }, - std::pair{ L"grey7", til::color{ 18, 18, 18 } }, - std::pair{ L"gray8", til::color{ 20, 20, 20 } }, - std::pair{ L"grey8", til::color{ 20, 20, 20 } }, - std::pair{ L"gray9", til::color{ 23, 23, 23 } }, - std::pair{ L"grey9", til::color{ 23, 23, 23 } }, - std::pair{ L"gray10", til::color{ 26, 26, 26 } }, - std::pair{ L"grey10", til::color{ 26, 26, 26 } }, - std::pair{ L"gray11", til::color{ 28, 28, 28 } }, - std::pair{ L"grey11", til::color{ 28, 28, 28 } }, - std::pair{ L"gray12", til::color{ 31, 31, 31 } }, - std::pair{ L"grey12", til::color{ 31, 31, 31 } }, - std::pair{ L"gray13", til::color{ 33, 33, 33 } }, - std::pair{ L"grey13", til::color{ 33, 33, 33 } }, - std::pair{ L"gray14", til::color{ 36, 36, 36 } }, - std::pair{ L"grey14", til::color{ 36, 36, 36 } }, - std::pair{ L"gray15", til::color{ 38, 38, 38 } }, - std::pair{ L"grey15", til::color{ 38, 38, 38 } }, - std::pair{ L"gray16", til::color{ 41, 41, 41 } }, - std::pair{ L"grey16", til::color{ 41, 41, 41 } }, - std::pair{ L"gray17", til::color{ 43, 43, 43 } }, - std::pair{ L"grey17", til::color{ 43, 43, 43 } }, - std::pair{ L"gray18", til::color{ 46, 46, 46 } }, - std::pair{ L"grey18", til::color{ 46, 46, 46 } }, - std::pair{ L"gray19", til::color{ 48, 48, 48 } }, - std::pair{ L"grey19", til::color{ 48, 48, 48 } }, - std::pair{ L"gray20", til::color{ 51, 51, 51 } }, - std::pair{ L"grey20", til::color{ 51, 51, 51 } }, - std::pair{ L"gray21", til::color{ 54, 54, 54 } }, - std::pair{ L"grey21", til::color{ 54, 54, 54 } }, - std::pair{ L"gray22", til::color{ 56, 56, 56 } }, - std::pair{ L"grey22", til::color{ 56, 56, 56 } }, - std::pair{ L"gray23", til::color{ 59, 59, 59 } }, - std::pair{ L"grey23", til::color{ 59, 59, 59 } }, - std::pair{ L"gray24", til::color{ 61, 61, 61 } }, - std::pair{ L"grey24", til::color{ 61, 61, 61 } }, - std::pair{ L"gray25", til::color{ 64, 64, 64 } }, - std::pair{ L"grey25", til::color{ 64, 64, 64 } }, - std::pair{ L"gray26", til::color{ 66, 66, 66 } }, - std::pair{ L"grey26", til::color{ 66, 66, 66 } }, - std::pair{ L"gray27", til::color{ 69, 69, 69 } }, - std::pair{ L"grey27", til::color{ 69, 69, 69 } }, - std::pair{ L"gray28", til::color{ 71, 71, 71 } }, - std::pair{ L"grey28", til::color{ 71, 71, 71 } }, - std::pair{ L"gray29", til::color{ 74, 74, 74 } }, - std::pair{ L"grey29", til::color{ 74, 74, 74 } }, - std::pair{ L"gray30", til::color{ 77, 77, 77 } }, - std::pair{ L"grey30", til::color{ 77, 77, 77 } }, - std::pair{ L"gray31", til::color{ 79, 79, 79 } }, - std::pair{ L"grey31", til::color{ 79, 79, 79 } }, - std::pair{ L"gray32", til::color{ 82, 82, 82 } }, - std::pair{ L"grey32", til::color{ 82, 82, 82 } }, - std::pair{ L"gray33", til::color{ 84, 84, 84 } }, - std::pair{ L"grey33", til::color{ 84, 84, 84 } }, - std::pair{ L"gray34", til::color{ 87, 87, 87 } }, - std::pair{ L"grey34", til::color{ 87, 87, 87 } }, - std::pair{ L"gray35", til::color{ 89, 89, 89 } }, - std::pair{ L"grey35", til::color{ 89, 89, 89 } }, - std::pair{ L"gray36", til::color{ 92, 92, 92 } }, - std::pair{ L"grey36", til::color{ 92, 92, 92 } }, - std::pair{ L"gray37", til::color{ 94, 94, 94 } }, - std::pair{ L"grey37", til::color{ 94, 94, 94 } }, - std::pair{ L"gray38", til::color{ 97, 97, 97 } }, - std::pair{ L"grey38", til::color{ 97, 97, 97 } }, - std::pair{ L"gray39", til::color{ 99, 99, 99 } }, - std::pair{ L"grey39", til::color{ 99, 99, 99 } }, - std::pair{ L"gray40", til::color{ 102, 102, 102 } }, - std::pair{ L"grey40", til::color{ 102, 102, 102 } }, - std::pair{ L"gray41", til::color{ 105, 105, 105 } }, - std::pair{ L"grey41", til::color{ 105, 105, 105 } }, - std::pair{ L"gray42", til::color{ 107, 107, 107 } }, - std::pair{ L"grey42", til::color{ 107, 107, 107 } }, - std::pair{ L"gray43", til::color{ 110, 110, 110 } }, - std::pair{ L"grey43", til::color{ 110, 110, 110 } }, - std::pair{ L"gray44", til::color{ 112, 112, 112 } }, - std::pair{ L"grey44", til::color{ 112, 112, 112 } }, - std::pair{ L"gray45", til::color{ 115, 115, 115 } }, - std::pair{ L"grey45", til::color{ 115, 115, 115 } }, - std::pair{ L"gray46", til::color{ 117, 117, 117 } }, - std::pair{ L"grey46", til::color{ 117, 117, 117 } }, - std::pair{ L"gray47", til::color{ 120, 120, 120 } }, - std::pair{ L"grey47", til::color{ 120, 120, 120 } }, - std::pair{ L"gray48", til::color{ 122, 122, 122 } }, - std::pair{ L"grey48", til::color{ 122, 122, 122 } }, - std::pair{ L"gray49", til::color{ 125, 125, 125 } }, - std::pair{ L"grey49", til::color{ 125, 125, 125 } }, - std::pair{ L"gray50", til::color{ 127, 127, 127 } }, - std::pair{ L"grey50", til::color{ 127, 127, 127 } }, - std::pair{ L"gray51", til::color{ 130, 130, 130 } }, - std::pair{ L"grey51", til::color{ 130, 130, 130 } }, - std::pair{ L"gray52", til::color{ 133, 133, 133 } }, - std::pair{ L"grey52", til::color{ 133, 133, 133 } }, - std::pair{ L"gray53", til::color{ 135, 135, 135 } }, - std::pair{ L"grey53", til::color{ 135, 135, 135 } }, - std::pair{ L"gray54", til::color{ 138, 138, 138 } }, - std::pair{ L"grey54", til::color{ 138, 138, 138 } }, - std::pair{ L"gray55", til::color{ 140, 140, 140 } }, - std::pair{ L"grey55", til::color{ 140, 140, 140 } }, - std::pair{ L"gray56", til::color{ 143, 143, 143 } }, - std::pair{ L"grey56", til::color{ 143, 143, 143 } }, - std::pair{ L"gray57", til::color{ 145, 145, 145 } }, - std::pair{ L"grey57", til::color{ 145, 145, 145 } }, - std::pair{ L"gray58", til::color{ 148, 148, 148 } }, - std::pair{ L"grey58", til::color{ 148, 148, 148 } }, - std::pair{ L"gray59", til::color{ 150, 150, 150 } }, - std::pair{ L"grey59", til::color{ 150, 150, 150 } }, - std::pair{ L"gray60", til::color{ 153, 153, 153 } }, - std::pair{ L"grey60", til::color{ 153, 153, 153 } }, - std::pair{ L"gray61", til::color{ 156, 156, 156 } }, - std::pair{ L"grey61", til::color{ 156, 156, 156 } }, - std::pair{ L"gray62", til::color{ 158, 158, 158 } }, - std::pair{ L"grey62", til::color{ 158, 158, 158 } }, - std::pair{ L"gray63", til::color{ 161, 161, 161 } }, - std::pair{ L"grey63", til::color{ 161, 161, 161 } }, - std::pair{ L"gray64", til::color{ 163, 163, 163 } }, - std::pair{ L"grey64", til::color{ 163, 163, 163 } }, - std::pair{ L"gray65", til::color{ 166, 166, 166 } }, - std::pair{ L"grey65", til::color{ 166, 166, 166 } }, - std::pair{ L"gray66", til::color{ 168, 168, 168 } }, - std::pair{ L"grey66", til::color{ 168, 168, 168 } }, - std::pair{ L"gray67", til::color{ 171, 171, 171 } }, - std::pair{ L"grey67", til::color{ 171, 171, 171 } }, - std::pair{ L"gray68", til::color{ 173, 173, 173 } }, - std::pair{ L"grey68", til::color{ 173, 173, 173 } }, - std::pair{ L"gray69", til::color{ 176, 176, 176 } }, - std::pair{ L"grey69", til::color{ 176, 176, 176 } }, - std::pair{ L"gray70", til::color{ 179, 179, 179 } }, - std::pair{ L"grey70", til::color{ 179, 179, 179 } }, - std::pair{ L"gray71", til::color{ 181, 181, 181 } }, - std::pair{ L"grey71", til::color{ 181, 181, 181 } }, - std::pair{ L"gray72", til::color{ 184, 184, 184 } }, - std::pair{ L"grey72", til::color{ 184, 184, 184 } }, - std::pair{ L"gray73", til::color{ 186, 186, 186 } }, - std::pair{ L"grey73", til::color{ 186, 186, 186 } }, - std::pair{ L"gray74", til::color{ 189, 189, 189 } }, - std::pair{ L"grey74", til::color{ 189, 189, 189 } }, - std::pair{ L"gray75", til::color{ 191, 191, 191 } }, - std::pair{ L"grey75", til::color{ 191, 191, 191 } }, - std::pair{ L"gray76", til::color{ 194, 194, 194 } }, - std::pair{ L"grey76", til::color{ 194, 194, 194 } }, - std::pair{ L"gray77", til::color{ 196, 196, 196 } }, - std::pair{ L"grey77", til::color{ 196, 196, 196 } }, - std::pair{ L"gray78", til::color{ 199, 199, 199 } }, - std::pair{ L"grey78", til::color{ 199, 199, 199 } }, - std::pair{ L"gray79", til::color{ 201, 201, 201 } }, - std::pair{ L"grey79", til::color{ 201, 201, 201 } }, - std::pair{ L"gray80", til::color{ 204, 204, 204 } }, - std::pair{ L"grey80", til::color{ 204, 204, 204 } }, - std::pair{ L"gray81", til::color{ 207, 207, 207 } }, - std::pair{ L"grey81", til::color{ 207, 207, 207 } }, - std::pair{ L"gray82", til::color{ 209, 209, 209 } }, - std::pair{ L"grey82", til::color{ 209, 209, 209 } }, - std::pair{ L"gray83", til::color{ 212, 212, 212 } }, - std::pair{ L"grey83", til::color{ 212, 212, 212 } }, - std::pair{ L"gray84", til::color{ 214, 214, 214 } }, - std::pair{ L"grey84", til::color{ 214, 214, 214 } }, - std::pair{ L"gray85", til::color{ 217, 217, 217 } }, - std::pair{ L"grey85", til::color{ 217, 217, 217 } }, - std::pair{ L"gray86", til::color{ 219, 219, 219 } }, - std::pair{ L"grey86", til::color{ 219, 219, 219 } }, - std::pair{ L"gray87", til::color{ 222, 222, 222 } }, - std::pair{ L"grey87", til::color{ 222, 222, 222 } }, - std::pair{ L"gray88", til::color{ 224, 224, 224 } }, - std::pair{ L"grey88", til::color{ 224, 224, 224 } }, - std::pair{ L"gray89", til::color{ 227, 227, 227 } }, - std::pair{ L"grey89", til::color{ 227, 227, 227 } }, - std::pair{ L"gray90", til::color{ 229, 229, 229 } }, - std::pair{ L"grey90", til::color{ 229, 229, 229 } }, - std::pair{ L"gray91", til::color{ 232, 232, 232 } }, - std::pair{ L"grey91", til::color{ 232, 232, 232 } }, - std::pair{ L"gray92", til::color{ 235, 235, 235 } }, - std::pair{ L"grey92", til::color{ 235, 235, 235 } }, - std::pair{ L"gray93", til::color{ 237, 237, 237 } }, - std::pair{ L"grey93", til::color{ 237, 237, 237 } }, - std::pair{ L"gray94", til::color{ 240, 240, 240 } }, - std::pair{ L"grey94", til::color{ 240, 240, 240 } }, - std::pair{ L"gray95", til::color{ 242, 242, 242 } }, - std::pair{ L"grey95", til::color{ 242, 242, 242 } }, - std::pair{ L"gray96", til::color{ 245, 245, 245 } }, - std::pair{ L"grey96", til::color{ 245, 245, 245 } }, - std::pair{ L"gray97", til::color{ 247, 247, 247 } }, - std::pair{ L"grey97", til::color{ 247, 247, 247 } }, - std::pair{ L"gray98", til::color{ 250, 250, 250 } }, - std::pair{ L"grey98", til::color{ 250, 250, 250 } }, - std::pair{ L"gray99", til::color{ 252, 252, 252 } }, - std::pair{ L"grey99", til::color{ 252, 252, 252 } }, - std::pair{ L"gray100", til::color{ 255, 255, 255 } }, - std::pair{ L"grey100", til::color{ 255, 255, 255 } }, - std::pair{ L"dark grey", til::color{ 169, 169, 169 } }, - std::pair{ L"DarkGrey", til::color{ 169, 169, 169 } }, - std::pair{ L"dark gray", til::color{ 169, 169, 169 } }, - std::pair{ L"DarkGray", til::color{ 169, 169, 169 } }, - std::pair{ L"dark blue", til::color{ 0, 0, 139 } }, - std::pair{ L"DarkBlue", til::color{ 0, 0, 139 } }, - std::pair{ L"dark cyan", til::color{ 0, 139, 139 } }, - std::pair{ L"DarkCyan", til::color{ 0, 139, 139 } }, - std::pair{ L"dark magenta", til::color{ 139, 0, 139 } }, - std::pair{ L"DarkMagenta", til::color{ 139, 0, 139 } }, - std::pair{ L"dark red", til::color{ 139, 0, 0 } }, - std::pair{ L"DarkRed", til::color{ 139, 0, 0 } }, - std::pair{ L"light green", til::color{ 144, 238, 144 } }, - std::pair{ L"LightGreen", til::color{ 144, 238, 144 } }, - std::pair{ L"crimson", til::color{ 220, 20, 60 } }, - std::pair{ L"indigo", til::color{ 75, 0, 130 } }, - std::pair{ L"olive", til::color{ 128, 128, 0 } }, - std::pair{ L"rebecca purple", til::color{ 102, 51, 153 } }, - std::pair{ L"RebeccaPurple", til::color{ 102, 51, 153 } }, - std::pair{ L"silver", til::color{ 192, 192, 192 } }, - std::pair{ L"teal", til::color{ 0, 128, 128 } } +static til::static_map xorgAppColorTable { + std::pair{ "snow"sv, til::color{ 255, 250, 250 } }, + std::pair{ "ghost white"sv, til::color{ 248, 248, 255 } }, + std::pair{ "ghostwhite"sv, til::color{ 248, 248, 255 } }, + std::pair{ "white smoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ "whitesmoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ "gainsboro"sv, til::color{ 220, 220, 220 } }, + std::pair{ "floral white"sv, til::color{ 255, 250, 240 } }, + std::pair{ "floralwhite"sv, til::color{ 255, 250, 240 } }, + std::pair{ "old lace"sv, til::color{ 253, 245, 230 } }, + std::pair{ "oldlace"sv, til::color{ 253, 245, 230 } }, + std::pair{ "linen"sv, til::color{ 250, 240, 230 } }, + std::pair{ "antique white"sv, til::color{ 250, 235, 215 } }, + std::pair{ "antiquewhite"sv, til::color{ 250, 235, 215 } }, + std::pair{ "papaya whip"sv, til::color{ 255, 239, 213 } }, + std::pair{ "papayawhip"sv, til::color{ 255, 239, 213 } }, + std::pair{ "blanched almond"sv, til::color{ 255, 235, 205 } }, + std::pair{ "blanchedalmond"sv, til::color{ 255, 235, 205 } }, + std::pair{ "bisque"sv, til::color{ 255, 228, 196 } }, + std::pair{ "peach puff"sv, til::color{ 255, 218, 185 } }, + std::pair{ "peachpuff"sv, til::color{ 255, 218, 185 } }, + std::pair{ "navajo white"sv, til::color{ 255, 222, 173 } }, + std::pair{ "navajowhite"sv, til::color{ 255, 222, 173 } }, + std::pair{ "moccasin"sv, til::color{ 255, 228, 181 } }, + std::pair{ "cornsilk"sv, til::color{ 255, 248, 220 } }, + std::pair{ "ivory"sv, til::color{ 255, 255, 240 } }, + std::pair{ "lemon chiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ "lemonchiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ "seashell"sv, til::color{ 255, 245, 238 } }, + std::pair{ "honeydew"sv, til::color{ 240, 255, 240 } }, + std::pair{ "mint cream"sv, til::color{ 245, 255, 250 } }, + std::pair{ "mintcream"sv, til::color{ 245, 255, 250 } }, + std::pair{ "azure"sv, til::color{ 240, 255, 255 } }, + std::pair{ "alice blue"sv, til::color{ 240, 248, 255 } }, + std::pair{ "aliceblue"sv, til::color{ 240, 248, 255 } }, + std::pair{ "lavender"sv, til::color{ 230, 230, 250 } }, + std::pair{ "lavender blush"sv, til::color{ 255, 240, 245 } }, + std::pair{ "lavenderblush"sv, til::color{ 255, 240, 245 } }, + std::pair{ "misty rose"sv, til::color{ 255, 228, 225 } }, + std::pair{ "mistyrose"sv, til::color{ 255, 228, 225 } }, + std::pair{ "white"sv, til::color{ 255, 255, 255 } }, + std::pair{ "black"sv, til::color{ 0, 0, 0 } }, + std::pair{ "dark slate gray"sv, til::color{ 47, 79, 79 } }, + std::pair{ "darkslategray"sv, til::color{ 47, 79, 79 } }, + std::pair{ "dark slate grey"sv, til::color{ 47, 79, 79 } }, + std::pair{ "darkslategrey"sv, til::color{ 47, 79, 79 } }, + std::pair{ "dim gray"sv, til::color{ 105, 105, 105 } }, + std::pair{ "dimgray"sv, til::color{ 105, 105, 105 } }, + std::pair{ "dim grey"sv, til::color{ 105, 105, 105 } }, + std::pair{ "dimgrey"sv, til::color{ 105, 105, 105 } }, + std::pair{ "slate gray"sv, til::color{ 112, 128, 144 } }, + std::pair{ "slategray"sv, til::color{ 112, 128, 144 } }, + std::pair{ "slate grey"sv, til::color{ 112, 128, 144 } }, + std::pair{ "slategrey"sv, til::color{ 112, 128, 144 } }, + std::pair{ "light slate gray"sv, til::color{ 119, 136, 153 } }, + std::pair{ "lightslategray"sv, til::color{ 119, 136, 153 } }, + std::pair{ "light slate grey"sv, til::color{ 119, 136, 153 } }, + std::pair{ "lightslategrey"sv, til::color{ 119, 136, 153 } }, + std::pair{ "gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ "grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11 gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11 grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ "web gray"sv, til::color{ 128, 128, 128 } }, + std::pair{ "webgray"sv, til::color{ 128, 128, 128 } }, + std::pair{ "web grey"sv, til::color{ 128, 128, 128 } }, + std::pair{ "webgrey"sv, til::color{ 128, 128, 128 } }, + std::pair{ "light grey"sv, til::color{ 211, 211, 211 } }, + std::pair{ "lightgrey"sv, til::color{ 211, 211, 211 } }, + std::pair{ "light gray"sv, til::color{ 211, 211, 211 } }, + std::pair{ "lightgray"sv, til::color{ 211, 211, 211 } }, + std::pair{ "midnight blue"sv, til::color{ 25, 25, 112 } }, + std::pair{ "midnightblue"sv, til::color{ 25, 25, 112 } }, + std::pair{ "navy"sv, til::color{ 0, 0, 128 } }, + std::pair{ "navy blue"sv, til::color{ 0, 0, 128 } }, + std::pair{ "navyblue"sv, til::color{ 0, 0, 128 } }, + std::pair{ "cornflower blue"sv, til::color{ 100, 149, 237 } }, + std::pair{ "cornflowerblue"sv, til::color{ 100, 149, 237 } }, + std::pair{ "dark slate blue"sv, til::color{ 72, 61, 139 } }, + std::pair{ "darkslateblue"sv, til::color{ 72, 61, 139 } }, + std::pair{ "slate blue"sv, til::color{ 106, 90, 205 } }, + std::pair{ "slateblue"sv, til::color{ 106, 90, 205 } }, + std::pair{ "medium slate blue"sv, til::color{ 123, 104, 238 } }, + std::pair{ "mediumslateblue"sv, til::color{ 123, 104, 238 } }, + std::pair{ "light slate blue"sv, til::color{ 132, 112, 255 } }, + std::pair{ "lightslateblue"sv, til::color{ 132, 112, 255 } }, + std::pair{ "medium blue"sv, til::color{ 0, 0, 205 } }, + std::pair{ "mediumblue"sv, til::color{ 0, 0, 205 } }, + std::pair{ "royal blue"sv, til::color{ 65, 105, 225 } }, + std::pair{ "royalblue"sv, til::color{ 65, 105, 225 } }, + std::pair{ "blue"sv, til::color{ 0, 0, 255 } }, + std::pair{ "dodger blue"sv, til::color{ 30, 144, 255 } }, + std::pair{ "dodgerblue"sv, til::color{ 30, 144, 255 } }, + std::pair{ "deep sky blue"sv, til::color{ 0, 191, 255 } }, + std::pair{ "deepskyblue"sv, til::color{ 0, 191, 255 } }, + std::pair{ "sky blue"sv, til::color{ 135, 206, 235 } }, + std::pair{ "skyblue"sv, til::color{ 135, 206, 235 } }, + std::pair{ "light sky blue"sv, til::color{ 135, 206, 250 } }, + std::pair{ "lightskyblue"sv, til::color{ 135, 206, 250 } }, + std::pair{ "steel blue"sv, til::color{ 70, 130, 180 } }, + std::pair{ "steelblue"sv, til::color{ 70, 130, 180 } }, + std::pair{ "light steel blue"sv, til::color{ 176, 196, 222 } }, + std::pair{ "lightsteelblue"sv, til::color{ 176, 196, 222 } }, + std::pair{ "light blue"sv, til::color{ 173, 216, 230 } }, + std::pair{ "lightblue"sv, til::color{ 173, 216, 230 } }, + std::pair{ "powder blue"sv, til::color{ 176, 224, 230 } }, + std::pair{ "powderblue"sv, til::color{ 176, 224, 230 } }, + std::pair{ "pale turquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ "paleturquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ "dark turquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ "darkturquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ "medium turquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ "mediumturquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ "turquoise"sv, til::color{ 64, 224, 208 } }, + std::pair{ "cyan"sv, til::color{ 0, 255, 255 } }, + std::pair{ "aqua"sv, til::color{ 0, 255, 255 } }, + std::pair{ "light cyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ "lightcyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ "cadet blue"sv, til::color{ 95, 158, 160 } }, + std::pair{ "cadetblue"sv, til::color{ 95, 158, 160 } }, + std::pair{ "medium aquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ "mediumaquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ "aquamarine"sv, til::color{ 127, 255, 212 } }, + std::pair{ "dark green"sv, til::color{ 0, 100, 0 } }, + std::pair{ "darkgreen"sv, til::color{ 0, 100, 0 } }, + std::pair{ "dark olive green"sv, til::color{ 85, 107, 47 } }, + std::pair{ "darkolivegreen"sv, til::color{ 85, 107, 47 } }, + std::pair{ "dark sea green"sv, til::color{ 143, 188, 143 } }, + std::pair{ "darkseagreen"sv, til::color{ 143, 188, 143 } }, + std::pair{ "sea green"sv, til::color{ 46, 139, 87 } }, + std::pair{ "seagreen"sv, til::color{ 46, 139, 87 } }, + std::pair{ "medium sea green"sv, til::color{ 60, 179, 113 } }, + std::pair{ "mediumseagreen"sv, til::color{ 60, 179, 113 } }, + std::pair{ "light sea green"sv, til::color{ 32, 178, 170 } }, + std::pair{ "lightseagreen"sv, til::color{ 32, 178, 170 } }, + std::pair{ "pale green"sv, til::color{ 152, 251, 152 } }, + std::pair{ "palegreen"sv, til::color{ 152, 251, 152 } }, + std::pair{ "spring green"sv, til::color{ 0, 255, 127 } }, + std::pair{ "springgreen"sv, til::color{ 0, 255, 127 } }, + std::pair{ "lawn green"sv, til::color{ 124, 252, 0 } }, + std::pair{ "lawngreen"sv, til::color{ 124, 252, 0 } }, + std::pair{ "green"sv, til::color{ 0, 255, 0 } }, + std::pair{ "lime"sv, til::color{ 0, 255, 0 } }, + std::pair{ "x11 green"sv, til::color{ 0, 255, 0 } }, + std::pair{ "x11green"sv, til::color{ 0, 255, 0 } }, + std::pair{ "web green"sv, til::color{ 0, 128, 0 } }, + std::pair{ "webgreen"sv, til::color{ 0, 128, 0 } }, + std::pair{ "chartreuse"sv, til::color{ 127, 255, 0 } }, + std::pair{ "medium spring green"sv, til::color{ 0, 250, 154 } }, + std::pair{ "mediumspringgreen"sv, til::color{ 0, 250, 154 } }, + std::pair{ "green yellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ "greenyellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ "lime green"sv, til::color{ 50, 205, 50 } }, + std::pair{ "limegreen"sv, til::color{ 50, 205, 50 } }, + std::pair{ "yellow green"sv, til::color{ 154, 205, 50 } }, + std::pair{ "yellowgreen"sv, til::color{ 154, 205, 50 } }, + std::pair{ "forest green"sv, til::color{ 34, 139, 34 } }, + std::pair{ "forestgreen"sv, til::color{ 34, 139, 34 } }, + std::pair{ "olive drab"sv, til::color{ 107, 142, 35 } }, + std::pair{ "olivedrab"sv, til::color{ 107, 142, 35 } }, + std::pair{ "dark khaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ "darkkhaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ "khaki"sv, til::color{ 240, 230, 140 } }, + std::pair{ "pale goldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ "palegoldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ "light goldenrod yellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ "lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ "light yellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ "lightyellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ "yellow"sv, til::color{ 255, 255, 0 } }, + std::pair{ "gold"sv, til::color{ 255, 215, 0 } }, + std::pair{ "light goldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ "lightgoldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ "goldenrod"sv, til::color{ 218, 165, 32 } }, + std::pair{ "dark goldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ "darkgoldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ "rosy brown"sv, til::color{ 188, 143, 143 } }, + std::pair{ "rosybrown"sv, til::color{ 188, 143, 143 } }, + std::pair{ "indian red"sv, til::color{ 205, 92, 92 } }, + std::pair{ "indianred"sv, til::color{ 205, 92, 92 } }, + std::pair{ "saddle brown"sv, til::color{ 139, 69, 19 } }, + std::pair{ "saddlebrown"sv, til::color{ 139, 69, 19 } }, + std::pair{ "sienna"sv, til::color{ 160, 82, 45 } }, + std::pair{ "peru"sv, til::color{ 205, 133, 63 } }, + std::pair{ "burlywood"sv, til::color{ 222, 184, 135 } }, + std::pair{ "beige"sv, til::color{ 245, 245, 220 } }, + std::pair{ "wheat"sv, til::color{ 245, 222, 179 } }, + std::pair{ "sandy brown"sv, til::color{ 244, 164, 96 } }, + std::pair{ "sandybrown"sv, til::color{ 244, 164, 96 } }, + std::pair{ "tan"sv, til::color{ 210, 180, 140 } }, + std::pair{ "chocolate"sv, til::color{ 210, 105, 30 } }, + std::pair{ "firebrick"sv, til::color{ 178, 34, 34 } }, + std::pair{ "brown"sv, til::color{ 165, 42, 42 } }, + std::pair{ "dark salmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ "darksalmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ "salmon"sv, til::color{ 250, 128, 114 } }, + std::pair{ "light salmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ "lightsalmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ "orange"sv, til::color{ 255, 165, 0 } }, + std::pair{ "dark orange"sv, til::color{ 255, 140, 0 } }, + std::pair{ "darkorange"sv, til::color{ 255, 140, 0 } }, + std::pair{ "coral"sv, til::color{ 255, 127, 80 } }, + std::pair{ "light coral"sv, til::color{ 240, 128, 128 } }, + std::pair{ "lightcoral"sv, til::color{ 240, 128, 128 } }, + std::pair{ "tomato"sv, til::color{ 255, 99, 71 } }, + std::pair{ "orange red"sv, til::color{ 255, 69, 0 } }, + std::pair{ "orangered"sv, til::color{ 255, 69, 0 } }, + std::pair{ "red"sv, til::color{ 255, 0, 0 } }, + std::pair{ "hot pink"sv, til::color{ 255, 105, 180 } }, + std::pair{ "hotpink"sv, til::color{ 255, 105, 180 } }, + std::pair{ "deep pink"sv, til::color{ 255, 20, 147 } }, + std::pair{ "deeppink"sv, til::color{ 255, 20, 147 } }, + std::pair{ "pink"sv, til::color{ 255, 192, 203 } }, + std::pair{ "light pink"sv, til::color{ 255, 182, 193 } }, + std::pair{ "lightpink"sv, til::color{ 255, 182, 193 } }, + std::pair{ "pale violet red"sv, til::color{ 219, 112, 147 } }, + std::pair{ "palevioletred"sv, til::color{ 219, 112, 147 } }, + std::pair{ "maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ "x11 maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ "x11maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ "web maroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ "webmaroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ "medium violet red"sv, til::color{ 199, 21, 133 } }, + std::pair{ "mediumvioletred"sv, til::color{ 199, 21, 133 } }, + std::pair{ "violet red"sv, til::color{ 208, 32, 144 } }, + std::pair{ "violetred"sv, til::color{ 208, 32, 144 } }, + std::pair{ "magenta"sv, til::color{ 255, 0, 255 } }, + std::pair{ "fuchsia"sv, til::color{ 255, 0, 255 } }, + std::pair{ "violet"sv, til::color{ 238, 130, 238 } }, + std::pair{ "plum"sv, til::color{ 221, 160, 221 } }, + std::pair{ "orchid"sv, til::color{ 218, 112, 214 } }, + std::pair{ "medium orchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ "mediumorchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ "dark orchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ "darkorchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ "dark violet"sv, til::color{ 148, 0, 211 } }, + std::pair{ "darkviolet"sv, til::color{ 148, 0, 211 } }, + std::pair{ "blue violet"sv, til::color{ 138, 43, 226 } }, + std::pair{ "blueviolet"sv, til::color{ 138, 43, 226 } }, + std::pair{ "purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ "x11 purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ "x11purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ "web purple"sv, til::color{ 128, 0, 128 } }, + std::pair{ "webpurple"sv, til::color{ 128, 0, 128 } }, + std::pair{ "medium purple"sv, til::color{ 147, 112, 219 } }, + std::pair{ "mediumpurple"sv, til::color{ 147, 112, 219 } }, + std::pair{ "thistle"sv, til::color{ 216, 191, 216 } }, + std::pair{ "snow1"sv, til::color{ 255, 250, 250 } }, + std::pair{ "snow2"sv, til::color{ 238, 233, 233 } }, + std::pair{ "snow3"sv, til::color{ 205, 201, 201 } }, + std::pair{ "snow4"sv, til::color{ 139, 137, 137 } }, + std::pair{ "seashell1"sv, til::color{ 255, 245, 238 } }, + std::pair{ "seashell2"sv, til::color{ 238, 229, 222 } }, + std::pair{ "seashell3"sv, til::color{ 205, 197, 191 } }, + std::pair{ "seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ "antiquewhite1"sv, til::color{ 255, 239, 219 } }, + std::pair{ "antiquewhite2"sv, til::color{ 238, 223, 204 } }, + std::pair{ "antiquewhite3"sv, til::color{ 205, 192, 176 } }, + std::pair{ "antiquewhite4"sv, til::color{ 139, 131, 120 } }, + std::pair{ "bisque1"sv, til::color{ 255, 228, 196 } }, + std::pair{ "bisque2"sv, til::color{ 238, 213, 183 } }, + std::pair{ "bisque3"sv, til::color{ 205, 183, 158 } }, + std::pair{ "bisque4"sv, til::color{ 139, 125, 107 } }, + std::pair{ "peachpuff1"sv, til::color{ 255, 218, 185 } }, + std::pair{ "peachpuff2"sv, til::color{ 238, 203, 173 } }, + std::pair{ "peachpuff3"sv, til::color{ 205, 175, 149 } }, + std::pair{ "peachpuff4"sv, til::color{ 139, 119, 101 } }, + std::pair{ "navajowhite1"sv, til::color{ 255, 222, 173 } }, + std::pair{ "navajowhite2"sv, til::color{ 238, 207, 161 } }, + std::pair{ "navajowhite3"sv, til::color{ 205, 179, 139 } }, + std::pair{ "navajowhite4"sv, til::color{ 139, 121, 94 } }, + std::pair{ "lemonchiffon1"sv, til::color{ 255, 250, 205 } }, + std::pair{ "lemonchiffon2"sv, til::color{ 238, 233, 191 } }, + std::pair{ "lemonchiffon3"sv, til::color{ 205, 201, 165 } }, + std::pair{ "lemonchiffon4"sv, til::color{ 139, 137, 112 } }, + std::pair{ "cornsilk1"sv, til::color{ 255, 248, 220 } }, + std::pair{ "cornsilk2"sv, til::color{ 238, 232, 205 } }, + std::pair{ "cornsilk3"sv, til::color{ 205, 200, 177 } }, + std::pair{ "cornsilk4"sv, til::color{ 139, 136, 120 } }, + std::pair{ "ivory1"sv, til::color{ 255, 255, 240 } }, + std::pair{ "ivory2"sv, til::color{ 238, 238, 224 } }, + std::pair{ "ivory3"sv, til::color{ 205, 205, 193 } }, + std::pair{ "ivory4"sv, til::color{ 139, 139, 131 } }, + std::pair{ "honeydew1"sv, til::color{ 240, 255, 240 } }, + std::pair{ "honeydew2"sv, til::color{ 224, 238, 224 } }, + std::pair{ "honeydew3"sv, til::color{ 193, 205, 193 } }, + std::pair{ "honeydew4"sv, til::color{ 131, 139, 131 } }, + std::pair{ "lavenderblush1"sv, til::color{ 255, 240, 245 } }, + std::pair{ "lavenderblush2"sv, til::color{ 238, 224, 229 } }, + std::pair{ "lavenderblush3"sv, til::color{ 205, 193, 197 } }, + std::pair{ "lavenderblush4"sv, til::color{ 139, 131, 134 } }, + std::pair{ "mistyrose1"sv, til::color{ 255, 228, 225 } }, + std::pair{ "mistyrose2"sv, til::color{ 238, 213, 210 } }, + std::pair{ "mistyrose3"sv, til::color{ 205, 183, 181 } }, + std::pair{ "mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ "azure1"sv, til::color{ 240, 255, 255 } }, + std::pair{ "azure2"sv, til::color{ 224, 238, 238 } }, + std::pair{ "azure3"sv, til::color{ 193, 205, 205 } }, + std::pair{ "azure4"sv, til::color{ 131, 139, 139 } }, + std::pair{ "slateblue1"sv, til::color{ 131, 111, 255 } }, + std::pair{ "slateblue2"sv, til::color{ 122, 103, 238 } }, + std::pair{ "slateblue3"sv, til::color{ 105, 89, 205 } }, + std::pair{ "slateblue4"sv, til::color{ 71, 60, 139 } }, + std::pair{ "royalblue1"sv, til::color{ 72, 118, 255 } }, + std::pair{ "royalblue2"sv, til::color{ 67, 110, 238 } }, + std::pair{ "royalblue3"sv, til::color{ 58, 95, 205 } }, + std::pair{ "royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ "blue1"sv, til::color{ 0, 0, 255 } }, + std::pair{ "blue2"sv, til::color{ 0, 0, 238 } }, + std::pair{ "blue3"sv, til::color{ 0, 0, 205 } }, + std::pair{ "blue4"sv, til::color{ 0, 0, 139 } }, + std::pair{ "dodgerblue1"sv, til::color{ 30, 144, 255 } }, + std::pair{ "dodgerblue2"sv, til::color{ 28, 134, 238 } }, + std::pair{ "dodgerblue3"sv, til::color{ 24, 116, 205 } }, + std::pair{ "dodgerblue4"sv, til::color{ 16, 78, 139 } }, + std::pair{ "steelblue1"sv, til::color{ 99, 184, 255 } }, + std::pair{ "steelblue2"sv, til::color{ 92, 172, 238 } }, + std::pair{ "steelblue3"sv, til::color{ 79, 148, 205 } }, + std::pair{ "steelblue4"sv, til::color{ 54, 100, 139 } }, + std::pair{ "deepskyblue1"sv, til::color{ 0, 191, 255 } }, + std::pair{ "deepskyblue2"sv, til::color{ 0, 178, 238 } }, + std::pair{ "deepskyblue3"sv, til::color{ 0, 154, 205 } }, + std::pair{ "deepskyblue4"sv, til::color{ 0, 104, 139 } }, + std::pair{ "skyblue1"sv, til::color{ 135, 206, 255 } }, + std::pair{ "skyblue2"sv, til::color{ 126, 192, 238 } }, + std::pair{ "skyblue3"sv, til::color{ 108, 166, 205 } }, + std::pair{ "skyblue4"sv, til::color{ 74, 112, 139 } }, + std::pair{ "lightskyblue1"sv, til::color{ 176, 226, 255 } }, + std::pair{ "lightskyblue2"sv, til::color{ 164, 211, 238 } }, + std::pair{ "lightskyblue3"sv, til::color{ 141, 182, 205 } }, + std::pair{ "lightskyblue4"sv, til::color{ 96, 123, 139 } }, + std::pair{ "slategray1"sv, til::color{ 198, 226, 255 } }, + std::pair{ "slategray2"sv, til::color{ 185, 211, 238 } }, + std::pair{ "slategray3"sv, til::color{ 159, 182, 205 } }, + std::pair{ "slategray4"sv, til::color{ 108, 123, 139 } }, + std::pair{ "lightsteelblue1"sv, til::color{ 202, 225, 255 } }, + std::pair{ "lightsteelblue2"sv, til::color{ 188, 210, 238 } }, + std::pair{ "lightsteelblue3"sv, til::color{ 162, 181, 205 } }, + std::pair{ "lightsteelblue4"sv, til::color{ 110, 123, 139 } }, + std::pair{ "lightblue1"sv, til::color{ 191, 239, 255 } }, + std::pair{ "lightblue2"sv, til::color{ 178, 223, 238 } }, + std::pair{ "lightblue3"sv, til::color{ 154, 192, 205 } }, + std::pair{ "lightblue4"sv, til::color{ 104, 131, 139 } }, + std::pair{ "lightcyan1"sv, til::color{ 224, 255, 255 } }, + std::pair{ "lightcyan2"sv, til::color{ 209, 238, 238 } }, + std::pair{ "lightcyan3"sv, til::color{ 180, 205, 205 } }, + std::pair{ "lightcyan4"sv, til::color{ 122, 139, 139 } }, + std::pair{ "paleturquoise1"sv, til::color{ 187, 255, 255 } }, + std::pair{ "paleturquoise2"sv, til::color{ 174, 238, 238 } }, + std::pair{ "paleturquoise3"sv, til::color{ 150, 205, 205 } }, + std::pair{ "paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ "cadetblue1"sv, til::color{ 152, 245, 255 } }, + std::pair{ "cadetblue2"sv, til::color{ 142, 229, 238 } }, + std::pair{ "cadetblue3"sv, til::color{ 122, 197, 205 } }, + std::pair{ "cadetblue4"sv, til::color{ 83, 134, 139 } }, + std::pair{ "turquoise1"sv, til::color{ 0, 245, 255 } }, + std::pair{ "turquoise2"sv, til::color{ 0, 229, 238 } }, + std::pair{ "turquoise3"sv, til::color{ 0, 197, 205 } }, + std::pair{ "turquoise4"sv, til::color{ 0, 134, 139 } }, + std::pair{ "cyan1"sv, til::color{ 0, 255, 255 } }, + std::pair{ "cyan2"sv, til::color{ 0, 238, 238 } }, + std::pair{ "cyan3"sv, til::color{ 0, 205, 205 } }, + std::pair{ "cyan4"sv, til::color{ 0, 139, 139 } }, + std::pair{ "darkslategray1"sv, til::color{ 151, 255, 255 } }, + std::pair{ "darkslategray2"sv, til::color{ 141, 238, 238 } }, + std::pair{ "darkslategray3"sv, til::color{ 121, 205, 205 } }, + std::pair{ "darkslategray4"sv, til::color{ 82, 139, 139 } }, + std::pair{ "aquamarine1"sv, til::color{ 127, 255, 212 } }, + std::pair{ "aquamarine2"sv, til::color{ 118, 238, 198 } }, + std::pair{ "aquamarine3"sv, til::color{ 102, 205, 170 } }, + std::pair{ "aquamarine4"sv, til::color{ 69, 139, 116 } }, + std::pair{ "darkseagreen1"sv, til::color{ 193, 255, 193 } }, + std::pair{ "darkseagreen2"sv, til::color{ 180, 238, 180 } }, + std::pair{ "darkseagreen3"sv, til::color{ 155, 205, 155 } }, + std::pair{ "darkseagreen4"sv, til::color{ 105, 139, 105 } }, + std::pair{ "seagreen1"sv, til::color{ 84, 255, 159 } }, + std::pair{ "seagreen2"sv, til::color{ 78, 238, 148 } }, + std::pair{ "seagreen3"sv, til::color{ 67, 205, 128 } }, + std::pair{ "seagreen4"sv, til::color{ 46, 139, 87 } }, + std::pair{ "palegreen1"sv, til::color{ 154, 255, 154 } }, + std::pair{ "palegreen2"sv, til::color{ 144, 238, 144 } }, + std::pair{ "palegreen3"sv, til::color{ 124, 205, 124 } }, + std::pair{ "palegreen4"sv, til::color{ 84, 139, 84 } }, + std::pair{ "springgreen1"sv, til::color{ 0, 255, 127 } }, + std::pair{ "springgreen2"sv, til::color{ 0, 238, 118 } }, + std::pair{ "springgreen3"sv, til::color{ 0, 205, 102 } }, + std::pair{ "springgreen4"sv, til::color{ 0, 139, 69 } }, + std::pair{ "green1"sv, til::color{ 0, 255, 0 } }, + std::pair{ "green2"sv, til::color{ 0, 238, 0 } }, + std::pair{ "green3"sv, til::color{ 0, 205, 0 } }, + std::pair{ "green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ "chartreuse1"sv, til::color{ 127, 255, 0 } }, + std::pair{ "chartreuse2"sv, til::color{ 118, 238, 0 } }, + std::pair{ "chartreuse3"sv, til::color{ 102, 205, 0 } }, + std::pair{ "chartreuse4"sv, til::color{ 69, 139, 0 } }, + std::pair{ "olivedrab1"sv, til::color{ 192, 255, 62 } }, + std::pair{ "olivedrab2"sv, til::color{ 179, 238, 58 } }, + std::pair{ "olivedrab3"sv, til::color{ 154, 205, 50 } }, + std::pair{ "olivedrab4"sv, til::color{ 105, 139, 34 } }, + std::pair{ "darkolivegreen1"sv, til::color{ 202, 255, 112 } }, + std::pair{ "darkolivegreen2"sv, til::color{ 188, 238, 104 } }, + std::pair{ "darkolivegreen3"sv, til::color{ 162, 205, 90 } }, + std::pair{ "darkolivegreen4"sv, til::color{ 110, 139, 61 } }, + std::pair{ "khaki1"sv, til::color{ 255, 246, 143 } }, + std::pair{ "khaki2"sv, til::color{ 238, 230, 133 } }, + std::pair{ "khaki3"sv, til::color{ 205, 198, 115 } }, + std::pair{ "khaki4"sv, til::color{ 139, 134, 78 } }, + std::pair{ "lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, + std::pair{ "lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, + std::pair{ "lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, + std::pair{ "lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, + std::pair{ "lightyellow1"sv, til::color{ 255, 255, 224 } }, + std::pair{ "lightyellow2"sv, til::color{ 238, 238, 209 } }, + std::pair{ "lightyellow3"sv, til::color{ 205, 205, 180 } }, + std::pair{ "lightyellow4"sv, til::color{ 139, 139, 122 } }, + std::pair{ "yellow1"sv, til::color{ 255, 255, 0 } }, + std::pair{ "yellow2"sv, til::color{ 238, 238, 0 } }, + std::pair{ "yellow3"sv, til::color{ 205, 205, 0 } }, + std::pair{ "yellow4"sv, til::color{ 139, 139, 0 } }, + std::pair{ "gold1"sv, til::color{ 255, 215, 0 } }, + std::pair{ "gold2"sv, til::color{ 238, 201, 0 } }, + std::pair{ "gold3"sv, til::color{ 205, 173, 0 } }, + std::pair{ "gold4"sv, til::color{ 139, 117, 0 } }, + std::pair{ "goldenrod1"sv, til::color{ 255, 193, 37 } }, + std::pair{ "goldenrod2"sv, til::color{ 238, 180, 34 } }, + std::pair{ "goldenrod3"sv, til::color{ 205, 155, 29 } }, + std::pair{ "goldenrod4"sv, til::color{ 139, 105, 20 } }, + std::pair{ "darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, + std::pair{ "darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, + std::pair{ "darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, + std::pair{ "darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, + std::pair{ "rosybrown1"sv, til::color{ 255, 193, 193 } }, + std::pair{ "rosybrown2"sv, til::color{ 238, 180, 180 } }, + std::pair{ "rosybrown3"sv, til::color{ 205, 155, 155 } }, + std::pair{ "rosybrown4"sv, til::color{ 139, 105, 105 } }, + std::pair{ "indianred1"sv, til::color{ 255, 106, 106 } }, + std::pair{ "indianred2"sv, til::color{ 238, 99, 99 } }, + std::pair{ "indianred3"sv, til::color{ 205, 85, 85 } }, + std::pair{ "indianred4"sv, til::color{ 139, 58, 58 } }, + std::pair{ "sienna1"sv, til::color{ 255, 130, 71 } }, + std::pair{ "sienna2"sv, til::color{ 238, 121, 66 } }, + std::pair{ "sienna3"sv, til::color{ 205, 104, 57 } }, + std::pair{ "sienna4"sv, til::color{ 139, 71, 38 } }, + std::pair{ "burlywood1"sv, til::color{ 255, 211, 155 } }, + std::pair{ "burlywood2"sv, til::color{ 238, 197, 145 } }, + std::pair{ "burlywood3"sv, til::color{ 205, 170, 125 } }, + std::pair{ "burlywood4"sv, til::color{ 139, 115, 85 } }, + std::pair{ "wheat1"sv, til::color{ 255, 231, 186 } }, + std::pair{ "wheat2"sv, til::color{ 238, 216, 174 } }, + std::pair{ "wheat3"sv, til::color{ 205, 186, 150 } }, + std::pair{ "wheat4"sv, til::color{ 139, 126, 102 } }, + std::pair{ "tan1"sv, til::color{ 255, 165, 79 } }, + std::pair{ "tan2"sv, til::color{ 238, 154, 73 } }, + std::pair{ "tan3"sv, til::color{ 205, 133, 63 } }, + std::pair{ "tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ "chocolate1"sv, til::color{ 255, 127, 36 } }, + std::pair{ "chocolate2"sv, til::color{ 238, 118, 33 } }, + std::pair{ "chocolate3"sv, til::color{ 205, 102, 29 } }, + std::pair{ "chocolate4"sv, til::color{ 139, 69, 19 } }, + std::pair{ "firebrick1"sv, til::color{ 255, 48, 48 } }, + std::pair{ "firebrick2"sv, til::color{ 238, 44, 44 } }, + std::pair{ "firebrick3"sv, til::color{ 205, 38, 38 } }, + std::pair{ "firebrick4"sv, til::color{ 139, 26, 26 } }, + std::pair{ "brown1"sv, til::color{ 255, 64, 64 } }, + std::pair{ "brown2"sv, til::color{ 238, 59, 59 } }, + std::pair{ "brown3"sv, til::color{ 205, 51, 51 } }, + std::pair{ "brown4"sv, til::color{ 139, 35, 35 } }, + std::pair{ "salmon1"sv, til::color{ 255, 140, 105 } }, + std::pair{ "salmon2"sv, til::color{ 238, 130, 98 } }, + std::pair{ "salmon3"sv, til::color{ 205, 112, 84 } }, + std::pair{ "salmon4"sv, til::color{ 139, 76, 57 } }, + std::pair{ "lightsalmon1"sv, til::color{ 255, 160, 122 } }, + std::pair{ "lightsalmon2"sv, til::color{ 238, 149, 114 } }, + std::pair{ "lightsalmon3"sv, til::color{ 205, 129, 98 } }, + std::pair{ "lightsalmon4"sv, til::color{ 139, 87, 66 } }, + std::pair{ "orange1"sv, til::color{ 255, 165, 0 } }, + std::pair{ "orange2"sv, til::color{ 238, 154, 0 } }, + std::pair{ "orange3"sv, til::color{ 205, 133, 0 } }, + std::pair{ "orange4"sv, til::color{ 139, 90, 0 } }, + std::pair{ "darkorange1"sv, til::color{ 255, 127, 0 } }, + std::pair{ "darkorange2"sv, til::color{ 238, 118, 0 } }, + std::pair{ "darkorange3"sv, til::color{ 205, 102, 0 } }, + std::pair{ "darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ "coral1"sv, til::color{ 255, 114, 86 } }, + std::pair{ "coral2"sv, til::color{ 238, 106, 80 } }, + std::pair{ "coral3"sv, til::color{ 205, 91, 69 } }, + std::pair{ "coral4"sv, til::color{ 139, 62, 47 } }, + std::pair{ "tomato1"sv, til::color{ 255, 99, 71 } }, + std::pair{ "tomato2"sv, til::color{ 238, 92, 66 } }, + std::pair{ "tomato3"sv, til::color{ 205, 79, 57 } }, + std::pair{ "tomato4"sv, til::color{ 139, 54, 38 } }, + std::pair{ "orangered1"sv, til::color{ 255, 69, 0 } }, + std::pair{ "orangered2"sv, til::color{ 238, 64, 0 } }, + std::pair{ "orangered3"sv, til::color{ 205, 55, 0 } }, + std::pair{ "orangered4"sv, til::color{ 139, 37, 0 } }, + std::pair{ "red1"sv, til::color{ 255, 0, 0 } }, + std::pair{ "red2"sv, til::color{ 238, 0, 0 } }, + std::pair{ "red3"sv, til::color{ 205, 0, 0 } }, + std::pair{ "red4"sv, til::color{ 139, 0, 0 } }, + std::pair{ "deeppink1"sv, til::color{ 255, 20, 147 } }, + std::pair{ "deeppink2"sv, til::color{ 238, 18, 137 } }, + std::pair{ "deeppink3"sv, til::color{ 205, 16, 118 } }, + std::pair{ "deeppink4"sv, til::color{ 139, 10, 80 } }, + std::pair{ "hotpink1"sv, til::color{ 255, 110, 180 } }, + std::pair{ "hotpink2"sv, til::color{ 238, 106, 167 } }, + std::pair{ "hotpink3"sv, til::color{ 205, 96, 144 } }, + std::pair{ "hotpink4"sv, til::color{ 139, 58, 98 } }, + std::pair{ "pink1"sv, til::color{ 255, 181, 197 } }, + std::pair{ "pink2"sv, til::color{ 238, 169, 184 } }, + std::pair{ "pink3"sv, til::color{ 205, 145, 158 } }, + std::pair{ "pink4"sv, til::color{ 139, 99, 108 } }, + std::pair{ "lightpink1"sv, til::color{ 255, 174, 185 } }, + std::pair{ "lightpink2"sv, til::color{ 238, 162, 173 } }, + std::pair{ "lightpink3"sv, til::color{ 205, 140, 149 } }, + std::pair{ "lightpink4"sv, til::color{ 139, 95, 101 } }, + std::pair{ "palevioletred1"sv, til::color{ 255, 130, 171 } }, + std::pair{ "palevioletred2"sv, til::color{ 238, 121, 159 } }, + std::pair{ "palevioletred3"sv, til::color{ 205, 104, 137 } }, + std::pair{ "palevioletred4"sv, til::color{ 139, 71, 93 } }, + std::pair{ "maroon1"sv, til::color{ 255, 52, 179 } }, + std::pair{ "maroon2"sv, til::color{ 238, 48, 167 } }, + std::pair{ "maroon3"sv, til::color{ 205, 41, 144 } }, + std::pair{ "maroon4"sv, til::color{ 139, 28, 98 } }, + std::pair{ "violetred1"sv, til::color{ 255, 62, 150 } }, + std::pair{ "violetred2"sv, til::color{ 238, 58, 140 } }, + std::pair{ "violetred3"sv, til::color{ 205, 50, 120 } }, + std::pair{ "violetred4"sv, til::color{ 139, 34, 82 } }, + std::pair{ "magenta1"sv, til::color{ 255, 0, 255 } }, + std::pair{ "magenta2"sv, til::color{ 238, 0, 238 } }, + std::pair{ "magenta3"sv, til::color{ 205, 0, 205 } }, + std::pair{ "magenta4"sv, til::color{ 139, 0, 139 } }, + std::pair{ "orchid1"sv, til::color{ 255, 131, 250 } }, + std::pair{ "orchid2"sv, til::color{ 238, 122, 233 } }, + std::pair{ "orchid3"sv, til::color{ 205, 105, 201 } }, + std::pair{ "orchid4"sv, til::color{ 139, 71, 137 } }, + std::pair{ "plum1"sv, til::color{ 255, 187, 255 } }, + std::pair{ "plum2"sv, til::color{ 238, 174, 238 } }, + std::pair{ "plum3"sv, til::color{ 205, 150, 205 } }, + std::pair{ "plum4"sv, til::color{ 139, 102, 139 } }, + std::pair{ "mediumorchid1"sv, til::color{ 224, 102, 255 } }, + std::pair{ "mediumorchid2"sv, til::color{ 209, 95, 238 } }, + std::pair{ "mediumorchid3"sv, til::color{ 180, 82, 205 } }, + std::pair{ "mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ "darkorchid1"sv, til::color{ 191, 62, 255 } }, + std::pair{ "darkorchid2"sv, til::color{ 178, 58, 238 } }, + std::pair{ "darkorchid3"sv, til::color{ 154, 50, 205 } }, + std::pair{ "darkorchid4"sv, til::color{ 104, 34, 139 } }, + std::pair{ "purple1"sv, til::color{ 155, 48, 255 } }, + std::pair{ "purple2"sv, til::color{ 145, 44, 238 } }, + std::pair{ "purple3"sv, til::color{ 125, 38, 205 } }, + std::pair{ "purple4"sv, til::color{ 85, 26, 139 } }, + std::pair{ "mediumpurple1"sv, til::color{ 171, 130, 255 } }, + std::pair{ "mediumpurple2"sv, til::color{ 159, 121, 238 } }, + std::pair{ "mediumpurple3"sv, til::color{ 137, 104, 205 } }, + std::pair{ "mediumpurple4"sv, til::color{ 93, 71, 139 } }, + std::pair{ "thistle1"sv, til::color{ 255, 225, 255 } }, + std::pair{ "thistle2"sv, til::color{ 238, 210, 238 } }, + std::pair{ "thistle3"sv, til::color{ 205, 181, 205 } }, + std::pair{ "thistle4"sv, til::color{ 139, 123, 139 } }, + std::pair{ "gray0"sv, til::color{ 0, 0, 0 } }, + std::pair{ "grey0"sv, til::color{ 0, 0, 0 } }, + std::pair{ "gray1"sv, til::color{ 3, 3, 3 } }, + std::pair{ "grey1"sv, til::color{ 3, 3, 3 } }, + std::pair{ "gray2"sv, til::color{ 5, 5, 5 } }, + std::pair{ "grey2"sv, til::color{ 5, 5, 5 } }, + std::pair{ "gray3"sv, til::color{ 8, 8, 8 } }, + std::pair{ "grey3"sv, til::color{ 8, 8, 8 } }, + std::pair{ "gray4"sv, til::color{ 10, 10, 10 } }, + std::pair{ "grey4"sv, til::color{ 10, 10, 10 } }, + std::pair{ "gray5"sv, til::color{ 13, 13, 13 } }, + std::pair{ "grey5"sv, til::color{ 13, 13, 13 } }, + std::pair{ "gray6"sv, til::color{ 15, 15, 15 } }, + std::pair{ "grey6"sv, til::color{ 15, 15, 15 } }, + std::pair{ "gray7"sv, til::color{ 18, 18, 18 } }, + std::pair{ "grey7"sv, til::color{ 18, 18, 18 } }, + std::pair{ "gray8"sv, til::color{ 20, 20, 20 } }, + std::pair{ "grey8"sv, til::color{ 20, 20, 20 } }, + std::pair{ "gray9"sv, til::color{ 23, 23, 23 } }, + std::pair{ "grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ "gray10"sv, til::color{ 26, 26, 26 } }, + std::pair{ "grey10"sv, til::color{ 26, 26, 26 } }, + std::pair{ "gray11"sv, til::color{ 28, 28, 28 } }, + std::pair{ "grey11"sv, til::color{ 28, 28, 28 } }, + std::pair{ "gray12"sv, til::color{ 31, 31, 31 } }, + std::pair{ "grey12"sv, til::color{ 31, 31, 31 } }, + std::pair{ "gray13"sv, til::color{ 33, 33, 33 } }, + std::pair{ "grey13"sv, til::color{ 33, 33, 33 } }, + std::pair{ "gray14"sv, til::color{ 36, 36, 36 } }, + std::pair{ "grey14"sv, til::color{ 36, 36, 36 } }, + std::pair{ "gray15"sv, til::color{ 38, 38, 38 } }, + std::pair{ "grey15"sv, til::color{ 38, 38, 38 } }, + std::pair{ "gray16"sv, til::color{ 41, 41, 41 } }, + std::pair{ "grey16"sv, til::color{ 41, 41, 41 } }, + std::pair{ "gray17"sv, til::color{ 43, 43, 43 } }, + std::pair{ "grey17"sv, til::color{ 43, 43, 43 } }, + std::pair{ "gray18"sv, til::color{ 46, 46, 46 } }, + std::pair{ "grey18"sv, til::color{ 46, 46, 46 } }, + std::pair{ "gray19"sv, til::color{ 48, 48, 48 } }, + std::pair{ "grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ "gray20"sv, til::color{ 51, 51, 51 } }, + std::pair{ "grey20"sv, til::color{ 51, 51, 51 } }, + std::pair{ "gray21"sv, til::color{ 54, 54, 54 } }, + std::pair{ "grey21"sv, til::color{ 54, 54, 54 } }, + std::pair{ "gray22"sv, til::color{ 56, 56, 56 } }, + std::pair{ "grey22"sv, til::color{ 56, 56, 56 } }, + std::pair{ "gray23"sv, til::color{ 59, 59, 59 } }, + std::pair{ "grey23"sv, til::color{ 59, 59, 59 } }, + std::pair{ "gray24"sv, til::color{ 61, 61, 61 } }, + std::pair{ "grey24"sv, til::color{ 61, 61, 61 } }, + std::pair{ "gray25"sv, til::color{ 64, 64, 64 } }, + std::pair{ "grey25"sv, til::color{ 64, 64, 64 } }, + std::pair{ "gray26"sv, til::color{ 66, 66, 66 } }, + std::pair{ "grey26"sv, til::color{ 66, 66, 66 } }, + std::pair{ "gray27"sv, til::color{ 69, 69, 69 } }, + std::pair{ "grey27"sv, til::color{ 69, 69, 69 } }, + std::pair{ "gray28"sv, til::color{ 71, 71, 71 } }, + std::pair{ "grey28"sv, til::color{ 71, 71, 71 } }, + std::pair{ "gray29"sv, til::color{ 74, 74, 74 } }, + std::pair{ "grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ "gray30"sv, til::color{ 77, 77, 77 } }, + std::pair{ "grey30"sv, til::color{ 77, 77, 77 } }, + std::pair{ "gray31"sv, til::color{ 79, 79, 79 } }, + std::pair{ "grey31"sv, til::color{ 79, 79, 79 } }, + std::pair{ "gray32"sv, til::color{ 82, 82, 82 } }, + std::pair{ "grey32"sv, til::color{ 82, 82, 82 } }, + std::pair{ "gray33"sv, til::color{ 84, 84, 84 } }, + std::pair{ "grey33"sv, til::color{ 84, 84, 84 } }, + std::pair{ "gray34"sv, til::color{ 87, 87, 87 } }, + std::pair{ "grey34"sv, til::color{ 87, 87, 87 } }, + std::pair{ "gray35"sv, til::color{ 89, 89, 89 } }, + std::pair{ "grey35"sv, til::color{ 89, 89, 89 } }, + std::pair{ "gray36"sv, til::color{ 92, 92, 92 } }, + std::pair{ "grey36"sv, til::color{ 92, 92, 92 } }, + std::pair{ "gray37"sv, til::color{ 94, 94, 94 } }, + std::pair{ "grey37"sv, til::color{ 94, 94, 94 } }, + std::pair{ "gray38"sv, til::color{ 97, 97, 97 } }, + std::pair{ "grey38"sv, til::color{ 97, 97, 97 } }, + std::pair{ "gray39"sv, til::color{ 99, 99, 99 } }, + std::pair{ "grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ "gray40"sv, til::color{ 102, 102, 102 } }, + std::pair{ "grey40"sv, til::color{ 102, 102, 102 } }, + std::pair{ "gray41"sv, til::color{ 105, 105, 105 } }, + std::pair{ "grey41"sv, til::color{ 105, 105, 105 } }, + std::pair{ "gray42"sv, til::color{ 107, 107, 107 } }, + std::pair{ "grey42"sv, til::color{ 107, 107, 107 } }, + std::pair{ "gray43"sv, til::color{ 110, 110, 110 } }, + std::pair{ "grey43"sv, til::color{ 110, 110, 110 } }, + std::pair{ "gray44"sv, til::color{ 112, 112, 112 } }, + std::pair{ "grey44"sv, til::color{ 112, 112, 112 } }, + std::pair{ "gray45"sv, til::color{ 115, 115, 115 } }, + std::pair{ "grey45"sv, til::color{ 115, 115, 115 } }, + std::pair{ "gray46"sv, til::color{ 117, 117, 117 } }, + std::pair{ "grey46"sv, til::color{ 117, 117, 117 } }, + std::pair{ "gray47"sv, til::color{ 120, 120, 120 } }, + std::pair{ "grey47"sv, til::color{ 120, 120, 120 } }, + std::pair{ "gray48"sv, til::color{ 122, 122, 122 } }, + std::pair{ "grey48"sv, til::color{ 122, 122, 122 } }, + std::pair{ "gray49"sv, til::color{ 125, 125, 125 } }, + std::pair{ "grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ "gray50"sv, til::color{ 127, 127, 127 } }, + std::pair{ "grey50"sv, til::color{ 127, 127, 127 } }, + std::pair{ "gray51"sv, til::color{ 130, 130, 130 } }, + std::pair{ "grey51"sv, til::color{ 130, 130, 130 } }, + std::pair{ "gray52"sv, til::color{ 133, 133, 133 } }, + std::pair{ "grey52"sv, til::color{ 133, 133, 133 } }, + std::pair{ "gray53"sv, til::color{ 135, 135, 135 } }, + std::pair{ "grey53"sv, til::color{ 135, 135, 135 } }, + std::pair{ "gray54"sv, til::color{ 138, 138, 138 } }, + std::pair{ "grey54"sv, til::color{ 138, 138, 138 } }, + std::pair{ "gray55"sv, til::color{ 140, 140, 140 } }, + std::pair{ "grey55"sv, til::color{ 140, 140, 140 } }, + std::pair{ "gray56"sv, til::color{ 143, 143, 143 } }, + std::pair{ "grey56"sv, til::color{ 143, 143, 143 } }, + std::pair{ "gray57"sv, til::color{ 145, 145, 145 } }, + std::pair{ "grey57"sv, til::color{ 145, 145, 145 } }, + std::pair{ "gray58"sv, til::color{ 148, 148, 148 } }, + std::pair{ "grey58"sv, til::color{ 148, 148, 148 } }, + std::pair{ "gray59"sv, til::color{ 150, 150, 150 } }, + std::pair{ "grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ "gray60"sv, til::color{ 153, 153, 153 } }, + std::pair{ "grey60"sv, til::color{ 153, 153, 153 } }, + std::pair{ "gray61"sv, til::color{ 156, 156, 156 } }, + std::pair{ "grey61"sv, til::color{ 156, 156, 156 } }, + std::pair{ "gray62"sv, til::color{ 158, 158, 158 } }, + std::pair{ "grey62"sv, til::color{ 158, 158, 158 } }, + std::pair{ "gray63"sv, til::color{ 161, 161, 161 } }, + std::pair{ "grey63"sv, til::color{ 161, 161, 161 } }, + std::pair{ "gray64"sv, til::color{ 163, 163, 163 } }, + std::pair{ "grey64"sv, til::color{ 163, 163, 163 } }, + std::pair{ "gray65"sv, til::color{ 166, 166, 166 } }, + std::pair{ "grey65"sv, til::color{ 166, 166, 166 } }, + std::pair{ "gray66"sv, til::color{ 168, 168, 168 } }, + std::pair{ "grey66"sv, til::color{ 168, 168, 168 } }, + std::pair{ "gray67"sv, til::color{ 171, 171, 171 } }, + std::pair{ "grey67"sv, til::color{ 171, 171, 171 } }, + std::pair{ "gray68"sv, til::color{ 173, 173, 173 } }, + std::pair{ "grey68"sv, til::color{ 173, 173, 173 } }, + std::pair{ "gray69"sv, til::color{ 176, 176, 176 } }, + std::pair{ "grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ "gray70"sv, til::color{ 179, 179, 179 } }, + std::pair{ "grey70"sv, til::color{ 179, 179, 179 } }, + std::pair{ "gray71"sv, til::color{ 181, 181, 181 } }, + std::pair{ "grey71"sv, til::color{ 181, 181, 181 } }, + std::pair{ "gray72"sv, til::color{ 184, 184, 184 } }, + std::pair{ "grey72"sv, til::color{ 184, 184, 184 } }, + std::pair{ "gray73"sv, til::color{ 186, 186, 186 } }, + std::pair{ "grey73"sv, til::color{ 186, 186, 186 } }, + std::pair{ "gray74"sv, til::color{ 189, 189, 189 } }, + std::pair{ "grey74"sv, til::color{ 189, 189, 189 } }, + std::pair{ "gray75"sv, til::color{ 191, 191, 191 } }, + std::pair{ "grey75"sv, til::color{ 191, 191, 191 } }, + std::pair{ "gray76"sv, til::color{ 194, 194, 194 } }, + std::pair{ "grey76"sv, til::color{ 194, 194, 194 } }, + std::pair{ "gray77"sv, til::color{ 196, 196, 196 } }, + std::pair{ "grey77"sv, til::color{ 196, 196, 196 } }, + std::pair{ "gray78"sv, til::color{ 199, 199, 199 } }, + std::pair{ "grey78"sv, til::color{ 199, 199, 199 } }, + std::pair{ "gray79"sv, til::color{ 201, 201, 201 } }, + std::pair{ "grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ "gray80"sv, til::color{ 204, 204, 204 } }, + std::pair{ "grey80"sv, til::color{ 204, 204, 204 } }, + std::pair{ "gray81"sv, til::color{ 207, 207, 207 } }, + std::pair{ "grey81"sv, til::color{ 207, 207, 207 } }, + std::pair{ "gray82"sv, til::color{ 209, 209, 209 } }, + std::pair{ "grey82"sv, til::color{ 209, 209, 209 } }, + std::pair{ "gray83"sv, til::color{ 212, 212, 212 } }, + std::pair{ "grey83"sv, til::color{ 212, 212, 212 } }, + std::pair{ "gray84"sv, til::color{ 214, 214, 214 } }, + std::pair{ "grey84"sv, til::color{ 214, 214, 214 } }, + std::pair{ "gray85"sv, til::color{ 217, 217, 217 } }, + std::pair{ "grey85"sv, til::color{ 217, 217, 217 } }, + std::pair{ "gray86"sv, til::color{ 219, 219, 219 } }, + std::pair{ "grey86"sv, til::color{ 219, 219, 219 } }, + std::pair{ "gray87"sv, til::color{ 222, 222, 222 } }, + std::pair{ "grey87"sv, til::color{ 222, 222, 222 } }, + std::pair{ "gray88"sv, til::color{ 224, 224, 224 } }, + std::pair{ "grey88"sv, til::color{ 224, 224, 224 } }, + std::pair{ "gray89"sv, til::color{ 227, 227, 227 } }, + std::pair{ "grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ "gray90"sv, til::color{ 229, 229, 229 } }, + std::pair{ "grey90"sv, til::color{ 229, 229, 229 } }, + std::pair{ "gray91"sv, til::color{ 232, 232, 232 } }, + std::pair{ "grey91"sv, til::color{ 232, 232, 232 } }, + std::pair{ "gray92"sv, til::color{ 235, 235, 235 } }, + std::pair{ "grey92"sv, til::color{ 235, 235, 235 } }, + std::pair{ "gray93"sv, til::color{ 237, 237, 237 } }, + std::pair{ "grey93"sv, til::color{ 237, 237, 237 } }, + std::pair{ "gray94"sv, til::color{ 240, 240, 240 } }, + std::pair{ "grey94"sv, til::color{ 240, 240, 240 } }, + std::pair{ "gray95"sv, til::color{ 242, 242, 242 } }, + std::pair{ "grey95"sv, til::color{ 242, 242, 242 } }, + std::pair{ "gray96"sv, til::color{ 245, 245, 245 } }, + std::pair{ "grey96"sv, til::color{ 245, 245, 245 } }, + std::pair{ "gray97"sv, til::color{ 247, 247, 247 } }, + std::pair{ "grey97"sv, til::color{ 247, 247, 247 } }, + std::pair{ "gray98"sv, til::color{ 250, 250, 250 } }, + std::pair{ "grey98"sv, til::color{ 250, 250, 250 } }, + std::pair{ "gray99"sv, til::color{ 252, 252, 252 } }, + std::pair{ "grey99"sv, til::color{ 252, 252, 252 } }, + std::pair{ "gray100"sv, til::color{ 255, 255, 255 } }, + std::pair{ "grey100"sv, til::color{ 255, 255, 255 } }, + std::pair{ "dark grey"sv, til::color{ 169, 169, 169 } }, + std::pair{ "darkgrey"sv, til::color{ 169, 169, 169 } }, + std::pair{ "dark gray"sv, til::color{ 169, 169, 169 } }, + std::pair{ "darkgray"sv, til::color{ 169, 169, 169 } }, + std::pair{ "dark blue"sv, til::color{ 0, 0, 139 } }, + std::pair{ "darkblue"sv, til::color{ 0, 0, 139 } }, + std::pair{ "dark cyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ "darkcyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ "dark magenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ "darkmagenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ "dark red"sv, til::color{ 139, 0, 0 } }, + std::pair{ "darkred"sv, til::color{ 139, 0, 0 } }, + std::pair{ "light green"sv, til::color{ 144, 238, 144 } }, + std::pair{ "lightgreen"sv, til::color{ 144, 238, 144 } }, + std::pair{ "crimson"sv, til::color{ 220, 20, 60 } }, + std::pair{ "indigo"sv, til::color{ 75, 0, 130 } }, + std::pair{ "olive"sv, til::color{ 128, 128, 0 } }, + std::pair{ "rebecca purple"sv, til::color{ 102, 51, 153 } }, + std::pair{ "rebeccapurple"sv, til::color{ 102, 51, 153 } }, + std::pair{ "silver"sv, til::color{ 192, 192, 192 } }, + std::pair{ "teal"sv, til::color{ 0, 128, 128 } }, }; // Function Description: @@ -1172,7 +1174,10 @@ til::color Utils::ColorFromHexString(const std::string_view str) // in the table, throws runtime_error til::color Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) { - const std::wstring key(wstr); + std::string key = ConvertToA(CP_UTF8, wstr); + std::transform(std::begin(key), std::end(key), std::begin(key), [](const std::string::value_type& x) { + return std::tolower(x, std::locale()); + }); return xorgAppColorTable.at(key); } From f237fe464b3efe9af312acb9b5c14b91ca8dc621 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 12 Sep 2020 09:31:56 +0800 Subject: [PATCH 09/43] Make spell check happy --- .../actions/spell-check/dictionary/README.md | 1 + .../actions/spell-check/dictionary/colors.txt | 782 ++++++++++++++++++ 2 files changed, 783 insertions(+) create mode 100644 .github/actions/spell-check/dictionary/colors.txt diff --git a/.github/actions/spell-check/dictionary/README.md b/.github/actions/spell-check/dictionary/README.md index ac142e12f51..ad8e772c260 100644 --- a/.github/actions/spell-check/dictionary/README.md +++ b/.github/actions/spell-check/dictionary/README.md @@ -18,3 +18,4 @@ it'll be accepted). | [Microsoft](microsoft.txt) | Microsoft brand items | | [Fonts](fonts.txt) | Font names | | [Names](names.txt) | Names of people | +| [Colors](colors.txt) | Names of color | diff --git a/.github/actions/spell-check/dictionary/colors.txt b/.github/actions/spell-check/dictionary/colors.txt new file mode 100644 index 00000000000..6a5b232063a --- /dev/null +++ b/.github/actions/spell-check/dictionary/colors.txt @@ -0,0 +1,782 @@ +snow +ghost-white +ghostwhite +white-smoke +whitesmoke +gainsboro +floral-white +floralwhite +old-lace +oldlace +linen +antique-white +antiquewhite +papaya-whip +papayawhip +blanched-almond +blanchedalmond +bisque +peach-puff +peachpuff +navajo-white +navajowhite +moccasin +cornsilk +ivory +lemon-chiffon +lemonchiffon +seashell +honeydew +mint-cream +mintcream +azure +alice-blue +aliceblue +lavender +lavender-blush +lavenderblush +misty-rose +mistyrose +white +black +dark-slate-gray +darkslategray +dark-slate-grey +darkslategrey +dim-gray +dimgray +dim-grey +dimgrey +slate-gray +slategray +slate-grey +slategrey +light-slate-gray +lightslategray +light-slate-grey +lightslategrey +gray +grey +xray +x11gray +xrey +x11grey +web-gray +webgray +web-grey +webgrey +light-grey +lightgrey +light-gray +lightgray +midnight-blue +midnightblue +navy +navy-blue +navyblue +cornflower-blue +cornflowerblue +dark-slate-blue +darkslateblue +slate-blue +slateblue +medium-slate-blue +mediumslateblue +light-slate-blue +lightslateblue +medium-blue +mediumblue +royal-blue +royalblue +blue +dodger-blue +dodgerblue +deep-sky-blue +deepskyblue +sky-blue +skyblue +light-sky-blue +lightskyblue +steel-blue +steelblue +light-steel-blue +lightsteelblue +light-blue +lightblue +powder-blue +powderblue +pale-turquoise +paleturquoise +dark-turquoise +darkturquoise +medium-turquoise +mediumturquoise +turquoise +cyan +aqua +light-cyan +lightcyan +cadet-blue +cadetblue +medium-aquamarine +mediumaquamarine +aquamarine +dark-green +darkgreen +dark-olive-green +darkolivegreen +dark-sea-green +darkseagreen +sea-green +seagreen +medium-sea-green +mediumseagreen +light-sea-green +lightseagreen +pale-green +palegreen +spring-green +springgreen +lawn-green +lawngreen +green +lime +xreen +x11green +web-green +webgreen +chartreuse +medium-spring-green +mediumspringgreen +green-yellow +greenyellow +lime-green +limegreen +yellow-green +yellowgreen +forest-green +forestgreen +olive-drab +olivedrab +dark-khaki +darkkhaki +khaki +pale-goldenrod +palegoldenrod +light-goldenrod-yellow +lightgoldenrodyellow +light-yellow +lightyellow +yellow +gold +light-goldenrod +lightgoldenrod +goldenrod +dark-goldenrod +darkgoldenrod +rosy-brown +rosybrown +indian-red +indianred +saddle-brown +saddlebrown +sienna +peru +burlywood +beige +wheat +sandy-brown +sandybrown +tan +chocolate +firebrick +brown +dark-salmon +darksalmon +salmon +light-salmon +lightsalmon +orange +dark-orange +darkorange +coral +light-coral +lightcoral +tomato +orange-red +orangered +red +hot-pink +hotpink +deep-pink +deeppink +pink +light-pink +lightpink +pale-violet-red +palevioletred +maroon +xaroon +x11maroon +web-maroon +webmaroon +medium-violet-red +mediumvioletred +violet-red +violetred +magenta +fuchsia +violet +plum +orchid +medium-orchid +mediumorchid +dark-orchid +darkorchid +dark-violet +darkviolet +blue-violet +blueviolet +purple +xurple +x11purple +web-purple +webpurple +medium-purple +mediumpurple +thistle +snow1 +snow2 +snow3 +snow4 +seashell1 +seashell2 +seashell3 +seashell4 +antiquewhite1 +antiquewhite2 +antiquewhite3 +antiquewhite4 +bisque1 +bisque2 +bisque3 +bisque4 +peachpuff1 +peachpuff2 +peachpuff3 +peachpuff4 +navajowhite1 +navajowhite2 +navajowhite3 +navajowhite4 +lemonchiffon1 +lemonchiffon2 +lemonchiffon3 +lemonchiffon4 +cornsilk1 +cornsilk2 +cornsilk3 +cornsilk4 +ivory1 +ivory2 +ivory3 +ivory4 +honeydew1 +honeydew2 +honeydew3 +honeydew4 +lavenderblush1 +lavenderblush2 +lavenderblush3 +lavenderblush4 +mistyrose1 +mistyrose2 +mistyrose3 +mistyrose4 +azure1 +azure2 +azure3 +azure4 +slateblue1 +slateblue2 +slateblue3 +slateblue4 +royalblue1 +royalblue2 +royalblue3 +royalblue4 +blue1 +blue2 +blue3 +blue4 +dodgerblue1 +dodgerblue2 +dodgerblue3 +dodgerblue4 +steelblue1 +steelblue2 +steelblue3 +steelblue4 +deepskyblue1 +deepskyblue2 +deepskyblue3 +deepskyblue4 +skyblue1 +skyblue2 +skyblue3 +skyblue4 +lightskyblue1 +lightskyblue2 +lightskyblue3 +lightskyblue4 +slategray1 +slategray2 +slategray3 +slategray4 +lightsteelblue1 +lightsteelblue2 +lightsteelblue3 +lightsteelblue4 +lightblue1 +lightblue2 +lightblue3 +lightblue4 +lightcyan1 +lightcyan2 +lightcyan3 +lightcyan4 +paleturquoise1 +paleturquoise2 +paleturquoise3 +paleturquoise4 +cadetblue1 +cadetblue2 +cadetblue3 +cadetblue4 +turquoise1 +turquoise2 +turquoise3 +turquoise4 +cyan1 +cyan2 +cyan3 +cyan4 +darkslategray1 +darkslategray2 +darkslategray3 +darkslategray4 +aquamarine1 +aquamarine2 +aquamarine3 +aquamarine4 +darkseagreen1 +darkseagreen2 +darkseagreen3 +darkseagreen4 +seagreen1 +seagreen2 +seagreen3 +seagreen4 +palegreen1 +palegreen2 +palegreen3 +palegreen4 +springgreen1 +springgreen2 +springgreen3 +springgreen4 +green1 +green2 +green3 +green4 +chartreuse1 +chartreuse2 +chartreuse3 +chartreuse4 +olivedrab1 +olivedrab2 +olivedrab3 +olivedrab4 +darkolivegreen1 +darkolivegreen2 +darkolivegreen3 +darkolivegreen4 +khaki1 +khaki2 +khaki3 +khaki4 +lightgoldenrod1 +lightgoldenrod2 +lightgoldenrod3 +lightgoldenrod4 +lightyellow1 +lightyellow2 +lightyellow3 +lightyellow4 +yellow1 +yellow2 +yellow3 +yellow4 +gold1 +gold2 +gold3 +gold4 +goldenrod1 +goldenrod2 +goldenrod3 +goldenrod4 +darkgoldenrod1 +darkgoldenrod2 +darkgoldenrod3 +darkgoldenrod4 +rosybrown1 +rosybrown2 +rosybrown3 +rosybrown4 +indianred1 +indianred2 +indianred3 +indianred4 +sienna1 +sienna2 +sienna3 +sienna4 +burlywood1 +burlywood2 +burlywood3 +burlywood4 +wheat1 +wheat2 +wheat3 +wheat4 +tan1 +tan2 +tan3 +tan4 +chocolate1 +chocolate2 +chocolate3 +chocolate4 +firebrick1 +firebrick2 +firebrick3 +firebrick4 +brown1 +brown2 +brown3 +brown4 +salmon1 +salmon2 +salmon3 +salmon4 +lightsalmon1 +lightsalmon2 +lightsalmon3 +lightsalmon4 +orange1 +orange2 +orange3 +orange4 +darkorange1 +darkorange2 +darkorange3 +darkorange4 +coral1 +coral2 +coral3 +coral4 +tomato1 +tomato2 +tomato3 +tomato4 +orangered1 +orangered2 +orangered3 +orangered4 +red1 +red2 +red3 +red4 +deeppink1 +deeppink2 +deeppink3 +deeppink4 +hotpink1 +hotpink2 +hotpink3 +hotpink4 +pink1 +pink2 +pink3 +pink4 +lightpink1 +lightpink2 +lightpink3 +lightpink4 +palevioletred1 +palevioletred2 +palevioletred3 +palevioletred4 +maroon1 +maroon2 +maroon3 +maroon4 +violetred1 +violetred2 +violetred3 +violetred4 +magenta1 +magenta2 +magenta3 +magenta4 +orchid1 +orchid2 +orchid3 +orchid4 +plum1 +plum2 +plum3 +plum4 +mediumorchid1 +mediumorchid2 +mediumorchid3 +mediumorchid4 +darkorchid1 +darkorchid2 +darkorchid3 +darkorchid4 +purple1 +purple2 +purple3 +purple4 +mediumpurple1 +mediumpurple2 +mediumpurple3 +mediumpurple4 +thistle1 +thistle2 +thistle3 +thistle4 +gray0 +grey0 +gray1 +grey1 +gray2 +grey2 +gray3 +grey3 +gray4 +grey4 +gray5 +grey5 +gray6 +grey6 +gray7 +grey7 +gray8 +grey8 +gray9 +grey9 +gray10 +grey10 +gray11 +grey11 +gray12 +grey12 +gray13 +grey13 +gray14 +grey14 +gray15 +grey15 +gray16 +grey16 +gray17 +grey17 +gray18 +grey18 +gray19 +grey19 +gray20 +grey20 +gray21 +grey21 +gray22 +grey22 +gray23 +grey23 +gray24 +grey24 +gray25 +grey25 +gray26 +grey26 +gray27 +grey27 +gray28 +grey28 +gray29 +grey29 +gray30 +grey30 +gray31 +grey31 +gray32 +grey32 +gray33 +grey33 +gray34 +grey34 +gray35 +grey35 +gray36 +grey36 +gray37 +grey37 +gray38 +grey38 +gray39 +grey39 +gray40 +grey40 +gray41 +grey41 +gray42 +grey42 +gray43 +grey43 +gray44 +grey44 +gray45 +grey45 +gray46 +grey46 +gray47 +grey47 +gray48 +grey48 +gray49 +grey49 +gray50 +grey50 +gray51 +grey51 +gray52 +grey52 +gray53 +grey53 +gray54 +grey54 +gray55 +grey55 +gray56 +grey56 +gray57 +grey57 +gray58 +grey58 +gray59 +grey59 +gray60 +grey60 +gray61 +grey61 +gray62 +grey62 +gray63 +grey63 +gray64 +grey64 +gray65 +grey65 +gray66 +grey66 +gray67 +grey67 +gray68 +grey68 +gray69 +grey69 +gray70 +grey70 +gray71 +grey71 +gray72 +grey72 +gray73 +grey73 +gray74 +grey74 +gray75 +grey75 +gray76 +grey76 +gray77 +grey77 +gray78 +grey78 +gray79 +grey79 +gray80 +grey80 +gray81 +grey81 +gray82 +grey82 +gray83 +grey83 +gray84 +grey84 +gray85 +grey85 +gray86 +grey86 +gray87 +grey87 +gray88 +grey88 +gray89 +grey89 +gray90 +grey90 +gray91 +grey91 +gray92 +grey92 +gray93 +grey93 +gray94 +grey94 +gray95 +grey95 +gray96 +grey96 +gray97 +grey97 +gray98 +grey98 +gray99 +grey99 +gray100 +grey100 +dark-grey +darkgrey +dark-gray +darkgray +dark-blue +darkblue +dark-cyan +darkcyan +dark-magenta +darkmagenta +dark-red +darkred +light-green +lightgreen +crimson +indigo +olive +rebecca-purple +rebeccapurple +silver +teal \ No newline at end of file From 0f5fdd5f461c5b992bf9ba00e751f9948e4db5c9 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 12 Sep 2020 09:37:31 +0800 Subject: [PATCH 10/43] OK now you happy? --- .github/actions/spell-check/dictionary/colors.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/spell-check/dictionary/colors.txt b/.github/actions/spell-check/dictionary/colors.txt index 6a5b232063a..71530dd5555 100644 --- a/.github/actions/spell-check/dictionary/colors.txt +++ b/.github/actions/spell-check/dictionary/colors.txt @@ -779,4 +779,4 @@ olive rebecca-purple rebeccapurple silver -teal \ No newline at end of file +teal From 35611beaa85e96b4a301c05824cf039af26160b0 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 12 Sep 2020 10:21:13 +0800 Subject: [PATCH 11/43] wstring for the win --- .../parser/OutputStateMachineEngine.cpp | 9 +- src/types/inc/utils.hpp | 2 +- src/types/utils.cpp | 1585 +++++++++-------- 3 files changed, 798 insertions(+), 798 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 2797c330428..a59ab7a23f8 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1491,14 +1491,11 @@ try // Try the XOrg app color name. if (!foundRGBColorSpec) { - try + til::color color; + success = Utils::ColorFromXOrgAppColorName(string, color); + if (success) { - til::color color = Utils::ColorFromXOrgAppColorName(string); rgb = RGB(color.r, color.g, color.b); - success = true; - } - catch (...) - { } } diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index 9818f17210f..bfaee1a022b 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -45,7 +45,7 @@ namespace Microsoft::Console::Utils std::string ColorToHexString(const til::color color); til::color ColorFromHexString(const std::string_view wstr); - til::color ColorFromXOrgAppColorName(const std::wstring_view wstr); + bool ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color); void InitializeCampbellColorTable(const gsl::span table); void InitializeCampbellColorTableForConhost(const gsl::span table); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 88fdf941edd..fafa1324c02 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -3,7 +3,6 @@ #include "precomp.h" #include "inc/utils.hpp" -#include "inc/convert.hpp" #include "til/static_map.h" using namespace std::string_view_literals; @@ -288,788 +287,788 @@ static constexpr std::array standardXterm256ColorTable{ }; static til::static_map xorgAppColorTable { - std::pair{ "snow"sv, til::color{ 255, 250, 250 } }, - std::pair{ "ghost white"sv, til::color{ 248, 248, 255 } }, - std::pair{ "ghostwhite"sv, til::color{ 248, 248, 255 } }, - std::pair{ "white smoke"sv, til::color{ 245, 245, 245 } }, - std::pair{ "whitesmoke"sv, til::color{ 245, 245, 245 } }, - std::pair{ "gainsboro"sv, til::color{ 220, 220, 220 } }, - std::pair{ "floral white"sv, til::color{ 255, 250, 240 } }, - std::pair{ "floralwhite"sv, til::color{ 255, 250, 240 } }, - std::pair{ "old lace"sv, til::color{ 253, 245, 230 } }, - std::pair{ "oldlace"sv, til::color{ 253, 245, 230 } }, - std::pair{ "linen"sv, til::color{ 250, 240, 230 } }, - std::pair{ "antique white"sv, til::color{ 250, 235, 215 } }, - std::pair{ "antiquewhite"sv, til::color{ 250, 235, 215 } }, - std::pair{ "papaya whip"sv, til::color{ 255, 239, 213 } }, - std::pair{ "papayawhip"sv, til::color{ 255, 239, 213 } }, - std::pair{ "blanched almond"sv, til::color{ 255, 235, 205 } }, - std::pair{ "blanchedalmond"sv, til::color{ 255, 235, 205 } }, - std::pair{ "bisque"sv, til::color{ 255, 228, 196 } }, - std::pair{ "peach puff"sv, til::color{ 255, 218, 185 } }, - std::pair{ "peachpuff"sv, til::color{ 255, 218, 185 } }, - std::pair{ "navajo white"sv, til::color{ 255, 222, 173 } }, - std::pair{ "navajowhite"sv, til::color{ 255, 222, 173 } }, - std::pair{ "moccasin"sv, til::color{ 255, 228, 181 } }, - std::pair{ "cornsilk"sv, til::color{ 255, 248, 220 } }, - std::pair{ "ivory"sv, til::color{ 255, 255, 240 } }, - std::pair{ "lemon chiffon"sv, til::color{ 255, 250, 205 } }, - std::pair{ "lemonchiffon"sv, til::color{ 255, 250, 205 } }, - std::pair{ "seashell"sv, til::color{ 255, 245, 238 } }, - std::pair{ "honeydew"sv, til::color{ 240, 255, 240 } }, - std::pair{ "mint cream"sv, til::color{ 245, 255, 250 } }, - std::pair{ "mintcream"sv, til::color{ 245, 255, 250 } }, - std::pair{ "azure"sv, til::color{ 240, 255, 255 } }, - std::pair{ "alice blue"sv, til::color{ 240, 248, 255 } }, - std::pair{ "aliceblue"sv, til::color{ 240, 248, 255 } }, - std::pair{ "lavender"sv, til::color{ 230, 230, 250 } }, - std::pair{ "lavender blush"sv, til::color{ 255, 240, 245 } }, - std::pair{ "lavenderblush"sv, til::color{ 255, 240, 245 } }, - std::pair{ "misty rose"sv, til::color{ 255, 228, 225 } }, - std::pair{ "mistyrose"sv, til::color{ 255, 228, 225 } }, - std::pair{ "white"sv, til::color{ 255, 255, 255 } }, - std::pair{ "black"sv, til::color{ 0, 0, 0 } }, - std::pair{ "dark slate gray"sv, til::color{ 47, 79, 79 } }, - std::pair{ "darkslategray"sv, til::color{ 47, 79, 79 } }, - std::pair{ "dark slate grey"sv, til::color{ 47, 79, 79 } }, - std::pair{ "darkslategrey"sv, til::color{ 47, 79, 79 } }, - std::pair{ "dim gray"sv, til::color{ 105, 105, 105 } }, - std::pair{ "dimgray"sv, til::color{ 105, 105, 105 } }, - std::pair{ "dim grey"sv, til::color{ 105, 105, 105 } }, - std::pair{ "dimgrey"sv, til::color{ 105, 105, 105 } }, - std::pair{ "slate gray"sv, til::color{ 112, 128, 144 } }, - std::pair{ "slategray"sv, til::color{ 112, 128, 144 } }, - std::pair{ "slate grey"sv, til::color{ 112, 128, 144 } }, - std::pair{ "slategrey"sv, til::color{ 112, 128, 144 } }, - std::pair{ "light slate gray"sv, til::color{ 119, 136, 153 } }, - std::pair{ "lightslategray"sv, til::color{ 119, 136, 153 } }, - std::pair{ "light slate grey"sv, til::color{ 119, 136, 153 } }, - std::pair{ "lightslategrey"sv, til::color{ 119, 136, 153 } }, - std::pair{ "gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ "grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ "x11 gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ "x11gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ "x11 grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ "x11grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ "web gray"sv, til::color{ 128, 128, 128 } }, - std::pair{ "webgray"sv, til::color{ 128, 128, 128 } }, - std::pair{ "web grey"sv, til::color{ 128, 128, 128 } }, - std::pair{ "webgrey"sv, til::color{ 128, 128, 128 } }, - std::pair{ "light grey"sv, til::color{ 211, 211, 211 } }, - std::pair{ "lightgrey"sv, til::color{ 211, 211, 211 } }, - std::pair{ "light gray"sv, til::color{ 211, 211, 211 } }, - std::pair{ "lightgray"sv, til::color{ 211, 211, 211 } }, - std::pair{ "midnight blue"sv, til::color{ 25, 25, 112 } }, - std::pair{ "midnightblue"sv, til::color{ 25, 25, 112 } }, - std::pair{ "navy"sv, til::color{ 0, 0, 128 } }, - std::pair{ "navy blue"sv, til::color{ 0, 0, 128 } }, - std::pair{ "navyblue"sv, til::color{ 0, 0, 128 } }, - std::pair{ "cornflower blue"sv, til::color{ 100, 149, 237 } }, - std::pair{ "cornflowerblue"sv, til::color{ 100, 149, 237 } }, - std::pair{ "dark slate blue"sv, til::color{ 72, 61, 139 } }, - std::pair{ "darkslateblue"sv, til::color{ 72, 61, 139 } }, - std::pair{ "slate blue"sv, til::color{ 106, 90, 205 } }, - std::pair{ "slateblue"sv, til::color{ 106, 90, 205 } }, - std::pair{ "medium slate blue"sv, til::color{ 123, 104, 238 } }, - std::pair{ "mediumslateblue"sv, til::color{ 123, 104, 238 } }, - std::pair{ "light slate blue"sv, til::color{ 132, 112, 255 } }, - std::pair{ "lightslateblue"sv, til::color{ 132, 112, 255 } }, - std::pair{ "medium blue"sv, til::color{ 0, 0, 205 } }, - std::pair{ "mediumblue"sv, til::color{ 0, 0, 205 } }, - std::pair{ "royal blue"sv, til::color{ 65, 105, 225 } }, - std::pair{ "royalblue"sv, til::color{ 65, 105, 225 } }, - std::pair{ "blue"sv, til::color{ 0, 0, 255 } }, - std::pair{ "dodger blue"sv, til::color{ 30, 144, 255 } }, - std::pair{ "dodgerblue"sv, til::color{ 30, 144, 255 } }, - std::pair{ "deep sky blue"sv, til::color{ 0, 191, 255 } }, - std::pair{ "deepskyblue"sv, til::color{ 0, 191, 255 } }, - std::pair{ "sky blue"sv, til::color{ 135, 206, 235 } }, - std::pair{ "skyblue"sv, til::color{ 135, 206, 235 } }, - std::pair{ "light sky blue"sv, til::color{ 135, 206, 250 } }, - std::pair{ "lightskyblue"sv, til::color{ 135, 206, 250 } }, - std::pair{ "steel blue"sv, til::color{ 70, 130, 180 } }, - std::pair{ "steelblue"sv, til::color{ 70, 130, 180 } }, - std::pair{ "light steel blue"sv, til::color{ 176, 196, 222 } }, - std::pair{ "lightsteelblue"sv, til::color{ 176, 196, 222 } }, - std::pair{ "light blue"sv, til::color{ 173, 216, 230 } }, - std::pair{ "lightblue"sv, til::color{ 173, 216, 230 } }, - std::pair{ "powder blue"sv, til::color{ 176, 224, 230 } }, - std::pair{ "powderblue"sv, til::color{ 176, 224, 230 } }, - std::pair{ "pale turquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ "paleturquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ "dark turquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ "darkturquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ "medium turquoise"sv, til::color{ 72, 209, 204 } }, - std::pair{ "mediumturquoise"sv, til::color{ 72, 209, 204 } }, - std::pair{ "turquoise"sv, til::color{ 64, 224, 208 } }, - std::pair{ "cyan"sv, til::color{ 0, 255, 255 } }, - std::pair{ "aqua"sv, til::color{ 0, 255, 255 } }, - std::pair{ "light cyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ "lightcyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ "cadet blue"sv, til::color{ 95, 158, 160 } }, - std::pair{ "cadetblue"sv, til::color{ 95, 158, 160 } }, - std::pair{ "medium aquamarine"sv, til::color{ 102, 205, 170 } }, - std::pair{ "mediumaquamarine"sv, til::color{ 102, 205, 170 } }, - std::pair{ "aquamarine"sv, til::color{ 127, 255, 212 } }, - std::pair{ "dark green"sv, til::color{ 0, 100, 0 } }, - std::pair{ "darkgreen"sv, til::color{ 0, 100, 0 } }, - std::pair{ "dark olive green"sv, til::color{ 85, 107, 47 } }, - std::pair{ "darkolivegreen"sv, til::color{ 85, 107, 47 } }, - std::pair{ "dark sea green"sv, til::color{ 143, 188, 143 } }, - std::pair{ "darkseagreen"sv, til::color{ 143, 188, 143 } }, - std::pair{ "sea green"sv, til::color{ 46, 139, 87 } }, - std::pair{ "seagreen"sv, til::color{ 46, 139, 87 } }, - std::pair{ "medium sea green"sv, til::color{ 60, 179, 113 } }, - std::pair{ "mediumseagreen"sv, til::color{ 60, 179, 113 } }, - std::pair{ "light sea green"sv, til::color{ 32, 178, 170 } }, - std::pair{ "lightseagreen"sv, til::color{ 32, 178, 170 } }, - std::pair{ "pale green"sv, til::color{ 152, 251, 152 } }, - std::pair{ "palegreen"sv, til::color{ 152, 251, 152 } }, - std::pair{ "spring green"sv, til::color{ 0, 255, 127 } }, - std::pair{ "springgreen"sv, til::color{ 0, 255, 127 } }, - std::pair{ "lawn green"sv, til::color{ 124, 252, 0 } }, - std::pair{ "lawngreen"sv, til::color{ 124, 252, 0 } }, - std::pair{ "green"sv, til::color{ 0, 255, 0 } }, - std::pair{ "lime"sv, til::color{ 0, 255, 0 } }, - std::pair{ "x11 green"sv, til::color{ 0, 255, 0 } }, - std::pair{ "x11green"sv, til::color{ 0, 255, 0 } }, - std::pair{ "web green"sv, til::color{ 0, 128, 0 } }, - std::pair{ "webgreen"sv, til::color{ 0, 128, 0 } }, - std::pair{ "chartreuse"sv, til::color{ 127, 255, 0 } }, - std::pair{ "medium spring green"sv, til::color{ 0, 250, 154 } }, - std::pair{ "mediumspringgreen"sv, til::color{ 0, 250, 154 } }, - std::pair{ "green yellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ "greenyellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ "lime green"sv, til::color{ 50, 205, 50 } }, - std::pair{ "limegreen"sv, til::color{ 50, 205, 50 } }, - std::pair{ "yellow green"sv, til::color{ 154, 205, 50 } }, - std::pair{ "yellowgreen"sv, til::color{ 154, 205, 50 } }, - std::pair{ "forest green"sv, til::color{ 34, 139, 34 } }, - std::pair{ "forestgreen"sv, til::color{ 34, 139, 34 } }, - std::pair{ "olive drab"sv, til::color{ 107, 142, 35 } }, - std::pair{ "olivedrab"sv, til::color{ 107, 142, 35 } }, - std::pair{ "dark khaki"sv, til::color{ 189, 183, 107 } }, - std::pair{ "darkkhaki"sv, til::color{ 189, 183, 107 } }, - std::pair{ "khaki"sv, til::color{ 240, 230, 140 } }, - std::pair{ "pale goldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ "palegoldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ "light goldenrod yellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ "lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ "light yellow"sv, til::color{ 255, 255, 224 } }, - std::pair{ "lightyellow"sv, til::color{ 255, 255, 224 } }, - std::pair{ "yellow"sv, til::color{ 255, 255, 0 } }, - std::pair{ "gold"sv, til::color{ 255, 215, 0 } }, - std::pair{ "light goldenrod"sv, til::color{ 238, 221, 130 } }, - std::pair{ "lightgoldenrod"sv, til::color{ 238, 221, 130 } }, - std::pair{ "goldenrod"sv, til::color{ 218, 165, 32 } }, - std::pair{ "dark goldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ "darkgoldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ "rosy brown"sv, til::color{ 188, 143, 143 } }, - std::pair{ "rosybrown"sv, til::color{ 188, 143, 143 } }, - std::pair{ "indian red"sv, til::color{ 205, 92, 92 } }, - std::pair{ "indianred"sv, til::color{ 205, 92, 92 } }, - std::pair{ "saddle brown"sv, til::color{ 139, 69, 19 } }, - std::pair{ "saddlebrown"sv, til::color{ 139, 69, 19 } }, - std::pair{ "sienna"sv, til::color{ 160, 82, 45 } }, - std::pair{ "peru"sv, til::color{ 205, 133, 63 } }, - std::pair{ "burlywood"sv, til::color{ 222, 184, 135 } }, - std::pair{ "beige"sv, til::color{ 245, 245, 220 } }, - std::pair{ "wheat"sv, til::color{ 245, 222, 179 } }, - std::pair{ "sandy brown"sv, til::color{ 244, 164, 96 } }, - std::pair{ "sandybrown"sv, til::color{ 244, 164, 96 } }, - std::pair{ "tan"sv, til::color{ 210, 180, 140 } }, - std::pair{ "chocolate"sv, til::color{ 210, 105, 30 } }, - std::pair{ "firebrick"sv, til::color{ 178, 34, 34 } }, - std::pair{ "brown"sv, til::color{ 165, 42, 42 } }, - std::pair{ "dark salmon"sv, til::color{ 233, 150, 122 } }, - std::pair{ "darksalmon"sv, til::color{ 233, 150, 122 } }, - std::pair{ "salmon"sv, til::color{ 250, 128, 114 } }, - std::pair{ "light salmon"sv, til::color{ 255, 160, 122 } }, - std::pair{ "lightsalmon"sv, til::color{ 255, 160, 122 } }, - std::pair{ "orange"sv, til::color{ 255, 165, 0 } }, - std::pair{ "dark orange"sv, til::color{ 255, 140, 0 } }, - std::pair{ "darkorange"sv, til::color{ 255, 140, 0 } }, - std::pair{ "coral"sv, til::color{ 255, 127, 80 } }, - std::pair{ "light coral"sv, til::color{ 240, 128, 128 } }, - std::pair{ "lightcoral"sv, til::color{ 240, 128, 128 } }, - std::pair{ "tomato"sv, til::color{ 255, 99, 71 } }, - std::pair{ "orange red"sv, til::color{ 255, 69, 0 } }, - std::pair{ "orangered"sv, til::color{ 255, 69, 0 } }, - std::pair{ "red"sv, til::color{ 255, 0, 0 } }, - std::pair{ "hot pink"sv, til::color{ 255, 105, 180 } }, - std::pair{ "hotpink"sv, til::color{ 255, 105, 180 } }, - std::pair{ "deep pink"sv, til::color{ 255, 20, 147 } }, - std::pair{ "deeppink"sv, til::color{ 255, 20, 147 } }, - std::pair{ "pink"sv, til::color{ 255, 192, 203 } }, - std::pair{ "light pink"sv, til::color{ 255, 182, 193 } }, - std::pair{ "lightpink"sv, til::color{ 255, 182, 193 } }, - std::pair{ "pale violet red"sv, til::color{ 219, 112, 147 } }, - std::pair{ "palevioletred"sv, til::color{ 219, 112, 147 } }, - std::pair{ "maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ "x11 maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ "x11maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ "web maroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ "webmaroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ "medium violet red"sv, til::color{ 199, 21, 133 } }, - std::pair{ "mediumvioletred"sv, til::color{ 199, 21, 133 } }, - std::pair{ "violet red"sv, til::color{ 208, 32, 144 } }, - std::pair{ "violetred"sv, til::color{ 208, 32, 144 } }, - std::pair{ "magenta"sv, til::color{ 255, 0, 255 } }, - std::pair{ "fuchsia"sv, til::color{ 255, 0, 255 } }, - std::pair{ "violet"sv, til::color{ 238, 130, 238 } }, - std::pair{ "plum"sv, til::color{ 221, 160, 221 } }, - std::pair{ "orchid"sv, til::color{ 218, 112, 214 } }, - std::pair{ "medium orchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ "mediumorchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ "dark orchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ "darkorchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ "dark violet"sv, til::color{ 148, 0, 211 } }, - std::pair{ "darkviolet"sv, til::color{ 148, 0, 211 } }, - std::pair{ "blue violet"sv, til::color{ 138, 43, 226 } }, - std::pair{ "blueviolet"sv, til::color{ 138, 43, 226 } }, - std::pair{ "purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ "x11 purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ "x11purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ "web purple"sv, til::color{ 128, 0, 128 } }, - std::pair{ "webpurple"sv, til::color{ 128, 0, 128 } }, - std::pair{ "medium purple"sv, til::color{ 147, 112, 219 } }, - std::pair{ "mediumpurple"sv, til::color{ 147, 112, 219 } }, - std::pair{ "thistle"sv, til::color{ 216, 191, 216 } }, - std::pair{ "snow1"sv, til::color{ 255, 250, 250 } }, - std::pair{ "snow2"sv, til::color{ 238, 233, 233 } }, - std::pair{ "snow3"sv, til::color{ 205, 201, 201 } }, - std::pair{ "snow4"sv, til::color{ 139, 137, 137 } }, - std::pair{ "seashell1"sv, til::color{ 255, 245, 238 } }, - std::pair{ "seashell2"sv, til::color{ 238, 229, 222 } }, - std::pair{ "seashell3"sv, til::color{ 205, 197, 191 } }, - std::pair{ "seashell4"sv, til::color{ 139, 134, 130 } }, - std::pair{ "antiquewhite1"sv, til::color{ 255, 239, 219 } }, - std::pair{ "antiquewhite2"sv, til::color{ 238, 223, 204 } }, - std::pair{ "antiquewhite3"sv, til::color{ 205, 192, 176 } }, - std::pair{ "antiquewhite4"sv, til::color{ 139, 131, 120 } }, - std::pair{ "bisque1"sv, til::color{ 255, 228, 196 } }, - std::pair{ "bisque2"sv, til::color{ 238, 213, 183 } }, - std::pair{ "bisque3"sv, til::color{ 205, 183, 158 } }, - std::pair{ "bisque4"sv, til::color{ 139, 125, 107 } }, - std::pair{ "peachpuff1"sv, til::color{ 255, 218, 185 } }, - std::pair{ "peachpuff2"sv, til::color{ 238, 203, 173 } }, - std::pair{ "peachpuff3"sv, til::color{ 205, 175, 149 } }, - std::pair{ "peachpuff4"sv, til::color{ 139, 119, 101 } }, - std::pair{ "navajowhite1"sv, til::color{ 255, 222, 173 } }, - std::pair{ "navajowhite2"sv, til::color{ 238, 207, 161 } }, - std::pair{ "navajowhite3"sv, til::color{ 205, 179, 139 } }, - std::pair{ "navajowhite4"sv, til::color{ 139, 121, 94 } }, - std::pair{ "lemonchiffon1"sv, til::color{ 255, 250, 205 } }, - std::pair{ "lemonchiffon2"sv, til::color{ 238, 233, 191 } }, - std::pair{ "lemonchiffon3"sv, til::color{ 205, 201, 165 } }, - std::pair{ "lemonchiffon4"sv, til::color{ 139, 137, 112 } }, - std::pair{ "cornsilk1"sv, til::color{ 255, 248, 220 } }, - std::pair{ "cornsilk2"sv, til::color{ 238, 232, 205 } }, - std::pair{ "cornsilk3"sv, til::color{ 205, 200, 177 } }, - std::pair{ "cornsilk4"sv, til::color{ 139, 136, 120 } }, - std::pair{ "ivory1"sv, til::color{ 255, 255, 240 } }, - std::pair{ "ivory2"sv, til::color{ 238, 238, 224 } }, - std::pair{ "ivory3"sv, til::color{ 205, 205, 193 } }, - std::pair{ "ivory4"sv, til::color{ 139, 139, 131 } }, - std::pair{ "honeydew1"sv, til::color{ 240, 255, 240 } }, - std::pair{ "honeydew2"sv, til::color{ 224, 238, 224 } }, - std::pair{ "honeydew3"sv, til::color{ 193, 205, 193 } }, - std::pair{ "honeydew4"sv, til::color{ 131, 139, 131 } }, - std::pair{ "lavenderblush1"sv, til::color{ 255, 240, 245 } }, - std::pair{ "lavenderblush2"sv, til::color{ 238, 224, 229 } }, - std::pair{ "lavenderblush3"sv, til::color{ 205, 193, 197 } }, - std::pair{ "lavenderblush4"sv, til::color{ 139, 131, 134 } }, - std::pair{ "mistyrose1"sv, til::color{ 255, 228, 225 } }, - std::pair{ "mistyrose2"sv, til::color{ 238, 213, 210 } }, - std::pair{ "mistyrose3"sv, til::color{ 205, 183, 181 } }, - std::pair{ "mistyrose4"sv, til::color{ 139, 125, 123 } }, - std::pair{ "azure1"sv, til::color{ 240, 255, 255 } }, - std::pair{ "azure2"sv, til::color{ 224, 238, 238 } }, - std::pair{ "azure3"sv, til::color{ 193, 205, 205 } }, - std::pair{ "azure4"sv, til::color{ 131, 139, 139 } }, - std::pair{ "slateblue1"sv, til::color{ 131, 111, 255 } }, - std::pair{ "slateblue2"sv, til::color{ 122, 103, 238 } }, - std::pair{ "slateblue3"sv, til::color{ 105, 89, 205 } }, - std::pair{ "slateblue4"sv, til::color{ 71, 60, 139 } }, - std::pair{ "royalblue1"sv, til::color{ 72, 118, 255 } }, - std::pair{ "royalblue2"sv, til::color{ 67, 110, 238 } }, - std::pair{ "royalblue3"sv, til::color{ 58, 95, 205 } }, - std::pair{ "royalblue4"sv, til::color{ 39, 64, 139 } }, - std::pair{ "blue1"sv, til::color{ 0, 0, 255 } }, - std::pair{ "blue2"sv, til::color{ 0, 0, 238 } }, - std::pair{ "blue3"sv, til::color{ 0, 0, 205 } }, - std::pair{ "blue4"sv, til::color{ 0, 0, 139 } }, - std::pair{ "dodgerblue1"sv, til::color{ 30, 144, 255 } }, - std::pair{ "dodgerblue2"sv, til::color{ 28, 134, 238 } }, - std::pair{ "dodgerblue3"sv, til::color{ 24, 116, 205 } }, - std::pair{ "dodgerblue4"sv, til::color{ 16, 78, 139 } }, - std::pair{ "steelblue1"sv, til::color{ 99, 184, 255 } }, - std::pair{ "steelblue2"sv, til::color{ 92, 172, 238 } }, - std::pair{ "steelblue3"sv, til::color{ 79, 148, 205 } }, - std::pair{ "steelblue4"sv, til::color{ 54, 100, 139 } }, - std::pair{ "deepskyblue1"sv, til::color{ 0, 191, 255 } }, - std::pair{ "deepskyblue2"sv, til::color{ 0, 178, 238 } }, - std::pair{ "deepskyblue3"sv, til::color{ 0, 154, 205 } }, - std::pair{ "deepskyblue4"sv, til::color{ 0, 104, 139 } }, - std::pair{ "skyblue1"sv, til::color{ 135, 206, 255 } }, - std::pair{ "skyblue2"sv, til::color{ 126, 192, 238 } }, - std::pair{ "skyblue3"sv, til::color{ 108, 166, 205 } }, - std::pair{ "skyblue4"sv, til::color{ 74, 112, 139 } }, - std::pair{ "lightskyblue1"sv, til::color{ 176, 226, 255 } }, - std::pair{ "lightskyblue2"sv, til::color{ 164, 211, 238 } }, - std::pair{ "lightskyblue3"sv, til::color{ 141, 182, 205 } }, - std::pair{ "lightskyblue4"sv, til::color{ 96, 123, 139 } }, - std::pair{ "slategray1"sv, til::color{ 198, 226, 255 } }, - std::pair{ "slategray2"sv, til::color{ 185, 211, 238 } }, - std::pair{ "slategray3"sv, til::color{ 159, 182, 205 } }, - std::pair{ "slategray4"sv, til::color{ 108, 123, 139 } }, - std::pair{ "lightsteelblue1"sv, til::color{ 202, 225, 255 } }, - std::pair{ "lightsteelblue2"sv, til::color{ 188, 210, 238 } }, - std::pair{ "lightsteelblue3"sv, til::color{ 162, 181, 205 } }, - std::pair{ "lightsteelblue4"sv, til::color{ 110, 123, 139 } }, - std::pair{ "lightblue1"sv, til::color{ 191, 239, 255 } }, - std::pair{ "lightblue2"sv, til::color{ 178, 223, 238 } }, - std::pair{ "lightblue3"sv, til::color{ 154, 192, 205 } }, - std::pair{ "lightblue4"sv, til::color{ 104, 131, 139 } }, - std::pair{ "lightcyan1"sv, til::color{ 224, 255, 255 } }, - std::pair{ "lightcyan2"sv, til::color{ 209, 238, 238 } }, - std::pair{ "lightcyan3"sv, til::color{ 180, 205, 205 } }, - std::pair{ "lightcyan4"sv, til::color{ 122, 139, 139 } }, - std::pair{ "paleturquoise1"sv, til::color{ 187, 255, 255 } }, - std::pair{ "paleturquoise2"sv, til::color{ 174, 238, 238 } }, - std::pair{ "paleturquoise3"sv, til::color{ 150, 205, 205 } }, - std::pair{ "paleturquoise4"sv, til::color{ 102, 139, 139 } }, - std::pair{ "cadetblue1"sv, til::color{ 152, 245, 255 } }, - std::pair{ "cadetblue2"sv, til::color{ 142, 229, 238 } }, - std::pair{ "cadetblue3"sv, til::color{ 122, 197, 205 } }, - std::pair{ "cadetblue4"sv, til::color{ 83, 134, 139 } }, - std::pair{ "turquoise1"sv, til::color{ 0, 245, 255 } }, - std::pair{ "turquoise2"sv, til::color{ 0, 229, 238 } }, - std::pair{ "turquoise3"sv, til::color{ 0, 197, 205 } }, - std::pair{ "turquoise4"sv, til::color{ 0, 134, 139 } }, - std::pair{ "cyan1"sv, til::color{ 0, 255, 255 } }, - std::pair{ "cyan2"sv, til::color{ 0, 238, 238 } }, - std::pair{ "cyan3"sv, til::color{ 0, 205, 205 } }, - std::pair{ "cyan4"sv, til::color{ 0, 139, 139 } }, - std::pair{ "darkslategray1"sv, til::color{ 151, 255, 255 } }, - std::pair{ "darkslategray2"sv, til::color{ 141, 238, 238 } }, - std::pair{ "darkslategray3"sv, til::color{ 121, 205, 205 } }, - std::pair{ "darkslategray4"sv, til::color{ 82, 139, 139 } }, - std::pair{ "aquamarine1"sv, til::color{ 127, 255, 212 } }, - std::pair{ "aquamarine2"sv, til::color{ 118, 238, 198 } }, - std::pair{ "aquamarine3"sv, til::color{ 102, 205, 170 } }, - std::pair{ "aquamarine4"sv, til::color{ 69, 139, 116 } }, - std::pair{ "darkseagreen1"sv, til::color{ 193, 255, 193 } }, - std::pair{ "darkseagreen2"sv, til::color{ 180, 238, 180 } }, - std::pair{ "darkseagreen3"sv, til::color{ 155, 205, 155 } }, - std::pair{ "darkseagreen4"sv, til::color{ 105, 139, 105 } }, - std::pair{ "seagreen1"sv, til::color{ 84, 255, 159 } }, - std::pair{ "seagreen2"sv, til::color{ 78, 238, 148 } }, - std::pair{ "seagreen3"sv, til::color{ 67, 205, 128 } }, - std::pair{ "seagreen4"sv, til::color{ 46, 139, 87 } }, - std::pair{ "palegreen1"sv, til::color{ 154, 255, 154 } }, - std::pair{ "palegreen2"sv, til::color{ 144, 238, 144 } }, - std::pair{ "palegreen3"sv, til::color{ 124, 205, 124 } }, - std::pair{ "palegreen4"sv, til::color{ 84, 139, 84 } }, - std::pair{ "springgreen1"sv, til::color{ 0, 255, 127 } }, - std::pair{ "springgreen2"sv, til::color{ 0, 238, 118 } }, - std::pair{ "springgreen3"sv, til::color{ 0, 205, 102 } }, - std::pair{ "springgreen4"sv, til::color{ 0, 139, 69 } }, - std::pair{ "green1"sv, til::color{ 0, 255, 0 } }, - std::pair{ "green2"sv, til::color{ 0, 238, 0 } }, - std::pair{ "green3"sv, til::color{ 0, 205, 0 } }, - std::pair{ "green4"sv, til::color{ 0, 139, 0 } }, - std::pair{ "chartreuse1"sv, til::color{ 127, 255, 0 } }, - std::pair{ "chartreuse2"sv, til::color{ 118, 238, 0 } }, - std::pair{ "chartreuse3"sv, til::color{ 102, 205, 0 } }, - std::pair{ "chartreuse4"sv, til::color{ 69, 139, 0 } }, - std::pair{ "olivedrab1"sv, til::color{ 192, 255, 62 } }, - std::pair{ "olivedrab2"sv, til::color{ 179, 238, 58 } }, - std::pair{ "olivedrab3"sv, til::color{ 154, 205, 50 } }, - std::pair{ "olivedrab4"sv, til::color{ 105, 139, 34 } }, - std::pair{ "darkolivegreen1"sv, til::color{ 202, 255, 112 } }, - std::pair{ "darkolivegreen2"sv, til::color{ 188, 238, 104 } }, - std::pair{ "darkolivegreen3"sv, til::color{ 162, 205, 90 } }, - std::pair{ "darkolivegreen4"sv, til::color{ 110, 139, 61 } }, - std::pair{ "khaki1"sv, til::color{ 255, 246, 143 } }, - std::pair{ "khaki2"sv, til::color{ 238, 230, 133 } }, - std::pair{ "khaki3"sv, til::color{ 205, 198, 115 } }, - std::pair{ "khaki4"sv, til::color{ 139, 134, 78 } }, - std::pair{ "lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, - std::pair{ "lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, - std::pair{ "lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, - std::pair{ "lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, - std::pair{ "lightyellow1"sv, til::color{ 255, 255, 224 } }, - std::pair{ "lightyellow2"sv, til::color{ 238, 238, 209 } }, - std::pair{ "lightyellow3"sv, til::color{ 205, 205, 180 } }, - std::pair{ "lightyellow4"sv, til::color{ 139, 139, 122 } }, - std::pair{ "yellow1"sv, til::color{ 255, 255, 0 } }, - std::pair{ "yellow2"sv, til::color{ 238, 238, 0 } }, - std::pair{ "yellow3"sv, til::color{ 205, 205, 0 } }, - std::pair{ "yellow4"sv, til::color{ 139, 139, 0 } }, - std::pair{ "gold1"sv, til::color{ 255, 215, 0 } }, - std::pair{ "gold2"sv, til::color{ 238, 201, 0 } }, - std::pair{ "gold3"sv, til::color{ 205, 173, 0 } }, - std::pair{ "gold4"sv, til::color{ 139, 117, 0 } }, - std::pair{ "goldenrod1"sv, til::color{ 255, 193, 37 } }, - std::pair{ "goldenrod2"sv, til::color{ 238, 180, 34 } }, - std::pair{ "goldenrod3"sv, til::color{ 205, 155, 29 } }, - std::pair{ "goldenrod4"sv, til::color{ 139, 105, 20 } }, - std::pair{ "darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, - std::pair{ "darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, - std::pair{ "darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, - std::pair{ "darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, - std::pair{ "rosybrown1"sv, til::color{ 255, 193, 193 } }, - std::pair{ "rosybrown2"sv, til::color{ 238, 180, 180 } }, - std::pair{ "rosybrown3"sv, til::color{ 205, 155, 155 } }, - std::pair{ "rosybrown4"sv, til::color{ 139, 105, 105 } }, - std::pair{ "indianred1"sv, til::color{ 255, 106, 106 } }, - std::pair{ "indianred2"sv, til::color{ 238, 99, 99 } }, - std::pair{ "indianred3"sv, til::color{ 205, 85, 85 } }, - std::pair{ "indianred4"sv, til::color{ 139, 58, 58 } }, - std::pair{ "sienna1"sv, til::color{ 255, 130, 71 } }, - std::pair{ "sienna2"sv, til::color{ 238, 121, 66 } }, - std::pair{ "sienna3"sv, til::color{ 205, 104, 57 } }, - std::pair{ "sienna4"sv, til::color{ 139, 71, 38 } }, - std::pair{ "burlywood1"sv, til::color{ 255, 211, 155 } }, - std::pair{ "burlywood2"sv, til::color{ 238, 197, 145 } }, - std::pair{ "burlywood3"sv, til::color{ 205, 170, 125 } }, - std::pair{ "burlywood4"sv, til::color{ 139, 115, 85 } }, - std::pair{ "wheat1"sv, til::color{ 255, 231, 186 } }, - std::pair{ "wheat2"sv, til::color{ 238, 216, 174 } }, - std::pair{ "wheat3"sv, til::color{ 205, 186, 150 } }, - std::pair{ "wheat4"sv, til::color{ 139, 126, 102 } }, - std::pair{ "tan1"sv, til::color{ 255, 165, 79 } }, - std::pair{ "tan2"sv, til::color{ 238, 154, 73 } }, - std::pair{ "tan3"sv, til::color{ 205, 133, 63 } }, - std::pair{ "tan4"sv, til::color{ 139, 90, 43 } }, - std::pair{ "chocolate1"sv, til::color{ 255, 127, 36 } }, - std::pair{ "chocolate2"sv, til::color{ 238, 118, 33 } }, - std::pair{ "chocolate3"sv, til::color{ 205, 102, 29 } }, - std::pair{ "chocolate4"sv, til::color{ 139, 69, 19 } }, - std::pair{ "firebrick1"sv, til::color{ 255, 48, 48 } }, - std::pair{ "firebrick2"sv, til::color{ 238, 44, 44 } }, - std::pair{ "firebrick3"sv, til::color{ 205, 38, 38 } }, - std::pair{ "firebrick4"sv, til::color{ 139, 26, 26 } }, - std::pair{ "brown1"sv, til::color{ 255, 64, 64 } }, - std::pair{ "brown2"sv, til::color{ 238, 59, 59 } }, - std::pair{ "brown3"sv, til::color{ 205, 51, 51 } }, - std::pair{ "brown4"sv, til::color{ 139, 35, 35 } }, - std::pair{ "salmon1"sv, til::color{ 255, 140, 105 } }, - std::pair{ "salmon2"sv, til::color{ 238, 130, 98 } }, - std::pair{ "salmon3"sv, til::color{ 205, 112, 84 } }, - std::pair{ "salmon4"sv, til::color{ 139, 76, 57 } }, - std::pair{ "lightsalmon1"sv, til::color{ 255, 160, 122 } }, - std::pair{ "lightsalmon2"sv, til::color{ 238, 149, 114 } }, - std::pair{ "lightsalmon3"sv, til::color{ 205, 129, 98 } }, - std::pair{ "lightsalmon4"sv, til::color{ 139, 87, 66 } }, - std::pair{ "orange1"sv, til::color{ 255, 165, 0 } }, - std::pair{ "orange2"sv, til::color{ 238, 154, 0 } }, - std::pair{ "orange3"sv, til::color{ 205, 133, 0 } }, - std::pair{ "orange4"sv, til::color{ 139, 90, 0 } }, - std::pair{ "darkorange1"sv, til::color{ 255, 127, 0 } }, - std::pair{ "darkorange2"sv, til::color{ 238, 118, 0 } }, - std::pair{ "darkorange3"sv, til::color{ 205, 102, 0 } }, - std::pair{ "darkorange4"sv, til::color{ 139, 69, 0 } }, - std::pair{ "coral1"sv, til::color{ 255, 114, 86 } }, - std::pair{ "coral2"sv, til::color{ 238, 106, 80 } }, - std::pair{ "coral3"sv, til::color{ 205, 91, 69 } }, - std::pair{ "coral4"sv, til::color{ 139, 62, 47 } }, - std::pair{ "tomato1"sv, til::color{ 255, 99, 71 } }, - std::pair{ "tomato2"sv, til::color{ 238, 92, 66 } }, - std::pair{ "tomato3"sv, til::color{ 205, 79, 57 } }, - std::pair{ "tomato4"sv, til::color{ 139, 54, 38 } }, - std::pair{ "orangered1"sv, til::color{ 255, 69, 0 } }, - std::pair{ "orangered2"sv, til::color{ 238, 64, 0 } }, - std::pair{ "orangered3"sv, til::color{ 205, 55, 0 } }, - std::pair{ "orangered4"sv, til::color{ 139, 37, 0 } }, - std::pair{ "red1"sv, til::color{ 255, 0, 0 } }, - std::pair{ "red2"sv, til::color{ 238, 0, 0 } }, - std::pair{ "red3"sv, til::color{ 205, 0, 0 } }, - std::pair{ "red4"sv, til::color{ 139, 0, 0 } }, - std::pair{ "deeppink1"sv, til::color{ 255, 20, 147 } }, - std::pair{ "deeppink2"sv, til::color{ 238, 18, 137 } }, - std::pair{ "deeppink3"sv, til::color{ 205, 16, 118 } }, - std::pair{ "deeppink4"sv, til::color{ 139, 10, 80 } }, - std::pair{ "hotpink1"sv, til::color{ 255, 110, 180 } }, - std::pair{ "hotpink2"sv, til::color{ 238, 106, 167 } }, - std::pair{ "hotpink3"sv, til::color{ 205, 96, 144 } }, - std::pair{ "hotpink4"sv, til::color{ 139, 58, 98 } }, - std::pair{ "pink1"sv, til::color{ 255, 181, 197 } }, - std::pair{ "pink2"sv, til::color{ 238, 169, 184 } }, - std::pair{ "pink3"sv, til::color{ 205, 145, 158 } }, - std::pair{ "pink4"sv, til::color{ 139, 99, 108 } }, - std::pair{ "lightpink1"sv, til::color{ 255, 174, 185 } }, - std::pair{ "lightpink2"sv, til::color{ 238, 162, 173 } }, - std::pair{ "lightpink3"sv, til::color{ 205, 140, 149 } }, - std::pair{ "lightpink4"sv, til::color{ 139, 95, 101 } }, - std::pair{ "palevioletred1"sv, til::color{ 255, 130, 171 } }, - std::pair{ "palevioletred2"sv, til::color{ 238, 121, 159 } }, - std::pair{ "palevioletred3"sv, til::color{ 205, 104, 137 } }, - std::pair{ "palevioletred4"sv, til::color{ 139, 71, 93 } }, - std::pair{ "maroon1"sv, til::color{ 255, 52, 179 } }, - std::pair{ "maroon2"sv, til::color{ 238, 48, 167 } }, - std::pair{ "maroon3"sv, til::color{ 205, 41, 144 } }, - std::pair{ "maroon4"sv, til::color{ 139, 28, 98 } }, - std::pair{ "violetred1"sv, til::color{ 255, 62, 150 } }, - std::pair{ "violetred2"sv, til::color{ 238, 58, 140 } }, - std::pair{ "violetred3"sv, til::color{ 205, 50, 120 } }, - std::pair{ "violetred4"sv, til::color{ 139, 34, 82 } }, - std::pair{ "magenta1"sv, til::color{ 255, 0, 255 } }, - std::pair{ "magenta2"sv, til::color{ 238, 0, 238 } }, - std::pair{ "magenta3"sv, til::color{ 205, 0, 205 } }, - std::pair{ "magenta4"sv, til::color{ 139, 0, 139 } }, - std::pair{ "orchid1"sv, til::color{ 255, 131, 250 } }, - std::pair{ "orchid2"sv, til::color{ 238, 122, 233 } }, - std::pair{ "orchid3"sv, til::color{ 205, 105, 201 } }, - std::pair{ "orchid4"sv, til::color{ 139, 71, 137 } }, - std::pair{ "plum1"sv, til::color{ 255, 187, 255 } }, - std::pair{ "plum2"sv, til::color{ 238, 174, 238 } }, - std::pair{ "plum3"sv, til::color{ 205, 150, 205 } }, - std::pair{ "plum4"sv, til::color{ 139, 102, 139 } }, - std::pair{ "mediumorchid1"sv, til::color{ 224, 102, 255 } }, - std::pair{ "mediumorchid2"sv, til::color{ 209, 95, 238 } }, - std::pair{ "mediumorchid3"sv, til::color{ 180, 82, 205 } }, - std::pair{ "mediumorchid4"sv, til::color{ 122, 55, 139 } }, - std::pair{ "darkorchid1"sv, til::color{ 191, 62, 255 } }, - std::pair{ "darkorchid2"sv, til::color{ 178, 58, 238 } }, - std::pair{ "darkorchid3"sv, til::color{ 154, 50, 205 } }, - std::pair{ "darkorchid4"sv, til::color{ 104, 34, 139 } }, - std::pair{ "purple1"sv, til::color{ 155, 48, 255 } }, - std::pair{ "purple2"sv, til::color{ 145, 44, 238 } }, - std::pair{ "purple3"sv, til::color{ 125, 38, 205 } }, - std::pair{ "purple4"sv, til::color{ 85, 26, 139 } }, - std::pair{ "mediumpurple1"sv, til::color{ 171, 130, 255 } }, - std::pair{ "mediumpurple2"sv, til::color{ 159, 121, 238 } }, - std::pair{ "mediumpurple3"sv, til::color{ 137, 104, 205 } }, - std::pair{ "mediumpurple4"sv, til::color{ 93, 71, 139 } }, - std::pair{ "thistle1"sv, til::color{ 255, 225, 255 } }, - std::pair{ "thistle2"sv, til::color{ 238, 210, 238 } }, - std::pair{ "thistle3"sv, til::color{ 205, 181, 205 } }, - std::pair{ "thistle4"sv, til::color{ 139, 123, 139 } }, - std::pair{ "gray0"sv, til::color{ 0, 0, 0 } }, - std::pair{ "grey0"sv, til::color{ 0, 0, 0 } }, - std::pair{ "gray1"sv, til::color{ 3, 3, 3 } }, - std::pair{ "grey1"sv, til::color{ 3, 3, 3 } }, - std::pair{ "gray2"sv, til::color{ 5, 5, 5 } }, - std::pair{ "grey2"sv, til::color{ 5, 5, 5 } }, - std::pair{ "gray3"sv, til::color{ 8, 8, 8 } }, - std::pair{ "grey3"sv, til::color{ 8, 8, 8 } }, - std::pair{ "gray4"sv, til::color{ 10, 10, 10 } }, - std::pair{ "grey4"sv, til::color{ 10, 10, 10 } }, - std::pair{ "gray5"sv, til::color{ 13, 13, 13 } }, - std::pair{ "grey5"sv, til::color{ 13, 13, 13 } }, - std::pair{ "gray6"sv, til::color{ 15, 15, 15 } }, - std::pair{ "grey6"sv, til::color{ 15, 15, 15 } }, - std::pair{ "gray7"sv, til::color{ 18, 18, 18 } }, - std::pair{ "grey7"sv, til::color{ 18, 18, 18 } }, - std::pair{ "gray8"sv, til::color{ 20, 20, 20 } }, - std::pair{ "grey8"sv, til::color{ 20, 20, 20 } }, - std::pair{ "gray9"sv, til::color{ 23, 23, 23 } }, - std::pair{ "grey9"sv, til::color{ 23, 23, 23 } }, - std::pair{ "gray10"sv, til::color{ 26, 26, 26 } }, - std::pair{ "grey10"sv, til::color{ 26, 26, 26 } }, - std::pair{ "gray11"sv, til::color{ 28, 28, 28 } }, - std::pair{ "grey11"sv, til::color{ 28, 28, 28 } }, - std::pair{ "gray12"sv, til::color{ 31, 31, 31 } }, - std::pair{ "grey12"sv, til::color{ 31, 31, 31 } }, - std::pair{ "gray13"sv, til::color{ 33, 33, 33 } }, - std::pair{ "grey13"sv, til::color{ 33, 33, 33 } }, - std::pair{ "gray14"sv, til::color{ 36, 36, 36 } }, - std::pair{ "grey14"sv, til::color{ 36, 36, 36 } }, - std::pair{ "gray15"sv, til::color{ 38, 38, 38 } }, - std::pair{ "grey15"sv, til::color{ 38, 38, 38 } }, - std::pair{ "gray16"sv, til::color{ 41, 41, 41 } }, - std::pair{ "grey16"sv, til::color{ 41, 41, 41 } }, - std::pair{ "gray17"sv, til::color{ 43, 43, 43 } }, - std::pair{ "grey17"sv, til::color{ 43, 43, 43 } }, - std::pair{ "gray18"sv, til::color{ 46, 46, 46 } }, - std::pair{ "grey18"sv, til::color{ 46, 46, 46 } }, - std::pair{ "gray19"sv, til::color{ 48, 48, 48 } }, - std::pair{ "grey19"sv, til::color{ 48, 48, 48 } }, - std::pair{ "gray20"sv, til::color{ 51, 51, 51 } }, - std::pair{ "grey20"sv, til::color{ 51, 51, 51 } }, - std::pair{ "gray21"sv, til::color{ 54, 54, 54 } }, - std::pair{ "grey21"sv, til::color{ 54, 54, 54 } }, - std::pair{ "gray22"sv, til::color{ 56, 56, 56 } }, - std::pair{ "grey22"sv, til::color{ 56, 56, 56 } }, - std::pair{ "gray23"sv, til::color{ 59, 59, 59 } }, - std::pair{ "grey23"sv, til::color{ 59, 59, 59 } }, - std::pair{ "gray24"sv, til::color{ 61, 61, 61 } }, - std::pair{ "grey24"sv, til::color{ 61, 61, 61 } }, - std::pair{ "gray25"sv, til::color{ 64, 64, 64 } }, - std::pair{ "grey25"sv, til::color{ 64, 64, 64 } }, - std::pair{ "gray26"sv, til::color{ 66, 66, 66 } }, - std::pair{ "grey26"sv, til::color{ 66, 66, 66 } }, - std::pair{ "gray27"sv, til::color{ 69, 69, 69 } }, - std::pair{ "grey27"sv, til::color{ 69, 69, 69 } }, - std::pair{ "gray28"sv, til::color{ 71, 71, 71 } }, - std::pair{ "grey28"sv, til::color{ 71, 71, 71 } }, - std::pair{ "gray29"sv, til::color{ 74, 74, 74 } }, - std::pair{ "grey29"sv, til::color{ 74, 74, 74 } }, - std::pair{ "gray30"sv, til::color{ 77, 77, 77 } }, - std::pair{ "grey30"sv, til::color{ 77, 77, 77 } }, - std::pair{ "gray31"sv, til::color{ 79, 79, 79 } }, - std::pair{ "grey31"sv, til::color{ 79, 79, 79 } }, - std::pair{ "gray32"sv, til::color{ 82, 82, 82 } }, - std::pair{ "grey32"sv, til::color{ 82, 82, 82 } }, - std::pair{ "gray33"sv, til::color{ 84, 84, 84 } }, - std::pair{ "grey33"sv, til::color{ 84, 84, 84 } }, - std::pair{ "gray34"sv, til::color{ 87, 87, 87 } }, - std::pair{ "grey34"sv, til::color{ 87, 87, 87 } }, - std::pair{ "gray35"sv, til::color{ 89, 89, 89 } }, - std::pair{ "grey35"sv, til::color{ 89, 89, 89 } }, - std::pair{ "gray36"sv, til::color{ 92, 92, 92 } }, - std::pair{ "grey36"sv, til::color{ 92, 92, 92 } }, - std::pair{ "gray37"sv, til::color{ 94, 94, 94 } }, - std::pair{ "grey37"sv, til::color{ 94, 94, 94 } }, - std::pair{ "gray38"sv, til::color{ 97, 97, 97 } }, - std::pair{ "grey38"sv, til::color{ 97, 97, 97 } }, - std::pair{ "gray39"sv, til::color{ 99, 99, 99 } }, - std::pair{ "grey39"sv, til::color{ 99, 99, 99 } }, - std::pair{ "gray40"sv, til::color{ 102, 102, 102 } }, - std::pair{ "grey40"sv, til::color{ 102, 102, 102 } }, - std::pair{ "gray41"sv, til::color{ 105, 105, 105 } }, - std::pair{ "grey41"sv, til::color{ 105, 105, 105 } }, - std::pair{ "gray42"sv, til::color{ 107, 107, 107 } }, - std::pair{ "grey42"sv, til::color{ 107, 107, 107 } }, - std::pair{ "gray43"sv, til::color{ 110, 110, 110 } }, - std::pair{ "grey43"sv, til::color{ 110, 110, 110 } }, - std::pair{ "gray44"sv, til::color{ 112, 112, 112 } }, - std::pair{ "grey44"sv, til::color{ 112, 112, 112 } }, - std::pair{ "gray45"sv, til::color{ 115, 115, 115 } }, - std::pair{ "grey45"sv, til::color{ 115, 115, 115 } }, - std::pair{ "gray46"sv, til::color{ 117, 117, 117 } }, - std::pair{ "grey46"sv, til::color{ 117, 117, 117 } }, - std::pair{ "gray47"sv, til::color{ 120, 120, 120 } }, - std::pair{ "grey47"sv, til::color{ 120, 120, 120 } }, - std::pair{ "gray48"sv, til::color{ 122, 122, 122 } }, - std::pair{ "grey48"sv, til::color{ 122, 122, 122 } }, - std::pair{ "gray49"sv, til::color{ 125, 125, 125 } }, - std::pair{ "grey49"sv, til::color{ 125, 125, 125 } }, - std::pair{ "gray50"sv, til::color{ 127, 127, 127 } }, - std::pair{ "grey50"sv, til::color{ 127, 127, 127 } }, - std::pair{ "gray51"sv, til::color{ 130, 130, 130 } }, - std::pair{ "grey51"sv, til::color{ 130, 130, 130 } }, - std::pair{ "gray52"sv, til::color{ 133, 133, 133 } }, - std::pair{ "grey52"sv, til::color{ 133, 133, 133 } }, - std::pair{ "gray53"sv, til::color{ 135, 135, 135 } }, - std::pair{ "grey53"sv, til::color{ 135, 135, 135 } }, - std::pair{ "gray54"sv, til::color{ 138, 138, 138 } }, - std::pair{ "grey54"sv, til::color{ 138, 138, 138 } }, - std::pair{ "gray55"sv, til::color{ 140, 140, 140 } }, - std::pair{ "grey55"sv, til::color{ 140, 140, 140 } }, - std::pair{ "gray56"sv, til::color{ 143, 143, 143 } }, - std::pair{ "grey56"sv, til::color{ 143, 143, 143 } }, - std::pair{ "gray57"sv, til::color{ 145, 145, 145 } }, - std::pair{ "grey57"sv, til::color{ 145, 145, 145 } }, - std::pair{ "gray58"sv, til::color{ 148, 148, 148 } }, - std::pair{ "grey58"sv, til::color{ 148, 148, 148 } }, - std::pair{ "gray59"sv, til::color{ 150, 150, 150 } }, - std::pair{ "grey59"sv, til::color{ 150, 150, 150 } }, - std::pair{ "gray60"sv, til::color{ 153, 153, 153 } }, - std::pair{ "grey60"sv, til::color{ 153, 153, 153 } }, - std::pair{ "gray61"sv, til::color{ 156, 156, 156 } }, - std::pair{ "grey61"sv, til::color{ 156, 156, 156 } }, - std::pair{ "gray62"sv, til::color{ 158, 158, 158 } }, - std::pair{ "grey62"sv, til::color{ 158, 158, 158 } }, - std::pair{ "gray63"sv, til::color{ 161, 161, 161 } }, - std::pair{ "grey63"sv, til::color{ 161, 161, 161 } }, - std::pair{ "gray64"sv, til::color{ 163, 163, 163 } }, - std::pair{ "grey64"sv, til::color{ 163, 163, 163 } }, - std::pair{ "gray65"sv, til::color{ 166, 166, 166 } }, - std::pair{ "grey65"sv, til::color{ 166, 166, 166 } }, - std::pair{ "gray66"sv, til::color{ 168, 168, 168 } }, - std::pair{ "grey66"sv, til::color{ 168, 168, 168 } }, - std::pair{ "gray67"sv, til::color{ 171, 171, 171 } }, - std::pair{ "grey67"sv, til::color{ 171, 171, 171 } }, - std::pair{ "gray68"sv, til::color{ 173, 173, 173 } }, - std::pair{ "grey68"sv, til::color{ 173, 173, 173 } }, - std::pair{ "gray69"sv, til::color{ 176, 176, 176 } }, - std::pair{ "grey69"sv, til::color{ 176, 176, 176 } }, - std::pair{ "gray70"sv, til::color{ 179, 179, 179 } }, - std::pair{ "grey70"sv, til::color{ 179, 179, 179 } }, - std::pair{ "gray71"sv, til::color{ 181, 181, 181 } }, - std::pair{ "grey71"sv, til::color{ 181, 181, 181 } }, - std::pair{ "gray72"sv, til::color{ 184, 184, 184 } }, - std::pair{ "grey72"sv, til::color{ 184, 184, 184 } }, - std::pair{ "gray73"sv, til::color{ 186, 186, 186 } }, - std::pair{ "grey73"sv, til::color{ 186, 186, 186 } }, - std::pair{ "gray74"sv, til::color{ 189, 189, 189 } }, - std::pair{ "grey74"sv, til::color{ 189, 189, 189 } }, - std::pair{ "gray75"sv, til::color{ 191, 191, 191 } }, - std::pair{ "grey75"sv, til::color{ 191, 191, 191 } }, - std::pair{ "gray76"sv, til::color{ 194, 194, 194 } }, - std::pair{ "grey76"sv, til::color{ 194, 194, 194 } }, - std::pair{ "gray77"sv, til::color{ 196, 196, 196 } }, - std::pair{ "grey77"sv, til::color{ 196, 196, 196 } }, - std::pair{ "gray78"sv, til::color{ 199, 199, 199 } }, - std::pair{ "grey78"sv, til::color{ 199, 199, 199 } }, - std::pair{ "gray79"sv, til::color{ 201, 201, 201 } }, - std::pair{ "grey79"sv, til::color{ 201, 201, 201 } }, - std::pair{ "gray80"sv, til::color{ 204, 204, 204 } }, - std::pair{ "grey80"sv, til::color{ 204, 204, 204 } }, - std::pair{ "gray81"sv, til::color{ 207, 207, 207 } }, - std::pair{ "grey81"sv, til::color{ 207, 207, 207 } }, - std::pair{ "gray82"sv, til::color{ 209, 209, 209 } }, - std::pair{ "grey82"sv, til::color{ 209, 209, 209 } }, - std::pair{ "gray83"sv, til::color{ 212, 212, 212 } }, - std::pair{ "grey83"sv, til::color{ 212, 212, 212 } }, - std::pair{ "gray84"sv, til::color{ 214, 214, 214 } }, - std::pair{ "grey84"sv, til::color{ 214, 214, 214 } }, - std::pair{ "gray85"sv, til::color{ 217, 217, 217 } }, - std::pair{ "grey85"sv, til::color{ 217, 217, 217 } }, - std::pair{ "gray86"sv, til::color{ 219, 219, 219 } }, - std::pair{ "grey86"sv, til::color{ 219, 219, 219 } }, - std::pair{ "gray87"sv, til::color{ 222, 222, 222 } }, - std::pair{ "grey87"sv, til::color{ 222, 222, 222 } }, - std::pair{ "gray88"sv, til::color{ 224, 224, 224 } }, - std::pair{ "grey88"sv, til::color{ 224, 224, 224 } }, - std::pair{ "gray89"sv, til::color{ 227, 227, 227 } }, - std::pair{ "grey89"sv, til::color{ 227, 227, 227 } }, - std::pair{ "gray90"sv, til::color{ 229, 229, 229 } }, - std::pair{ "grey90"sv, til::color{ 229, 229, 229 } }, - std::pair{ "gray91"sv, til::color{ 232, 232, 232 } }, - std::pair{ "grey91"sv, til::color{ 232, 232, 232 } }, - std::pair{ "gray92"sv, til::color{ 235, 235, 235 } }, - std::pair{ "grey92"sv, til::color{ 235, 235, 235 } }, - std::pair{ "gray93"sv, til::color{ 237, 237, 237 } }, - std::pair{ "grey93"sv, til::color{ 237, 237, 237 } }, - std::pair{ "gray94"sv, til::color{ 240, 240, 240 } }, - std::pair{ "grey94"sv, til::color{ 240, 240, 240 } }, - std::pair{ "gray95"sv, til::color{ 242, 242, 242 } }, - std::pair{ "grey95"sv, til::color{ 242, 242, 242 } }, - std::pair{ "gray96"sv, til::color{ 245, 245, 245 } }, - std::pair{ "grey96"sv, til::color{ 245, 245, 245 } }, - std::pair{ "gray97"sv, til::color{ 247, 247, 247 } }, - std::pair{ "grey97"sv, til::color{ 247, 247, 247 } }, - std::pair{ "gray98"sv, til::color{ 250, 250, 250 } }, - std::pair{ "grey98"sv, til::color{ 250, 250, 250 } }, - std::pair{ "gray99"sv, til::color{ 252, 252, 252 } }, - std::pair{ "grey99"sv, til::color{ 252, 252, 252 } }, - std::pair{ "gray100"sv, til::color{ 255, 255, 255 } }, - std::pair{ "grey100"sv, til::color{ 255, 255, 255 } }, - std::pair{ "dark grey"sv, til::color{ 169, 169, 169 } }, - std::pair{ "darkgrey"sv, til::color{ 169, 169, 169 } }, - std::pair{ "dark gray"sv, til::color{ 169, 169, 169 } }, - std::pair{ "darkgray"sv, til::color{ 169, 169, 169 } }, - std::pair{ "dark blue"sv, til::color{ 0, 0, 139 } }, - std::pair{ "darkblue"sv, til::color{ 0, 0, 139 } }, - std::pair{ "dark cyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ "darkcyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ "dark magenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ "darkmagenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ "dark red"sv, til::color{ 139, 0, 0 } }, - std::pair{ "darkred"sv, til::color{ 139, 0, 0 } }, - std::pair{ "light green"sv, til::color{ 144, 238, 144 } }, - std::pair{ "lightgreen"sv, til::color{ 144, 238, 144 } }, - std::pair{ "crimson"sv, til::color{ 220, 20, 60 } }, - std::pair{ "indigo"sv, til::color{ 75, 0, 130 } }, - std::pair{ "olive"sv, til::color{ 128, 128, 0 } }, - std::pair{ "rebecca purple"sv, til::color{ 102, 51, 153 } }, - std::pair{ "rebeccapurple"sv, til::color{ 102, 51, 153 } }, - std::pair{ "silver"sv, til::color{ 192, 192, 192 } }, - std::pair{ "teal"sv, til::color{ 0, 128, 128 } }, + std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"ghost white"sv, til::color{ 248, 248, 255 } }, + std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, + std::pair{ L"white smoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, + std::pair{ L"floral white"sv, til::color{ 255, 250, 240 } }, + std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, + std::pair{ L"old lace"sv, til::color{ 253, 245, 230 } }, + std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, + std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, + std::pair{ L"antique white"sv, til::color{ 250, 235, 215 } }, + std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, + std::pair{ L"papaya whip"sv, til::color{ 255, 239, 213 } }, + std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, + std::pair{ L"blanched almond"sv, til::color{ 255, 235, 205 } }, + std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, + std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"peach puff"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"navajo white"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, + std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"lemon chiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"mint cream"sv, til::color{ 245, 255, 250 } }, + std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, + std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, + std::pair{ L"alice blue"sv, til::color{ 240, 248, 255 } }, + std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, + std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, + std::pair{ L"lavender blush"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"misty rose"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"dark slate gray"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"dark slate grey"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"dim gray"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dim grey"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"slate gray"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"slate grey"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"light slate gray"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"light slate grey"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11 gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11 grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"web gray"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"web grey"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"light grey"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"light gray"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"midnight blue"sv, til::color{ 25, 25, 112 } }, + std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, + std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"navy blue"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"cornflower blue"sv, til::color{ 100, 149, 237 } }, + std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, + std::pair{ L"dark slate blue"sv, til::color{ 72, 61, 139 } }, + std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, + std::pair{ L"slate blue"sv, til::color{ 106, 90, 205 } }, + std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, + std::pair{ L"medium slate blue"sv, til::color{ 123, 104, 238 } }, + std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, + std::pair{ L"light slate blue"sv, til::color{ 132, 112, 255 } }, + std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, + std::pair{ L"medium blue"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"royal blue"sv, til::color{ 65, 105, 225 } }, + std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, + std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, + std::pair{ L"dodger blue"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"deep sky blue"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"sky blue"sv, til::color{ 135, 206, 235 } }, + std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, + std::pair{ L"light sky blue"sv, til::color{ 135, 206, 250 } }, + std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, + std::pair{ L"steel blue"sv, til::color{ 70, 130, 180 } }, + std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, + std::pair{ L"light steel blue"sv, til::color{ 176, 196, 222 } }, + std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, + std::pair{ L"light blue"sv, til::color{ 173, 216, 230 } }, + std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, + std::pair{ L"powder blue"sv, til::color{ 176, 224, 230 } }, + std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, + std::pair{ L"pale turquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ L"dark turquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ L"medium turquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, + std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"light cyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"cadet blue"sv, til::color{ 95, 158, 160 } }, + std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, + std::pair{ L"medium aquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"dark green"sv, til::color{ 0, 100, 0 } }, + std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, + std::pair{ L"dark olive green"sv, til::color{ 85, 107, 47 } }, + std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, + std::pair{ L"dark sea green"sv, til::color{ 143, 188, 143 } }, + std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, + std::pair{ L"sea green"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"medium sea green"sv, til::color{ 60, 179, 113 } }, + std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, + std::pair{ L"light sea green"sv, til::color{ 32, 178, 170 } }, + std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, + std::pair{ L"pale green"sv, til::color{ 152, 251, 152 } }, + std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, + std::pair{ L"spring green"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"lawn green"sv, til::color{ 124, 252, 0 } }, + std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, + std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"x11 green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"web green"sv, til::color{ 0, 128, 0 } }, + std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, + std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, + std::pair{ L"medium spring green"sv, til::color{ 0, 250, 154 } }, + std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, + std::pair{ L"green yellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ L"lime green"sv, til::color{ 50, 205, 50 } }, + std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, + std::pair{ L"yellow green"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"forest green"sv, til::color{ 34, 139, 34 } }, + std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, + std::pair{ L"olive drab"sv, til::color{ 107, 142, 35 } }, + std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, + std::pair{ L"dark khaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, + std::pair{ L"pale goldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ L"light goldenrod yellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ L"light yellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"light goldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, + std::pair{ L"dark goldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ L"rosy brown"sv, til::color{ 188, 143, 143 } }, + std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, + std::pair{ L"indian red"sv, til::color{ 205, 92, 92 } }, + std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, + std::pair{ L"saddle brown"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, + std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, + std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, + std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, + std::pair{ L"sandy brown"sv, til::color{ 244, 164, 96 } }, + std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, + std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, + std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, + std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, + std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, + std::pair{ L"dark salmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, + std::pair{ L"light salmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"dark orange"sv, til::color{ 255, 140, 0 } }, + std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, + std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, + std::pair{ L"light coral"sv, til::color{ 240, 128, 128 } }, + std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, + std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"orange red"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"hot pink"sv, til::color{ 255, 105, 180 } }, + std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, + std::pair{ L"deep pink"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, + std::pair{ L"light pink"sv, til::color{ 255, 182, 193 } }, + std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, + std::pair{ L"pale violet red"sv, til::color{ 219, 112, 147 } }, + std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, + std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"x11 maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"web maroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ L"medium violet red"sv, til::color{ 199, 21, 133 } }, + std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, + std::pair{ L"violet red"sv, til::color{ 208, 32, 144 } }, + std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, + std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, + std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, + std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, + std::pair{ L"medium orchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ L"dark orchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ L"dark violet"sv, til::color{ 148, 0, 211 } }, + std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, + std::pair{ L"blue violet"sv, til::color{ 138, 43, 226 } }, + std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, + std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"x11 purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"web purple"sv, til::color{ 128, 0, 128 } }, + std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, + std::pair{ L"medium purple"sv, til::color{ 147, 112, 219 } }, + std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, + std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, + std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, + std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, + std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, + std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, + std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, + std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ L"antiquewhite1"sv, til::color{ 255, 239, 219 } }, + std::pair{ L"antiquewhite2"sv, til::color{ 238, 223, 204 } }, + std::pair{ L"antiquewhite3"sv, til::color{ 205, 192, 176 } }, + std::pair{ L"antiquewhite4"sv, til::color{ 139, 131, 120 } }, + std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, + std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, + std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, + std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, + std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, + std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, + std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, + std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, + std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, + std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, + std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, + std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, + std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, + std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, + std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, + std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, + std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, + std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, + std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, + std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, + std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, + std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, + std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, + std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, + std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, + std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, + std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ L"azure1"sv, til::color{ 240, 255, 255 } }, + std::pair{ L"azure2"sv, til::color{ 224, 238, 238 } }, + std::pair{ L"azure3"sv, til::color{ 193, 205, 205 } }, + std::pair{ L"azure4"sv, til::color{ 131, 139, 139 } }, + std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, + std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, + std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, + std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, + std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, + std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, + std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, + std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ L"blue1"sv, til::color{ 0, 0, 255 } }, + std::pair{ L"blue2"sv, til::color{ 0, 0, 238 } }, + std::pair{ L"blue3"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"blue4"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, + std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, + std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, + std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, + std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, + std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, + std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, + std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, + std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, + std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, + std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, + std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, + std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, + std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, + std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, + std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, + std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, + std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, + std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, + std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, + std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, + std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, + std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, + std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, + std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, + std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, + std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, + std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, + std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, + std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, + std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, + std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, + std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, + std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, + std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, + std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, + std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ L"cadetblue1"sv, til::color{ 152, 245, 255 } }, + std::pair{ L"cadetblue2"sv, til::color{ 142, 229, 238 } }, + std::pair{ L"cadetblue3"sv, til::color{ 122, 197, 205 } }, + std::pair{ L"cadetblue4"sv, til::color{ 83, 134, 139 } }, + std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, + std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, + std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, + std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, + std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, + std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, + std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, + std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, + std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, + std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, + std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, + std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, + std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, + std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, + std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, + std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, + std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, + std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, + std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, + std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, + std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, + std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, + std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, + std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, + std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, + std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, + std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, + std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ L"chartreuse1"sv, til::color{ 127, 255, 0 } }, + std::pair{ L"chartreuse2"sv, til::color{ 118, 238, 0 } }, + std::pair{ L"chartreuse3"sv, til::color{ 102, 205, 0 } }, + std::pair{ L"chartreuse4"sv, til::color{ 69, 139, 0 } }, + std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, + std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, + std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, + std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, + std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, + std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, + std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, + std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, + std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, + std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, + std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, + std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, + std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, + std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, + std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, + std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, + std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, + std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, + std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, + std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, + std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, + std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, + std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, + std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, + std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, + std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, + std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, + std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, + std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, + std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, + std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, + std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, + std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, + std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, + std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, + std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, + std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, + std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, + std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, + std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, + std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, + std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, + std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, + std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, + std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, + std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, + std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, + std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, + std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, + std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, + std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, + std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, + std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, + std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, + std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ L"chocolate1"sv, til::color{ 255, 127, 36 } }, + std::pair{ L"chocolate2"sv, til::color{ 238, 118, 33 } }, + std::pair{ L"chocolate3"sv, til::color{ 205, 102, 29 } }, + std::pair{ L"chocolate4"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, + std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, + std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, + std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, + std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, + std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, + std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, + std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, + std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, + std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, + std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, + std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, + std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, + std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, + std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, + std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, + std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, + std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, + std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, + std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, + std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, + std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ L"coral1"sv, til::color{ 255, 114, 86 } }, + std::pair{ L"coral2"sv, til::color{ 238, 106, 80 } }, + std::pair{ L"coral3"sv, til::color{ 205, 91, 69 } }, + std::pair{ L"coral4"sv, til::color{ 139, 62, 47 } }, + std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, + std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, + std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, + std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, + std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, + std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, + std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, + std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, + std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, + std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, + std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, + std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, + std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, + std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, + std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, + std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, + std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, + std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, + std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, + std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, + std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, + std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, + std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, + std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, + std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, + std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, + std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, + std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, + std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, + std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, + std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, + std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, + std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, + std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, + std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, + std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, + std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, + std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, + std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, + std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, + std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, + std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, + std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, + std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, + std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, + std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, + std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, + std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, + std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ L"darkorchid1"sv, til::color{ 191, 62, 255 } }, + std::pair{ L"darkorchid2"sv, til::color{ 178, 58, 238 } }, + std::pair{ L"darkorchid3"sv, til::color{ 154, 50, 205 } }, + std::pair{ L"darkorchid4"sv, til::color{ 104, 34, 139 } }, + std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, + std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, + std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, + std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, + std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, + std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, + std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, + std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, + std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, + std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, + std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, + std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, + std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, + std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, + std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, + std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, + std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, + std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, + std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, + std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, + std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, + std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, + std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, + std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, + std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, + std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, + std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, + std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, + std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"gray10"sv, til::color{ 26, 26, 26 } }, + std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, + std::pair{ L"gray11"sv, til::color{ 28, 28, 28 } }, + std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, + std::pair{ L"gray12"sv, til::color{ 31, 31, 31 } }, + std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, + std::pair{ L"gray13"sv, til::color{ 33, 33, 33 } }, + std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, + std::pair{ L"gray14"sv, til::color{ 36, 36, 36 } }, + std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, + std::pair{ L"gray15"sv, til::color{ 38, 38, 38 } }, + std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, + std::pair{ L"gray16"sv, til::color{ 41, 41, 41 } }, + std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, + std::pair{ L"gray17"sv, til::color{ 43, 43, 43 } }, + std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, + std::pair{ L"gray18"sv, til::color{ 46, 46, 46 } }, + std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, + std::pair{ L"gray19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"gray20"sv, til::color{ 51, 51, 51 } }, + std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, + std::pair{ L"gray21"sv, til::color{ 54, 54, 54 } }, + std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, + std::pair{ L"gray22"sv, til::color{ 56, 56, 56 } }, + std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, + std::pair{ L"gray23"sv, til::color{ 59, 59, 59 } }, + std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, + std::pair{ L"gray24"sv, til::color{ 61, 61, 61 } }, + std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, + std::pair{ L"gray25"sv, til::color{ 64, 64, 64 } }, + std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, + std::pair{ L"gray26"sv, til::color{ 66, 66, 66 } }, + std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, + std::pair{ L"gray27"sv, til::color{ 69, 69, 69 } }, + std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, + std::pair{ L"gray28"sv, til::color{ 71, 71, 71 } }, + std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, + std::pair{ L"gray29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"gray30"sv, til::color{ 77, 77, 77 } }, + std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, + std::pair{ L"gray31"sv, til::color{ 79, 79, 79 } }, + std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, + std::pair{ L"gray32"sv, til::color{ 82, 82, 82 } }, + std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, + std::pair{ L"gray33"sv, til::color{ 84, 84, 84 } }, + std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, + std::pair{ L"gray34"sv, til::color{ 87, 87, 87 } }, + std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, + std::pair{ L"gray35"sv, til::color{ 89, 89, 89 } }, + std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, + std::pair{ L"gray36"sv, til::color{ 92, 92, 92 } }, + std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, + std::pair{ L"gray37"sv, til::color{ 94, 94, 94 } }, + std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, + std::pair{ L"gray38"sv, til::color{ 97, 97, 97 } }, + std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, + std::pair{ L"gray39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"gray40"sv, til::color{ 102, 102, 102 } }, + std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, + std::pair{ L"gray41"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"gray42"sv, til::color{ 107, 107, 107 } }, + std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, + std::pair{ L"gray43"sv, til::color{ 110, 110, 110 } }, + std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, + std::pair{ L"gray44"sv, til::color{ 112, 112, 112 } }, + std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, + std::pair{ L"gray45"sv, til::color{ 115, 115, 115 } }, + std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, + std::pair{ L"gray46"sv, til::color{ 117, 117, 117 } }, + std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, + std::pair{ L"gray47"sv, til::color{ 120, 120, 120 } }, + std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, + std::pair{ L"gray48"sv, til::color{ 122, 122, 122 } }, + std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, + std::pair{ L"gray49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"gray50"sv, til::color{ 127, 127, 127 } }, + std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, + std::pair{ L"gray51"sv, til::color{ 130, 130, 130 } }, + std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, + std::pair{ L"gray52"sv, til::color{ 133, 133, 133 } }, + std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, + std::pair{ L"gray53"sv, til::color{ 135, 135, 135 } }, + std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, + std::pair{ L"gray54"sv, til::color{ 138, 138, 138 } }, + std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, + std::pair{ L"gray55"sv, til::color{ 140, 140, 140 } }, + std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, + std::pair{ L"gray56"sv, til::color{ 143, 143, 143 } }, + std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, + std::pair{ L"gray57"sv, til::color{ 145, 145, 145 } }, + std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, + std::pair{ L"gray58"sv, til::color{ 148, 148, 148 } }, + std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, + std::pair{ L"gray59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"gray60"sv, til::color{ 153, 153, 153 } }, + std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, + std::pair{ L"gray61"sv, til::color{ 156, 156, 156 } }, + std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, + std::pair{ L"gray62"sv, til::color{ 158, 158, 158 } }, + std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, + std::pair{ L"gray63"sv, til::color{ 161, 161, 161 } }, + std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, + std::pair{ L"gray64"sv, til::color{ 163, 163, 163 } }, + std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, + std::pair{ L"gray65"sv, til::color{ 166, 166, 166 } }, + std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, + std::pair{ L"gray66"sv, til::color{ 168, 168, 168 } }, + std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, + std::pair{ L"gray67"sv, til::color{ 171, 171, 171 } }, + std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, + std::pair{ L"gray68"sv, til::color{ 173, 173, 173 } }, + std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, + std::pair{ L"gray69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"gray70"sv, til::color{ 179, 179, 179 } }, + std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, + std::pair{ L"gray71"sv, til::color{ 181, 181, 181 } }, + std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, + std::pair{ L"gray72"sv, til::color{ 184, 184, 184 } }, + std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, + std::pair{ L"gray73"sv, til::color{ 186, 186, 186 } }, + std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, + std::pair{ L"gray74"sv, til::color{ 189, 189, 189 } }, + std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, + std::pair{ L"gray75"sv, til::color{ 191, 191, 191 } }, + std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, + std::pair{ L"gray76"sv, til::color{ 194, 194, 194 } }, + std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, + std::pair{ L"gray77"sv, til::color{ 196, 196, 196 } }, + std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, + std::pair{ L"gray78"sv, til::color{ 199, 199, 199 } }, + std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, + std::pair{ L"gray79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"gray80"sv, til::color{ 204, 204, 204 } }, + std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, + std::pair{ L"gray81"sv, til::color{ 207, 207, 207 } }, + std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, + std::pair{ L"gray82"sv, til::color{ 209, 209, 209 } }, + std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, + std::pair{ L"gray83"sv, til::color{ 212, 212, 212 } }, + std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, + std::pair{ L"gray84"sv, til::color{ 214, 214, 214 } }, + std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, + std::pair{ L"gray85"sv, til::color{ 217, 217, 217 } }, + std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, + std::pair{ L"gray86"sv, til::color{ 219, 219, 219 } }, + std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, + std::pair{ L"gray87"sv, til::color{ 222, 222, 222 } }, + std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, + std::pair{ L"gray88"sv, til::color{ 224, 224, 224 } }, + std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, + std::pair{ L"gray89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"gray90"sv, til::color{ 229, 229, 229 } }, + std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, + std::pair{ L"gray91"sv, til::color{ 232, 232, 232 } }, + std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, + std::pair{ L"gray92"sv, til::color{ 235, 235, 235 } }, + std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, + std::pair{ L"gray93"sv, til::color{ 237, 237, 237 } }, + std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, + std::pair{ L"gray94"sv, til::color{ 240, 240, 240 } }, + std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, + std::pair{ L"gray95"sv, til::color{ 242, 242, 242 } }, + std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, + std::pair{ L"gray96"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"gray97"sv, til::color{ 247, 247, 247 } }, + std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, + std::pair{ L"gray98"sv, til::color{ 250, 250, 250 } }, + std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, + std::pair{ L"gray99"sv, til::color{ 252, 252, 252 } }, + std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, + std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"dark grey"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"dark gray"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"dark blue"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"dark cyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"dark magenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"dark red"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"light green"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, + std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, + std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, + std::pair{ L"rebecca purple"sv, til::color{ 102, 51, 153 } }, + std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, + std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, + std::pair{ L"teal"sv, til::color{ 0, 128, 128 } } }; // Function Description: @@ -1170,15 +1169,19 @@ til::color Utils::ColorFromHexString(const std::string_view str) // Arguments: // - str: a string representation of the color name to parse // Return Value: -// - A til::color if the string could successfully be parsed. If the string is not -// in the table, throws runtime_error -til::color Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) +// - True if the string could successfully be parsed. False otherwise. +bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) { - std::string key = ConvertToA(CP_UTF8, wstr); - std::transform(std::begin(key), std::end(key), std::begin(key), [](const std::string::value_type& x) { - return std::tolower(x, std::locale()); - }); - return xorgAppColorTable.at(key); + std::wstring key(wstr); + std::transform(key.begin(), key.end(), key.begin(), std::towlower); + const auto iter = xorgAppColorTable.find(key); + if (iter == xorgAppColorTable.end()) + { + return false; + } + + color = iter->second; + return true; } // Routine Description: From d4e72cb1dfd78cdcc8aa1007f9e527a0711fcc1d Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 12 Sep 2020 10:29:05 +0800 Subject: [PATCH 12/43] Oh really? I have to use LF for it to work? --- .../actions/spell-check/dictionary/colors.txt | 1564 ++++++++--------- src/types/utils.cpp | 2 +- 2 files changed, 783 insertions(+), 783 deletions(-) diff --git a/.github/actions/spell-check/dictionary/colors.txt b/.github/actions/spell-check/dictionary/colors.txt index 71530dd5555..389e1754cd0 100644 --- a/.github/actions/spell-check/dictionary/colors.txt +++ b/.github/actions/spell-check/dictionary/colors.txt @@ -1,782 +1,782 @@ -snow -ghost-white -ghostwhite -white-smoke -whitesmoke -gainsboro -floral-white -floralwhite -old-lace -oldlace -linen -antique-white -antiquewhite -papaya-whip -papayawhip -blanched-almond -blanchedalmond -bisque -peach-puff -peachpuff -navajo-white -navajowhite -moccasin -cornsilk -ivory -lemon-chiffon -lemonchiffon -seashell -honeydew -mint-cream -mintcream -azure -alice-blue -aliceblue -lavender -lavender-blush -lavenderblush -misty-rose -mistyrose -white -black -dark-slate-gray -darkslategray -dark-slate-grey -darkslategrey -dim-gray -dimgray -dim-grey -dimgrey -slate-gray -slategray -slate-grey -slategrey -light-slate-gray -lightslategray -light-slate-grey -lightslategrey -gray -grey -xray -x11gray -xrey -x11grey -web-gray -webgray -web-grey -webgrey -light-grey -lightgrey -light-gray -lightgray -midnight-blue -midnightblue -navy -navy-blue -navyblue -cornflower-blue -cornflowerblue -dark-slate-blue -darkslateblue -slate-blue -slateblue -medium-slate-blue -mediumslateblue -light-slate-blue -lightslateblue -medium-blue -mediumblue -royal-blue -royalblue -blue -dodger-blue -dodgerblue -deep-sky-blue -deepskyblue -sky-blue -skyblue -light-sky-blue -lightskyblue -steel-blue -steelblue -light-steel-blue -lightsteelblue -light-blue -lightblue -powder-blue -powderblue -pale-turquoise -paleturquoise -dark-turquoise -darkturquoise -medium-turquoise -mediumturquoise -turquoise -cyan -aqua -light-cyan -lightcyan -cadet-blue -cadetblue -medium-aquamarine -mediumaquamarine -aquamarine -dark-green -darkgreen -dark-olive-green -darkolivegreen -dark-sea-green -darkseagreen -sea-green -seagreen -medium-sea-green -mediumseagreen -light-sea-green -lightseagreen -pale-green -palegreen -spring-green -springgreen -lawn-green -lawngreen -green -lime -xreen -x11green -web-green -webgreen -chartreuse -medium-spring-green -mediumspringgreen -green-yellow -greenyellow -lime-green -limegreen -yellow-green -yellowgreen -forest-green -forestgreen -olive-drab -olivedrab -dark-khaki -darkkhaki -khaki -pale-goldenrod -palegoldenrod -light-goldenrod-yellow -lightgoldenrodyellow -light-yellow -lightyellow -yellow -gold -light-goldenrod -lightgoldenrod -goldenrod -dark-goldenrod -darkgoldenrod -rosy-brown -rosybrown -indian-red -indianred -saddle-brown -saddlebrown -sienna -peru -burlywood -beige -wheat -sandy-brown -sandybrown -tan -chocolate -firebrick -brown -dark-salmon -darksalmon -salmon -light-salmon -lightsalmon -orange -dark-orange -darkorange -coral -light-coral -lightcoral -tomato -orange-red -orangered -red -hot-pink -hotpink -deep-pink -deeppink -pink -light-pink -lightpink -pale-violet-red -palevioletred -maroon -xaroon -x11maroon -web-maroon -webmaroon -medium-violet-red -mediumvioletred -violet-red -violetred -magenta -fuchsia -violet -plum -orchid -medium-orchid -mediumorchid -dark-orchid -darkorchid -dark-violet -darkviolet -blue-violet -blueviolet -purple -xurple -x11purple -web-purple -webpurple -medium-purple -mediumpurple -thistle -snow1 -snow2 -snow3 -snow4 -seashell1 -seashell2 -seashell3 -seashell4 -antiquewhite1 -antiquewhite2 -antiquewhite3 -antiquewhite4 -bisque1 -bisque2 -bisque3 -bisque4 -peachpuff1 -peachpuff2 -peachpuff3 -peachpuff4 -navajowhite1 -navajowhite2 -navajowhite3 -navajowhite4 -lemonchiffon1 -lemonchiffon2 -lemonchiffon3 -lemonchiffon4 -cornsilk1 -cornsilk2 -cornsilk3 -cornsilk4 -ivory1 -ivory2 -ivory3 -ivory4 -honeydew1 -honeydew2 -honeydew3 -honeydew4 -lavenderblush1 -lavenderblush2 -lavenderblush3 -lavenderblush4 -mistyrose1 -mistyrose2 -mistyrose3 -mistyrose4 -azure1 -azure2 -azure3 -azure4 -slateblue1 -slateblue2 -slateblue3 -slateblue4 -royalblue1 -royalblue2 -royalblue3 -royalblue4 -blue1 -blue2 -blue3 -blue4 -dodgerblue1 -dodgerblue2 -dodgerblue3 -dodgerblue4 -steelblue1 -steelblue2 -steelblue3 -steelblue4 -deepskyblue1 -deepskyblue2 -deepskyblue3 -deepskyblue4 -skyblue1 -skyblue2 -skyblue3 -skyblue4 -lightskyblue1 -lightskyblue2 -lightskyblue3 -lightskyblue4 -slategray1 -slategray2 -slategray3 -slategray4 -lightsteelblue1 -lightsteelblue2 -lightsteelblue3 -lightsteelblue4 -lightblue1 -lightblue2 -lightblue3 -lightblue4 -lightcyan1 -lightcyan2 -lightcyan3 -lightcyan4 -paleturquoise1 -paleturquoise2 -paleturquoise3 -paleturquoise4 -cadetblue1 -cadetblue2 -cadetblue3 -cadetblue4 -turquoise1 -turquoise2 -turquoise3 -turquoise4 -cyan1 -cyan2 -cyan3 -cyan4 -darkslategray1 -darkslategray2 -darkslategray3 -darkslategray4 -aquamarine1 -aquamarine2 -aquamarine3 -aquamarine4 -darkseagreen1 -darkseagreen2 -darkseagreen3 -darkseagreen4 -seagreen1 -seagreen2 -seagreen3 -seagreen4 -palegreen1 -palegreen2 -palegreen3 -palegreen4 -springgreen1 -springgreen2 -springgreen3 -springgreen4 -green1 -green2 -green3 -green4 -chartreuse1 -chartreuse2 -chartreuse3 -chartreuse4 -olivedrab1 -olivedrab2 -olivedrab3 -olivedrab4 -darkolivegreen1 -darkolivegreen2 -darkolivegreen3 -darkolivegreen4 -khaki1 -khaki2 -khaki3 -khaki4 -lightgoldenrod1 -lightgoldenrod2 -lightgoldenrod3 -lightgoldenrod4 -lightyellow1 -lightyellow2 -lightyellow3 -lightyellow4 -yellow1 -yellow2 -yellow3 -yellow4 -gold1 -gold2 -gold3 -gold4 -goldenrod1 -goldenrod2 -goldenrod3 -goldenrod4 -darkgoldenrod1 -darkgoldenrod2 -darkgoldenrod3 -darkgoldenrod4 -rosybrown1 -rosybrown2 -rosybrown3 -rosybrown4 -indianred1 -indianred2 -indianred3 -indianred4 -sienna1 -sienna2 -sienna3 -sienna4 -burlywood1 -burlywood2 -burlywood3 -burlywood4 -wheat1 -wheat2 -wheat3 -wheat4 -tan1 -tan2 -tan3 -tan4 -chocolate1 -chocolate2 -chocolate3 -chocolate4 -firebrick1 -firebrick2 -firebrick3 -firebrick4 -brown1 -brown2 -brown3 -brown4 -salmon1 -salmon2 -salmon3 -salmon4 -lightsalmon1 -lightsalmon2 -lightsalmon3 -lightsalmon4 -orange1 -orange2 -orange3 -orange4 -darkorange1 -darkorange2 -darkorange3 -darkorange4 -coral1 -coral2 -coral3 -coral4 -tomato1 -tomato2 -tomato3 -tomato4 -orangered1 -orangered2 -orangered3 -orangered4 -red1 -red2 -red3 -red4 -deeppink1 -deeppink2 -deeppink3 -deeppink4 -hotpink1 -hotpink2 -hotpink3 -hotpink4 -pink1 -pink2 -pink3 -pink4 -lightpink1 -lightpink2 -lightpink3 -lightpink4 -palevioletred1 -palevioletred2 -palevioletred3 -palevioletred4 -maroon1 -maroon2 -maroon3 -maroon4 -violetred1 -violetred2 -violetred3 -violetred4 -magenta1 -magenta2 -magenta3 -magenta4 -orchid1 -orchid2 -orchid3 -orchid4 -plum1 -plum2 -plum3 -plum4 -mediumorchid1 -mediumorchid2 -mediumorchid3 -mediumorchid4 -darkorchid1 -darkorchid2 -darkorchid3 -darkorchid4 -purple1 -purple2 -purple3 -purple4 -mediumpurple1 -mediumpurple2 -mediumpurple3 -mediumpurple4 -thistle1 -thistle2 -thistle3 -thistle4 -gray0 -grey0 -gray1 -grey1 -gray2 -grey2 -gray3 -grey3 -gray4 -grey4 -gray5 -grey5 -gray6 -grey6 -gray7 -grey7 -gray8 -grey8 -gray9 -grey9 -gray10 -grey10 -gray11 -grey11 -gray12 -grey12 -gray13 -grey13 -gray14 -grey14 -gray15 -grey15 -gray16 -grey16 -gray17 -grey17 -gray18 -grey18 -gray19 -grey19 -gray20 -grey20 -gray21 -grey21 -gray22 -grey22 -gray23 -grey23 -gray24 -grey24 -gray25 -grey25 -gray26 -grey26 -gray27 -grey27 -gray28 -grey28 -gray29 -grey29 -gray30 -grey30 -gray31 -grey31 -gray32 -grey32 -gray33 -grey33 -gray34 -grey34 -gray35 -grey35 -gray36 -grey36 -gray37 -grey37 -gray38 -grey38 -gray39 -grey39 -gray40 -grey40 -gray41 -grey41 -gray42 -grey42 -gray43 -grey43 -gray44 -grey44 -gray45 -grey45 -gray46 -grey46 -gray47 -grey47 -gray48 -grey48 -gray49 -grey49 -gray50 -grey50 -gray51 -grey51 -gray52 -grey52 -gray53 -grey53 -gray54 -grey54 -gray55 -grey55 -gray56 -grey56 -gray57 -grey57 -gray58 -grey58 -gray59 -grey59 -gray60 -grey60 -gray61 -grey61 -gray62 -grey62 -gray63 -grey63 -gray64 -grey64 -gray65 -grey65 -gray66 -grey66 -gray67 -grey67 -gray68 -grey68 -gray69 -grey69 -gray70 -grey70 -gray71 -grey71 -gray72 -grey72 -gray73 -grey73 -gray74 -grey74 -gray75 -grey75 -gray76 -grey76 -gray77 -grey77 -gray78 -grey78 -gray79 -grey79 -gray80 -grey80 -gray81 -grey81 -gray82 -grey82 -gray83 -grey83 -gray84 -grey84 -gray85 -grey85 -gray86 -grey86 -gray87 -grey87 -gray88 -grey88 -gray89 -grey89 -gray90 -grey90 -gray91 -grey91 -gray92 -grey92 -gray93 -grey93 -gray94 -grey94 -gray95 -grey95 -gray96 -grey96 -gray97 -grey97 -gray98 -grey98 -gray99 -grey99 -gray100 -grey100 -dark-grey -darkgrey -dark-gray -darkgray -dark-blue -darkblue -dark-cyan -darkcyan -dark-magenta -darkmagenta -dark-red -darkred -light-green -lightgreen -crimson -indigo -olive -rebecca-purple -rebeccapurple -silver -teal +snow +ghost-white +ghostwhite +white-smoke +whitesmoke +gainsboro +floral-white +floralwhite +old-lace +oldlace +linen +antique-white +antiquewhite +papaya-whip +papayawhip +blanched-almond +blanchedalmond +bisque +peach-puff +peachpuff +navajo-white +navajowhite +moccasin +cornsilk +ivory +lemon-chiffon +lemonchiffon +seashell +honeydew +mint-cream +mintcream +azure +alice-blue +aliceblue +lavender +lavender-blush +lavenderblush +misty-rose +mistyrose +white +black +dark-slate-gray +darkslategray +dark-slate-grey +darkslategrey +dim-gray +dimgray +dim-grey +dimgrey +slate-gray +slategray +slate-grey +slategrey +light-slate-gray +lightslategray +light-slate-grey +lightslategrey +gray +grey +xray +x11gray +xrey +x11grey +web-gray +webgray +web-grey +webgrey +light-grey +lightgrey +light-gray +lightgray +midnight-blue +midnightblue +navy +navy-blue +navyblue +cornflower-blue +cornflowerblue +dark-slate-blue +darkslateblue +slate-blue +slateblue +medium-slate-blue +mediumslateblue +light-slate-blue +lightslateblue +medium-blue +mediumblue +royal-blue +royalblue +blue +dodger-blue +dodgerblue +deep-sky-blue +deepskyblue +sky-blue +skyblue +light-sky-blue +lightskyblue +steel-blue +steelblue +light-steel-blue +lightsteelblue +light-blue +lightblue +powder-blue +powderblue +pale-turquoise +paleturquoise +dark-turquoise +darkturquoise +medium-turquoise +mediumturquoise +turquoise +cyan +aqua +light-cyan +lightcyan +cadet-blue +cadetblue +medium-aquamarine +mediumaquamarine +aquamarine +dark-green +darkgreen +dark-olive-green +darkolivegreen +dark-sea-green +darkseagreen +sea-green +seagreen +medium-sea-green +mediumseagreen +light-sea-green +lightseagreen +pale-green +palegreen +spring-green +springgreen +lawn-green +lawngreen +green +lime +xreen +x11green +web-green +webgreen +chartreuse +medium-spring-green +mediumspringgreen +green-yellow +greenyellow +lime-green +limegreen +yellow-green +yellowgreen +forest-green +forestgreen +olive-drab +olivedrab +dark-khaki +darkkhaki +khaki +pale-goldenrod +palegoldenrod +light-goldenrod-yellow +lightgoldenrodyellow +light-yellow +lightyellow +yellow +gold +light-goldenrod +lightgoldenrod +goldenrod +dark-goldenrod +darkgoldenrod +rosy-brown +rosybrown +indian-red +indianred +saddle-brown +saddlebrown +sienna +peru +burlywood +beige +wheat +sandy-brown +sandybrown +tan +chocolate +firebrick +brown +dark-salmon +darksalmon +salmon +light-salmon +lightsalmon +orange +dark-orange +darkorange +coral +light-coral +lightcoral +tomato +orange-red +orangered +red +hot-pink +hotpink +deep-pink +deeppink +pink +light-pink +lightpink +pale-violet-red +palevioletred +maroon +xaroon +x11maroon +web-maroon +webmaroon +medium-violet-red +mediumvioletred +violet-red +violetred +magenta +fuchsia +violet +plum +orchid +medium-orchid +mediumorchid +dark-orchid +darkorchid +dark-violet +darkviolet +blue-violet +blueviolet +purple +xurple +x11purple +web-purple +webpurple +medium-purple +mediumpurple +thistle +snow1 +snow2 +snow3 +snow4 +seashell1 +seashell2 +seashell3 +seashell4 +antiquewhite1 +antiquewhite2 +antiquewhite3 +antiquewhite4 +bisque1 +bisque2 +bisque3 +bisque4 +peachpuff1 +peachpuff2 +peachpuff3 +peachpuff4 +navajowhite1 +navajowhite2 +navajowhite3 +navajowhite4 +lemonchiffon1 +lemonchiffon2 +lemonchiffon3 +lemonchiffon4 +cornsilk1 +cornsilk2 +cornsilk3 +cornsilk4 +ivory1 +ivory2 +ivory3 +ivory4 +honeydew1 +honeydew2 +honeydew3 +honeydew4 +lavenderblush1 +lavenderblush2 +lavenderblush3 +lavenderblush4 +mistyrose1 +mistyrose2 +mistyrose3 +mistyrose4 +azure1 +azure2 +azure3 +azure4 +slateblue1 +slateblue2 +slateblue3 +slateblue4 +royalblue1 +royalblue2 +royalblue3 +royalblue4 +blue1 +blue2 +blue3 +blue4 +dodgerblue1 +dodgerblue2 +dodgerblue3 +dodgerblue4 +steelblue1 +steelblue2 +steelblue3 +steelblue4 +deepskyblue1 +deepskyblue2 +deepskyblue3 +deepskyblue4 +skyblue1 +skyblue2 +skyblue3 +skyblue4 +lightskyblue1 +lightskyblue2 +lightskyblue3 +lightskyblue4 +slategray1 +slategray2 +slategray3 +slategray4 +lightsteelblue1 +lightsteelblue2 +lightsteelblue3 +lightsteelblue4 +lightblue1 +lightblue2 +lightblue3 +lightblue4 +lightcyan1 +lightcyan2 +lightcyan3 +lightcyan4 +paleturquoise1 +paleturquoise2 +paleturquoise3 +paleturquoise4 +cadetblue1 +cadetblue2 +cadetblue3 +cadetblue4 +turquoise1 +turquoise2 +turquoise3 +turquoise4 +cyan1 +cyan2 +cyan3 +cyan4 +darkslategray1 +darkslategray2 +darkslategray3 +darkslategray4 +aquamarine1 +aquamarine2 +aquamarine3 +aquamarine4 +darkseagreen1 +darkseagreen2 +darkseagreen3 +darkseagreen4 +seagreen1 +seagreen2 +seagreen3 +seagreen4 +palegreen1 +palegreen2 +palegreen3 +palegreen4 +springgreen1 +springgreen2 +springgreen3 +springgreen4 +green1 +green2 +green3 +green4 +chartreuse1 +chartreuse2 +chartreuse3 +chartreuse4 +olivedrab1 +olivedrab2 +olivedrab3 +olivedrab4 +darkolivegreen1 +darkolivegreen2 +darkolivegreen3 +darkolivegreen4 +khaki1 +khaki2 +khaki3 +khaki4 +lightgoldenrod1 +lightgoldenrod2 +lightgoldenrod3 +lightgoldenrod4 +lightyellow1 +lightyellow2 +lightyellow3 +lightyellow4 +yellow1 +yellow2 +yellow3 +yellow4 +gold1 +gold2 +gold3 +gold4 +goldenrod1 +goldenrod2 +goldenrod3 +goldenrod4 +darkgoldenrod1 +darkgoldenrod2 +darkgoldenrod3 +darkgoldenrod4 +rosybrown1 +rosybrown2 +rosybrown3 +rosybrown4 +indianred1 +indianred2 +indianred3 +indianred4 +sienna1 +sienna2 +sienna3 +sienna4 +burlywood1 +burlywood2 +burlywood3 +burlywood4 +wheat1 +wheat2 +wheat3 +wheat4 +tan1 +tan2 +tan3 +tan4 +chocolate1 +chocolate2 +chocolate3 +chocolate4 +firebrick1 +firebrick2 +firebrick3 +firebrick4 +brown1 +brown2 +brown3 +brown4 +salmon1 +salmon2 +salmon3 +salmon4 +lightsalmon1 +lightsalmon2 +lightsalmon3 +lightsalmon4 +orange1 +orange2 +orange3 +orange4 +darkorange1 +darkorange2 +darkorange3 +darkorange4 +coral1 +coral2 +coral3 +coral4 +tomato1 +tomato2 +tomato3 +tomato4 +orangered1 +orangered2 +orangered3 +orangered4 +red1 +red2 +red3 +red4 +deeppink1 +deeppink2 +deeppink3 +deeppink4 +hotpink1 +hotpink2 +hotpink3 +hotpink4 +pink1 +pink2 +pink3 +pink4 +lightpink1 +lightpink2 +lightpink3 +lightpink4 +palevioletred1 +palevioletred2 +palevioletred3 +palevioletred4 +maroon1 +maroon2 +maroon3 +maroon4 +violetred1 +violetred2 +violetred3 +violetred4 +magenta1 +magenta2 +magenta3 +magenta4 +orchid1 +orchid2 +orchid3 +orchid4 +plum1 +plum2 +plum3 +plum4 +mediumorchid1 +mediumorchid2 +mediumorchid3 +mediumorchid4 +darkorchid1 +darkorchid2 +darkorchid3 +darkorchid4 +purple1 +purple2 +purple3 +purple4 +mediumpurple1 +mediumpurple2 +mediumpurple3 +mediumpurple4 +thistle1 +thistle2 +thistle3 +thistle4 +gray0 +grey0 +gray1 +grey1 +gray2 +grey2 +gray3 +grey3 +gray4 +grey4 +gray5 +grey5 +gray6 +grey6 +gray7 +grey7 +gray8 +grey8 +gray9 +grey9 +gray10 +grey10 +gray11 +grey11 +gray12 +grey12 +gray13 +grey13 +gray14 +grey14 +gray15 +grey15 +gray16 +grey16 +gray17 +grey17 +gray18 +grey18 +gray19 +grey19 +gray20 +grey20 +gray21 +grey21 +gray22 +grey22 +gray23 +grey23 +gray24 +grey24 +gray25 +grey25 +gray26 +grey26 +gray27 +grey27 +gray28 +grey28 +gray29 +grey29 +gray30 +grey30 +gray31 +grey31 +gray32 +grey32 +gray33 +grey33 +gray34 +grey34 +gray35 +grey35 +gray36 +grey36 +gray37 +grey37 +gray38 +grey38 +gray39 +grey39 +gray40 +grey40 +gray41 +grey41 +gray42 +grey42 +gray43 +grey43 +gray44 +grey44 +gray45 +grey45 +gray46 +grey46 +gray47 +grey47 +gray48 +grey48 +gray49 +grey49 +gray50 +grey50 +gray51 +grey51 +gray52 +grey52 +gray53 +grey53 +gray54 +grey54 +gray55 +grey55 +gray56 +grey56 +gray57 +grey57 +gray58 +grey58 +gray59 +grey59 +gray60 +grey60 +gray61 +grey61 +gray62 +grey62 +gray63 +grey63 +gray64 +grey64 +gray65 +grey65 +gray66 +grey66 +gray67 +grey67 +gray68 +grey68 +gray69 +grey69 +gray70 +grey70 +gray71 +grey71 +gray72 +grey72 +gray73 +grey73 +gray74 +grey74 +gray75 +grey75 +gray76 +grey76 +gray77 +grey77 +gray78 +grey78 +gray79 +grey79 +gray80 +grey80 +gray81 +grey81 +gray82 +grey82 +gray83 +grey83 +gray84 +grey84 +gray85 +grey85 +gray86 +grey86 +gray87 +grey87 +gray88 +grey88 +gray89 +grey89 +gray90 +grey90 +gray91 +grey91 +gray92 +grey92 +gray93 +grey93 +gray94 +grey94 +gray95 +grey95 +gray96 +grey96 +gray97 +grey97 +gray98 +grey98 +gray99 +grey99 +gray100 +grey100 +dark-grey +darkgrey +dark-gray +darkgray +dark-blue +darkblue +dark-cyan +darkcyan +dark-magenta +darkmagenta +dark-red +darkred +light-green +lightgreen +crimson +indigo +olive +rebecca-purple +rebeccapurple +silver +teal diff --git a/src/types/utils.cpp b/src/types/utils.cpp index fafa1324c02..995016ae6f5 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -286,7 +286,7 @@ static constexpr std::array standardXterm256ColorTable{ til::color{ 0xEE, 0xEE, 0xEE }, }; -static til::static_map xorgAppColorTable { +static til::static_map xorgAppColorTable{ std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, std::pair{ L"ghost white"sv, til::color{ 248, 248, 255 } }, std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, From 3b9142d38e2815a4e120b8a5af7b2f0efae8f0f9 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sun, 13 Sep 2020 07:08:09 +0800 Subject: [PATCH 13/43] Restore the other spell check files --- .github/actions/spell-check/dictionary/dictionary.txt | 3 --- .github/actions/spell-check/dictionary/names.txt | 1 - 2 files changed, 4 deletions(-) diff --git a/.github/actions/spell-check/dictionary/dictionary.txt b/.github/actions/spell-check/dictionary/dictionary.txt index 4de8ac932c4..7344a626ea2 100644 --- a/.github/actions/spell-check/dictionary/dictionary.txt +++ b/.github/actions/spell-check/dictionary/dictionary.txt @@ -55872,7 +55872,6 @@ burly burly-boned burly-faced burly-headed -burlywood Burma burma Burman @@ -87386,7 +87385,6 @@ cornrows corns cornsack corn-salad -cornsilk corn-snake Cornstalk corn-stalk @@ -154292,7 +154290,6 @@ gainsayer gainsayers gainsaying gainsays -gainsboro Gainsborough gainset gainsome diff --git a/.github/actions/spell-check/dictionary/names.txt b/.github/actions/spell-check/dictionary/names.txt index 7b524299c78..c7f4c1f2b15 100644 --- a/.github/actions/spell-check/dictionary/names.txt +++ b/.github/actions/spell-check/dictionary/names.txt @@ -44,7 +44,6 @@ pauldotknopf PGP Pham Rincewind -rebecca rprichard Schoonover Somuah From 5c933f4a1694ac65ecadb1808474e794b9dfa82b Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sun, 13 Sep 2020 07:34:13 +0800 Subject: [PATCH 14/43] Fix color table crash & add tests --- .../parser/OutputStateMachineEngine.cpp | 13 +++------ .../parser/OutputStateMachineEngine.hpp | 4 +-- .../parser/ut_parser/OutputEngineTest.cpp | 29 +++++++++++++++++++ 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index a59ab7a23f8..31ac34a52dc 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -746,7 +746,7 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, success = _GetOscTitle(string, title); break; case OscActionCodes::SetColor: - success = _GetOscSetColorTable(string, tableIndex, color); + success = s_GetOscSetColorTable(string, tableIndex, color); break; case OscActionCodes::SetForegroundColor: case OscActionCodes::SetBackgroundColor: @@ -1512,11 +1512,6 @@ try { const wchar_t wch = *curr++; - if (!_isHexNumber(wch)) - { - return false; - } - parameterValue *= 16; unsigned int intVal = 0; const auto ret = s_HexToUint(wch, intVal); @@ -1611,9 +1606,9 @@ CATCH_LOG_RETURN_FALSE() // - rgb - receives the color that we parsed in the format: 0x00BBGGRR // Return Value: // - True if a table index and color was parsed successfully. False otherwise. -bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view string, +bool OutputStateMachineEngine::s_GetOscSetColorTable(const std::wstring_view string, size_t& tableIndex, - DWORD& rgb) const noexcept + DWORD& rgb) noexcept { tableIndex = 0; rgb = 0; @@ -1624,7 +1619,7 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri // First try to get the table index, a number between [0,256] size_t current = 0; - for (size_t i = 0; i < 4; i++) + for (size_t i = 0; i < string.size(); i++) { const wchar_t wch = string.at(current); if (_isNumber(wch)) diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 770ad61020b..0dcdc9d7c98 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -229,9 +229,9 @@ namespace Microsoft::Console::VirtualTerminal static bool s_HexToUint(const wchar_t wch, unsigned int& value) noexcept; - bool _GetOscSetColorTable(const std::wstring_view string, + static bool s_GetOscSetColorTable(const std::wstring_view string, size_t& tableIndex, - DWORD& rgb) const noexcept; + DWORD& rgb) noexcept; static bool s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept; diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 96d4be8b8dc..61f58363405 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -700,6 +700,35 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"123456", color)); } + TEST_METHOD(TestOscColorTableIndex) + { + size_t tableIndex = 0; + DWORD color = 0; + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0;rgb:1/1/1", tableIndex, color)); + VERIFY_ARE_EQUAL(tableIndex, 0); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"16;rgb:11/11/11", tableIndex, color)); + VERIFY_ARE_EQUAL(tableIndex, 16); + VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"64;#111", tableIndex, color)); + VERIFY_ARE_EQUAL(tableIndex, 64); + VERIFY_ARE_EQUAL(color, RGB(0x10, 0x10, 0x10)); + + VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"128;orange", tableIndex, color)); + VERIFY_ARE_EQUAL(tableIndex, 128); + VERIFY_ARE_EQUAL(color, RGB(255, 165, 0)); + + // Invalid sequences. + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;111", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;rgb:", tableIndex, color)); + } + TEST_METHOD(TestDcsEntry) { auto dispatch = std::make_unique(); From 6bc65096197ae4c1427c810bdd4aca1d7d74135b Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sun, 13 Sep 2020 07:40:26 +0800 Subject: [PATCH 15/43] Strip all whitespace when looking up xorg color name --- src/types/utils.cpp | 107 +------------------------------------------- 1 file changed, 1 insertion(+), 106 deletions(-) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 995016ae6f5..714c1a25c3b 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -288,250 +288,152 @@ static constexpr std::array standardXterm256ColorTable{ static til::static_map xorgAppColorTable{ std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"ghost white"sv, til::color{ 248, 248, 255 } }, std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, - std::pair{ L"white smoke"sv, til::color{ 245, 245, 245 } }, std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, - std::pair{ L"floral white"sv, til::color{ 255, 250, 240 } }, std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, - std::pair{ L"old lace"sv, til::color{ 253, 245, 230 } }, std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, - std::pair{ L"antique white"sv, til::color{ 250, 235, 215 } }, std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, - std::pair{ L"papaya whip"sv, til::color{ 255, 239, 213 } }, std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, - std::pair{ L"blanched almond"sv, til::color{ 255, 235, 205 } }, std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"peach puff"sv, til::color{ 255, 218, 185 } }, std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"navajo white"sv, til::color{ 255, 222, 173 } }, std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"lemon chiffon"sv, til::color{ 255, 250, 205 } }, std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"mint cream"sv, til::color{ 245, 255, 250 } }, std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, - std::pair{ L"alice blue"sv, til::color{ 240, 248, 255 } }, std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, - std::pair{ L"lavender blush"sv, til::color{ 255, 240, 245 } }, std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"misty rose"sv, til::color{ 255, 228, 225 } }, std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"dark slate gray"sv, til::color{ 47, 79, 79 } }, std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"dark slate grey"sv, til::color{ 47, 79, 79 } }, std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"dim gray"sv, til::color{ 105, 105, 105 } }, std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"dim grey"sv, til::color{ 105, 105, 105 } }, std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"slate gray"sv, til::color{ 112, 128, 144 } }, std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"slate grey"sv, til::color{ 112, 128, 144 } }, std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"light slate gray"sv, til::color{ 119, 136, 153 } }, std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"light slate grey"sv, til::color{ 119, 136, 153 } }, std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11 gray"sv, til::color{ 190, 190, 190 } }, std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11 grey"sv, til::color{ 190, 190, 190 } }, std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"web gray"sv, til::color{ 128, 128, 128 } }, std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"web grey"sv, til::color{ 128, 128, 128 } }, std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"light grey"sv, til::color{ 211, 211, 211 } }, std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"light gray"sv, til::color{ 211, 211, 211 } }, std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"midnight blue"sv, til::color{ 25, 25, 112 } }, std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"navy blue"sv, til::color{ 0, 0, 128 } }, std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"cornflower blue"sv, til::color{ 100, 149, 237 } }, std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, - std::pair{ L"dark slate blue"sv, til::color{ 72, 61, 139 } }, std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, - std::pair{ L"slate blue"sv, til::color{ 106, 90, 205 } }, std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, - std::pair{ L"medium slate blue"sv, til::color{ 123, 104, 238 } }, std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, - std::pair{ L"light slate blue"sv, til::color{ 132, 112, 255 } }, std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, - std::pair{ L"medium blue"sv, til::color{ 0, 0, 205 } }, std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"royal blue"sv, til::color{ 65, 105, 225 } }, std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"dodger blue"sv, til::color{ 30, 144, 255 } }, std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"deep sky blue"sv, til::color{ 0, 191, 255 } }, std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"sky blue"sv, til::color{ 135, 206, 235 } }, std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, - std::pair{ L"light sky blue"sv, til::color{ 135, 206, 250 } }, std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, - std::pair{ L"steel blue"sv, til::color{ 70, 130, 180 } }, std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, - std::pair{ L"light steel blue"sv, til::color{ 176, 196, 222 } }, std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, - std::pair{ L"light blue"sv, til::color{ 173, 216, 230 } }, std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, - std::pair{ L"powder blue"sv, til::color{ 176, 224, 230 } }, std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, - std::pair{ L"pale turquoise"sv, til::color{ 175, 238, 238 } }, std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ L"dark turquoise"sv, til::color{ 0, 206, 209 } }, std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ L"medium turquoise"sv, til::color{ 72, 209, 204 } }, std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"light cyan"sv, til::color{ 224, 255, 255 } }, std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"cadet blue"sv, til::color{ 95, 158, 160 } }, std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, - std::pair{ L"medium aquamarine"sv, til::color{ 102, 205, 170 } }, std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"dark green"sv, til::color{ 0, 100, 0 } }, std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, - std::pair{ L"dark olive green"sv, til::color{ 85, 107, 47 } }, std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, - std::pair{ L"dark sea green"sv, til::color{ 143, 188, 143 } }, std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, - std::pair{ L"sea green"sv, til::color{ 46, 139, 87 } }, std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"medium sea green"sv, til::color{ 60, 179, 113 } }, std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, - std::pair{ L"light sea green"sv, til::color{ 32, 178, 170 } }, std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, - std::pair{ L"pale green"sv, til::color{ 152, 251, 152 } }, std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, - std::pair{ L"spring green"sv, til::color{ 0, 255, 127 } }, std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"lawn green"sv, til::color{ 124, 252, 0 } }, std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"x11 green"sv, til::color{ 0, 255, 0 } }, std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"web green"sv, til::color{ 0, 128, 0 } }, std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"medium spring green"sv, til::color{ 0, 250, 154 } }, std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, - std::pair{ L"green yellow"sv, til::color{ 173, 255, 47 } }, std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ L"lime green"sv, til::color{ 50, 205, 50 } }, std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, - std::pair{ L"yellow green"sv, til::color{ 154, 205, 50 } }, std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"forest green"sv, til::color{ 34, 139, 34 } }, std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, - std::pair{ L"olive drab"sv, til::color{ 107, 142, 35 } }, std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, - std::pair{ L"dark khaki"sv, til::color{ 189, 183, 107 } }, std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, - std::pair{ L"pale goldenrod"sv, til::color{ 238, 232, 170 } }, std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ L"light goldenrod yellow"sv, til::color{ 250, 250, 210 } }, std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ L"light yellow"sv, til::color{ 255, 255, 224 } }, std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"light goldenrod"sv, til::color{ 238, 221, 130 } }, std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, - std::pair{ L"dark goldenrod"sv, til::color{ 184, 134, 11 } }, std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ L"rosy brown"sv, til::color{ 188, 143, 143 } }, std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, - std::pair{ L"indian red"sv, til::color{ 205, 92, 92 } }, std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, - std::pair{ L"saddle brown"sv, til::color{ 139, 69, 19 } }, std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, - std::pair{ L"sandy brown"sv, til::color{ 244, 164, 96 } }, std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, - std::pair{ L"dark salmon"sv, til::color{ 233, 150, 122 } }, std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, - std::pair{ L"light salmon"sv, til::color{ 255, 160, 122 } }, std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"dark orange"sv, til::color{ 255, 140, 0 } }, std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, - std::pair{ L"light coral"sv, til::color{ 240, 128, 128 } }, std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"orange red"sv, til::color{ 255, 69, 0 } }, std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"hot pink"sv, til::color{ 255, 105, 180 } }, std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, - std::pair{ L"deep pink"sv, til::color{ 255, 20, 147 } }, std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, - std::pair{ L"light pink"sv, til::color{ 255, 182, 193 } }, std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, - std::pair{ L"pale violet red"sv, til::color{ 219, 112, 147 } }, std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"x11 maroon"sv, til::color{ 176, 48, 96 } }, std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"web maroon"sv, til::color{ 128, 0, 0 } }, std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ L"medium violet red"sv, til::color{ 199, 21, 133 } }, std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, - std::pair{ L"violet red"sv, til::color{ 208, 32, 144 } }, std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, - std::pair{ L"medium orchid"sv, til::color{ 186, 85, 211 } }, std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ L"dark orchid"sv, til::color{ 153, 50, 204 } }, std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ L"dark violet"sv, til::color{ 148, 0, 211 } }, std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, - std::pair{ L"blue violet"sv, til::color{ 138, 43, 226 } }, std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"x11 purple"sv, til::color{ 160, 32, 240 } }, std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"web purple"sv, til::color{ 128, 0, 128 } }, std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, - std::pair{ L"medium purple"sv, til::color{ 147, 112, 219 } }, std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, @@ -1048,24 +950,16 @@ static til::static_map xorgAppColorTable{ std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"dark grey"sv, til::color{ 169, 169, 169 } }, std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"dark gray"sv, til::color{ 169, 169, 169 } }, std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"dark blue"sv, til::color{ 0, 0, 139 } }, std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"dark cyan"sv, til::color{ 0, 139, 139 } }, std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"dark magenta"sv, til::color{ 139, 0, 139 } }, std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"dark red"sv, til::color{ 139, 0, 0 } }, std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"light green"sv, til::color{ 144, 238, 144 } }, std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, - std::pair{ L"rebecca purple"sv, til::color{ 102, 51, 153 } }, std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, std::pair{ L"teal"sv, til::color{ 0, 128, 128 } } @@ -1174,6 +1068,7 @@ bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& { std::wstring key(wstr); std::transform(key.begin(), key.end(), key.begin(), std::towlower); + key.erase(std::remove_if(key.begin(), key.end(), std::iswspace), key.end()); const auto iter = xorgAppColorTable.find(key); if (iter == xorgAppColorTable.end()) { From e827110f65d22908b5f3eb2e25c7ed3e64b43a24 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sun, 13 Sep 2020 08:01:22 +0800 Subject: [PATCH 16/43] Style check & audit --- src/inc/til/static_map.h | 2 +- src/terminal/parser/OutputStateMachineEngine.cpp | 4 ++-- src/terminal/parser/OutputStateMachineEngine.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/inc/til/static_map.h b/src/inc/til/static_map.h index 1a82ac6ff51..1837111f7b3 100644 --- a/src/inc/til/static_map.h +++ b/src/inc/til/static_map.h @@ -17,7 +17,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned" using const_iterator = typename std::array, N>::const_iterator; template - constexpr explicit static_map(const Args&... args) : + constexpr explicit static_map(const Args&... args) noexcept : _predicate{}, _array{ { args... } } { diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 31ac34a52dc..34b258067bc 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1607,8 +1607,8 @@ CATCH_LOG_RETURN_FALSE() // Return Value: // - True if a table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::s_GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) noexcept + size_t& tableIndex, + DWORD& rgb) noexcept { tableIndex = 0; rgb = 0; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 0dcdc9d7c98..2d10a86e3ec 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -230,8 +230,8 @@ namespace Microsoft::Console::VirtualTerminal static bool s_HexToUint(const wchar_t wch, unsigned int& value) noexcept; static bool s_GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) noexcept; + size_t& tableIndex, + DWORD& rgb) noexcept; static bool s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept; From db5b2bfed6d56b7824c07d57c7c48afe0667ce8f Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sun, 13 Sep 2020 08:44:03 +0800 Subject: [PATCH 17/43] So I need this? --- src/terminal/parser/ut_parser/OutputEngineTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 61f58363405..5b49c373f60 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -706,19 +706,19 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final DWORD color = 0; VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0;rgb:1/1/1", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 0); + VERIFY_ARE_EQUAL(tableIndex, 0u); VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"16;rgb:11/11/11", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 16); + VERIFY_ARE_EQUAL(tableIndex, 16u); VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"64;#111", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 64); + VERIFY_ARE_EQUAL(tableIndex, 64u); VERIFY_ARE_EQUAL(color, RGB(0x10, 0x10, 0x10)); VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"128;orange", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 128); + VERIFY_ARE_EQUAL(tableIndex, 128u); VERIFY_ARE_EQUAL(color, RGB(255, 165, 0)); // Invalid sequences. From 3c6b42bb3302181be8eb4421c10dbcc0132083de Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Mon, 14 Sep 2020 12:29:09 +0800 Subject: [PATCH 18/43] Resolve comments --- src/terminal/parser/OutputStateMachineEngine.cpp | 10 +++++----- src/terminal/parser/ut_parser/OutputEngineTest.cpp | 5 +++++ src/types/utils.cpp | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 34b258067bc..d19204841e0 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1444,13 +1444,13 @@ try std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); if (prefix.compare(L"rgb:") == 0) { - // We can have one of the following formats: + // If all the components have the same digit count, we can have one of the following formats: // 9 "rgb:h/h/h" // 12 "rgb:hh/hh/hh" // 15 "rgb:hhh/hhh/hhh" // 18 "rgb:hhhh/hhhh/hhhh" - // Any fewer cannot be valid, and any more will be too many. - // Return early in this case. + // Anything in between these is also valid, e.g. "rgb:h/hh/h" and "rgb:h/hh/hhh". + // Any fewer cannot be valid, and any more will be too many. Return early in this case. if (stringSize < 9 || stringSize > 18) { return false; @@ -1619,7 +1619,7 @@ bool OutputStateMachineEngine::s_GetOscSetColorTable(const std::wstring_view str // First try to get the table index, a number between [0,256] size_t current = 0; - for (size_t i = 0; i < string.size(); i++) + while (current < string.size()) { const wchar_t wch = string.at(current); if (_isNumber(wch)) @@ -1629,7 +1629,7 @@ bool OutputStateMachineEngine::s_GetOscSetColorTable(const std::wstring_view str ++current; } - else if (wch == L';' && i > 0) + else if (wch == L';' && current > 0) { // We need to explicitly pass in a number, we can't default to 0 if // there's no param diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 5b49c373f60..80dd41f9b83 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -723,6 +723,11 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final // Invalid sequences. VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";;", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";0", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";111", tableIndex, color)); + VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";#111", tableIndex, color)); VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0", tableIndex, color)); VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;", tableIndex, color)); VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;111", tableIndex, color)); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 714c1a25c3b..b8c63e3e6d3 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -1062,8 +1062,9 @@ til::color Utils::ColorFromHexString(const std::string_view str) // - Parses a color from a string based on the XOrg app color name table. // Arguments: // - str: a string representation of the color name to parse +// - color: a color to write the result to // Return Value: -// - True if the string could successfully be parsed. False otherwise. +// - True if the string is successfully parsed. False otherwise. bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) { std::wstring key(wstr); From a0f7fba897a02bd0cceff5868743609c5a205dea Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Mon, 14 Sep 2020 12:34:14 +0800 Subject: [PATCH 19/43] Style --- src/types/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index b8c63e3e6d3..9ff5ee71c95 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -1062,7 +1062,7 @@ til::color Utils::ColorFromHexString(const std::string_view str) // - Parses a color from a string based on the XOrg app color name table. // Arguments: // - str: a string representation of the color name to parse -// - color: a color to write the result to +// - color: a color to write the result to // Return Value: // - True if the string is successfully parsed. False otherwise. bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) From c39f6042c7f16d5a0c65be8c5c96f5ab4f4d3b81 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Mon, 14 Sep 2020 21:33:36 +0800 Subject: [PATCH 20/43] Refine --- .../parser/OutputStateMachineEngine.cpp | 8 +- .../parser/OutputStateMachineEngine.hpp | 6 +- .../parser/ut_parser/OutputEngineTest.cpp | 136 +++++++++++++----- 3 files changed, 108 insertions(+), 42 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index d19204841e0..a5d284bc081 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -746,7 +746,7 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, success = _GetOscTitle(string, title); break; case OscActionCodes::SetColor: - success = s_GetOscSetColorTable(string, tableIndex, color); + success = _GetOscSetColorTable(string, tableIndex, color); break; case OscActionCodes::SetForegroundColor: case OscActionCodes::SetBackgroundColor: @@ -1606,9 +1606,9 @@ CATCH_LOG_RETURN_FALSE() // - rgb - receives the color that we parsed in the format: 0x00BBGGRR // Return Value: // - True if a table index and color was parsed successfully. False otherwise. -bool OutputStateMachineEngine::s_GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) noexcept +bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view string, + size_t& tableIndex, + DWORD& rgb) noexcept { tableIndex = 0; rgb = 0; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 2d10a86e3ec..fd9dcc7daeb 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -229,9 +229,9 @@ namespace Microsoft::Console::VirtualTerminal static bool s_HexToUint(const wchar_t wch, unsigned int& value) noexcept; - static bool s_GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) noexcept; + bool _GetOscSetColorTable(const std::wstring_view string, + size_t& tableIndex, + DWORD& rgb) noexcept; static bool s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept; diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 80dd41f9b83..d203645cde0 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -700,40 +700,6 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"123456", color)); } - TEST_METHOD(TestOscColorTableIndex) - { - size_t tableIndex = 0; - DWORD color = 0; - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0;rgb:1/1/1", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 0u); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"16;rgb:11/11/11", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 16u); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"64;#111", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 64u); - VERIFY_ARE_EQUAL(color, RGB(0x10, 0x10, 0x10)); - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_GetOscSetColorTable(L"128;orange", tableIndex, color)); - VERIFY_ARE_EQUAL(tableIndex, 128u); - VERIFY_ARE_EQUAL(color, RGB(255, 165, 0)); - - // Invalid sequences. - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";;", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";0", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";111", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L";#111", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"0", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;111", tableIndex, color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_GetOscSetColorTable(L"1;rgb:", tableIndex, color)); - } - TEST_METHOD(TestDcsEntry) { auto dispatch = std::make_unique(); @@ -959,7 +925,9 @@ class StatefulDispatch final : public TermDispatch _setDefaultBackground(false), _defaultBackgroundColor{ RGB(0, 0, 0) }, _hyperlinkMode{ false }, - _options{ s_cMaxOptions, static_cast(s_uiGraphicsCleared) } // fill with cleared option + _options{ s_cMaxOptions, static_cast(s_uiGraphicsCleared) }, // fill with cleared option + _colorTable{}, + _setColorTableEntry{ false } { } @@ -1305,6 +1273,13 @@ class StatefulDispatch final : public TermDispatch return true; } + bool SetColorTableEntry(const size_t tableIndex, const COLORREF color) noexcept override + { + _setColorTableEntry = true; + _colorTable.at(tableIndex) = color; + return true; + } + bool SetDefaultForeground(const DWORD color) noexcept override { _setDefaultForeground = true; @@ -1394,6 +1369,7 @@ class StatefulDispatch final : public TermDispatch DWORD _defaultForegroundColor; bool _setDefaultBackground; DWORD _defaultBackgroundColor; + bool _setColorTableEntry; bool _hyperlinkMode; std::wstring _copyContent; std::wstring _uri; @@ -1401,7 +1377,9 @@ class StatefulDispatch final : public TermDispatch static const size_t s_cMaxOptions = 16; static const size_t s_uiGraphicsCleared = UINT_MAX; + static const size_t XTERM_COLOR_TABLE_SIZE = 256; std::vector _options; + std::array _colorTable; }; class StateMachineExternalTest final @@ -2612,6 +2590,16 @@ class StateMachineExternalTest final VERIFY_ARE_EQUAL(RGB(255, 140, 0), pDispatch->_defaultForegroundColor); pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;rgb:1/1/\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); + + pDispatch->ClearState(); } TEST_METHOD(TestOscSetDefaultBackground) @@ -2650,6 +2638,84 @@ class StateMachineExternalTest final VERIFY_ARE_EQUAL(RGB(255, 140, 0), pDispatch->_defaultBackgroundColor); pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;rgb:1/1/\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); + + pDispatch->ClearState(); + } + + TEST_METHOD(TestOscSetColorTableEntry) + { + auto dispatch = std::make_unique(); + auto pDispatch = dispatch.get(); + auto engine = std::make_unique(std::move(dispatch)); + StateMachine mach(std::move(engine)); + + mach.ProcessString(L"\033]4;0;rgb:1/1/1\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;16;rgb:11/11/11\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(16)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;64;#111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(64)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;128;orange\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(255, 165, 0), pDispatch->_colorTable.at(128)); + + pDispatch->ClearState(); + + // Invalid sequences. + mach.ProcessString(L"\033]4;\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;;\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;0\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;111\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;#111\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;1;111\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;1;rgb:\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + + pDispatch->ClearState(); } TEST_METHOD(TestSetClipboard) From f842e9b6e79f76a3c431312b14bedac64ce1cdf6 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Mon, 14 Sep 2020 21:42:21 +0800 Subject: [PATCH 21/43] Restore const --- src/terminal/parser/OutputStateMachineEngine.cpp | 2 +- src/terminal/parser/OutputStateMachineEngine.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index a5d284bc081..d363fa2f865 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1608,7 +1608,7 @@ CATCH_LOG_RETURN_FALSE() // - True if a table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view string, size_t& tableIndex, - DWORD& rgb) noexcept + DWORD& rgb) const noexcept { tableIndex = 0; rgb = 0; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index fd9dcc7daeb..770ad61020b 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -231,7 +231,7 @@ namespace Microsoft::Console::VirtualTerminal unsigned int& value) noexcept; bool _GetOscSetColorTable(const std::wstring_view string, size_t& tableIndex, - DWORD& rgb) noexcept; + DWORD& rgb) const noexcept; static bool s_ParseColorSpec(const std::wstring_view string, DWORD& rgb) noexcept; From 6bbc178fe7d34b1af70eba1383609a844cd5247c Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Tue, 15 Sep 2020 07:53:11 +0800 Subject: [PATCH 22/43] til:color --- src/terminal/parser/OutputStateMachineEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index d363fa2f865..f3eaf12249f 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1495,7 +1495,7 @@ try success = Utils::ColorFromXOrgAppColorName(string, color); if (success) { - rgb = RGB(color.r, color.g, color.b); + rgb = color; } } From 9569d210c47fd0bc8fd38ad30102ce94aa128858 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Tue, 15 Sep 2020 18:08:44 +0800 Subject: [PATCH 23/43] Comments --- src/terminal/parser/OutputStateMachineEngine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index f3eaf12249f..775ea52da31 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1449,7 +1449,8 @@ try // 12 "rgb:hh/hh/hh" // 15 "rgb:hhh/hhh/hhh" // 18 "rgb:hhhh/hhhh/hhhh" - // Anything in between these is also valid, e.g. "rgb:h/hh/h" and "rgb:h/hh/hhh". + // Note that the component sizes aren't required to be the same. + // Anything in between is also valid, e.g. "rgb:h/hh/h" and "rgb:h/hh/hhh". // Any fewer cannot be valid, and any more will be too many. Return early in this case. if (stringSize < 9 || stringSize > 18) { @@ -1473,8 +1474,7 @@ try // 7 "#hhhhhh" // 10 "#hhhhhhhhh" // 13 "#hhhhhhhhhhhh" - // Any other cases will be invalid. - // Return early in this case. + // Any other cases will be invalid. Return early in this case. if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) { return false; From 8415d6bd62cd06c4e8893a36a66de54efd933a8a Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 06:12:49 +0800 Subject: [PATCH 24/43] Move color table things into dedicated cpp/hpp --- src/cascadia/TerminalCore/Terminal.cpp | 1 + src/cascadia/ut_app/JsonTests.cpp | 1 + src/host/settings.cpp | 2 +- .../parser/OutputStateMachineEngine.cpp | 2 +- src/types/colorTable.cpp | 1045 +++++++++++++++++ src/types/inc/colorTable.hpp | 37 + src/types/inc/utils.hpp | 22 - src/types/lib/types.vcxproj | 2 + src/types/lib/types.vcxproj.filters | 6 + src/types/sources.inc | 1 + src/types/ut_types/UtilsTests.cpp | 1 + src/types/utils.cpp | 1038 ---------------- 12 files changed, 1096 insertions(+), 1062 deletions(-) create mode 100644 src/types/colorTable.cpp create mode 100644 src/types/inc/colorTable.hpp diff --git a/src/cascadia/TerminalCore/Terminal.cpp b/src/cascadia/TerminalCore/Terminal.cpp index f7a9acab759..6cb5b074811 100644 --- a/src/cascadia/TerminalCore/Terminal.cpp +++ b/src/cascadia/TerminalCore/Terminal.cpp @@ -9,6 +9,7 @@ #include "../../inc/DefaultSettings.h" #include "../../inc/argb.h" #include "../../types/inc/utils.hpp" +#include "../../types/inc/colorTable.hpp" #include diff --git a/src/cascadia/ut_app/JsonTests.cpp b/src/cascadia/ut_app/JsonTests.cpp index d36f97123d6..69e2b99a72c 100644 --- a/src/cascadia/ut_app/JsonTests.cpp +++ b/src/cascadia/ut_app/JsonTests.cpp @@ -7,6 +7,7 @@ #include "../TerminalApp/Profile.h" #include "../TerminalApp/CascadiaSettings.h" #include "../LocalTests_TerminalApp/JsonTestClass.h" +#include "../types/inc/colorTable.hpp" using namespace Microsoft::Console; using namespace TerminalApp; diff --git a/src/host/settings.cpp b/src/host/settings.cpp index 13faafa4933..d2943761402 100644 --- a/src/host/settings.cpp +++ b/src/host/settings.cpp @@ -5,7 +5,7 @@ #include "settings.hpp" #include "..\interactivity\inc\ServiceLocator.hpp" -#include "../types/inc/utils.hpp" +#include "../types/inc/colorTable.hpp" #pragma hdrstop diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 775ea52da31..8037dce5586 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -8,7 +8,7 @@ #include "base64.hpp" #include "ascii.hpp" -#include "../../types/inc/utils.hpp" +#include "../../types/inc/colorTable.hpp" using namespace Microsoft::Console; using namespace Microsoft::Console::VirtualTerminal; diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp new file mode 100644 index 00000000000..a213a6afd6e --- /dev/null +++ b/src/types/colorTable.cpp @@ -0,0 +1,1045 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +#include "precomp.h" +#include "inc/colorTable.hpp" +#include "til/static_map.h" + +using namespace Microsoft::Console; +using namespace std::string_view_literals; + +static constexpr std::array campbellColorTable{ + til::color{ 0x0C, 0x0C, 0x0C }, + til::color{ 0xC5, 0x0F, 0x1F }, + til::color{ 0x13, 0xA1, 0x0E }, + til::color{ 0xC1, 0x9C, 0x00 }, + til::color{ 0x00, 0x37, 0xDA }, + til::color{ 0x88, 0x17, 0x98 }, + til::color{ 0x3A, 0x96, 0xDD }, + til::color{ 0xCC, 0xCC, 0xCC }, + til::color{ 0x76, 0x76, 0x76 }, + til::color{ 0xE7, 0x48, 0x56 }, + til::color{ 0x16, 0xC6, 0x0C }, + til::color{ 0xF9, 0xF1, 0xA5 }, + til::color{ 0x3B, 0x78, 0xFF }, + til::color{ 0xB4, 0x00, 0x9E }, + til::color{ 0x61, 0xD6, 0xD6 }, + til::color{ 0xF2, 0xF2, 0xF2 }, +}; + +static constexpr std::array standardXterm256ColorTable{ + til::color{ 0x00, 0x00, 0x00 }, + til::color{ 0x80, 0x00, 0x00 }, + til::color{ 0x00, 0x80, 0x00 }, + til::color{ 0x80, 0x80, 0x00 }, + til::color{ 0x00, 0x00, 0x80 }, + til::color{ 0x80, 0x00, 0x80 }, + til::color{ 0x00, 0x80, 0x80 }, + til::color{ 0xC0, 0xC0, 0xC0 }, + til::color{ 0x80, 0x80, 0x80 }, + til::color{ 0xFF, 0x00, 0x00 }, + til::color{ 0x00, 0xFF, 0x00 }, + til::color{ 0xFF, 0xFF, 0x00 }, + til::color{ 0x00, 0x00, 0xFF }, + til::color{ 0xFF, 0x00, 0xFF }, + til::color{ 0x00, 0xFF, 0xFF }, + til::color{ 0xFF, 0xFF, 0xFF }, + til::color{ 0x00, 0x00, 0x00 }, + til::color{ 0x00, 0x00, 0x5F }, + til::color{ 0x00, 0x00, 0x87 }, + til::color{ 0x00, 0x00, 0xAF }, + til::color{ 0x00, 0x00, 0xD7 }, + til::color{ 0x00, 0x00, 0xFF }, + til::color{ 0x00, 0x5F, 0x00 }, + til::color{ 0x00, 0x5F, 0x5F }, + til::color{ 0x00, 0x5F, 0x87 }, + til::color{ 0x00, 0x5F, 0xAF }, + til::color{ 0x00, 0x5F, 0xD7 }, + til::color{ 0x00, 0x5F, 0xFF }, + til::color{ 0x00, 0x87, 0x00 }, + til::color{ 0x00, 0x87, 0x5F }, + til::color{ 0x00, 0x87, 0x87 }, + til::color{ 0x00, 0x87, 0xAF }, + til::color{ 0x00, 0x87, 0xD7 }, + til::color{ 0x00, 0x87, 0xFF }, + til::color{ 0x00, 0xAF, 0x00 }, + til::color{ 0x00, 0xAF, 0x5F }, + til::color{ 0x00, 0xAF, 0x87 }, + til::color{ 0x00, 0xAF, 0xAF }, + til::color{ 0x00, 0xAF, 0xD7 }, + til::color{ 0x00, 0xAF, 0xFF }, + til::color{ 0x00, 0xD7, 0x00 }, + til::color{ 0x00, 0xD7, 0x5F }, + til::color{ 0x00, 0xD7, 0x87 }, + til::color{ 0x00, 0xD7, 0xAF }, + til::color{ 0x00, 0xD7, 0xD7 }, + til::color{ 0x00, 0xD7, 0xFF }, + til::color{ 0x00, 0xFF, 0x00 }, + til::color{ 0x00, 0xFF, 0x5F }, + til::color{ 0x00, 0xFF, 0x87 }, + til::color{ 0x00, 0xFF, 0xAF }, + til::color{ 0x00, 0xFF, 0xD7 }, + til::color{ 0x00, 0xFF, 0xFF }, + til::color{ 0x5F, 0x00, 0x00 }, + til::color{ 0x5F, 0x00, 0x5F }, + til::color{ 0x5F, 0x00, 0x87 }, + til::color{ 0x5F, 0x00, 0xAF }, + til::color{ 0x5F, 0x00, 0xD7 }, + til::color{ 0x5F, 0x00, 0xFF }, + til::color{ 0x5F, 0x5F, 0x00 }, + til::color{ 0x5F, 0x5F, 0x5F }, + til::color{ 0x5F, 0x5F, 0x87 }, + til::color{ 0x5F, 0x5F, 0xAF }, + til::color{ 0x5F, 0x5F, 0xD7 }, + til::color{ 0x5F, 0x5F, 0xFF }, + til::color{ 0x5F, 0x87, 0x00 }, + til::color{ 0x5F, 0x87, 0x5F }, + til::color{ 0x5F, 0x87, 0x87 }, + til::color{ 0x5F, 0x87, 0xAF }, + til::color{ 0x5F, 0x87, 0xD7 }, + til::color{ 0x5F, 0x87, 0xFF }, + til::color{ 0x5F, 0xAF, 0x00 }, + til::color{ 0x5F, 0xAF, 0x5F }, + til::color{ 0x5F, 0xAF, 0x87 }, + til::color{ 0x5F, 0xAF, 0xAF }, + til::color{ 0x5F, 0xAF, 0xD7 }, + til::color{ 0x5F, 0xAF, 0xFF }, + til::color{ 0x5F, 0xD7, 0x00 }, + til::color{ 0x5F, 0xD7, 0x5F }, + til::color{ 0x5F, 0xD7, 0x87 }, + til::color{ 0x5F, 0xD7, 0xAF }, + til::color{ 0x5F, 0xD7, 0xD7 }, + til::color{ 0x5F, 0xD7, 0xFF }, + til::color{ 0x5F, 0xFF, 0x00 }, + til::color{ 0x5F, 0xFF, 0x5F }, + til::color{ 0x5F, 0xFF, 0x87 }, + til::color{ 0x5F, 0xFF, 0xAF }, + til::color{ 0x5F, 0xFF, 0xD7 }, + til::color{ 0x5F, 0xFF, 0xFF }, + til::color{ 0x87, 0x00, 0x00 }, + til::color{ 0x87, 0x00, 0x5F }, + til::color{ 0x87, 0x00, 0x87 }, + til::color{ 0x87, 0x00, 0xAF }, + til::color{ 0x87, 0x00, 0xD7 }, + til::color{ 0x87, 0x00, 0xFF }, + til::color{ 0x87, 0x5F, 0x00 }, + til::color{ 0x87, 0x5F, 0x5F }, + til::color{ 0x87, 0x5F, 0x87 }, + til::color{ 0x87, 0x5F, 0xAF }, + til::color{ 0x87, 0x5F, 0xD7 }, + til::color{ 0x87, 0x5F, 0xFF }, + til::color{ 0x87, 0x87, 0x00 }, + til::color{ 0x87, 0x87, 0x5F }, + til::color{ 0x87, 0x87, 0x87 }, + til::color{ 0x87, 0x87, 0xAF }, + til::color{ 0x87, 0x87, 0xD7 }, + til::color{ 0x87, 0x87, 0xFF }, + til::color{ 0x87, 0xAF, 0x00 }, + til::color{ 0x87, 0xAF, 0x5F }, + til::color{ 0x87, 0xAF, 0x87 }, + til::color{ 0x87, 0xAF, 0xAF }, + til::color{ 0x87, 0xAF, 0xD7 }, + til::color{ 0x87, 0xAF, 0xFF }, + til::color{ 0x87, 0xD7, 0x00 }, + til::color{ 0x87, 0xD7, 0x5F }, + til::color{ 0x87, 0xD7, 0x87 }, + til::color{ 0x87, 0xD7, 0xAF }, + til::color{ 0x87, 0xD7, 0xD7 }, + til::color{ 0x87, 0xD7, 0xFF }, + til::color{ 0x87, 0xFF, 0x00 }, + til::color{ 0x87, 0xFF, 0x5F }, + til::color{ 0x87, 0xFF, 0x87 }, + til::color{ 0x87, 0xFF, 0xAF }, + til::color{ 0x87, 0xFF, 0xD7 }, + til::color{ 0x87, 0xFF, 0xFF }, + til::color{ 0xAF, 0x00, 0x00 }, + til::color{ 0xAF, 0x00, 0x5F }, + til::color{ 0xAF, 0x00, 0x87 }, + til::color{ 0xAF, 0x00, 0xAF }, + til::color{ 0xAF, 0x00, 0xD7 }, + til::color{ 0xAF, 0x00, 0xFF }, + til::color{ 0xAF, 0x5F, 0x00 }, + til::color{ 0xAF, 0x5F, 0x5F }, + til::color{ 0xAF, 0x5F, 0x87 }, + til::color{ 0xAF, 0x5F, 0xAF }, + til::color{ 0xAF, 0x5F, 0xD7 }, + til::color{ 0xAF, 0x5F, 0xFF }, + til::color{ 0xAF, 0x87, 0x00 }, + til::color{ 0xAF, 0x87, 0x5F }, + til::color{ 0xAF, 0x87, 0x87 }, + til::color{ 0xAF, 0x87, 0xAF }, + til::color{ 0xAF, 0x87, 0xD7 }, + til::color{ 0xAF, 0x87, 0xFF }, + til::color{ 0xAF, 0xAF, 0x00 }, + til::color{ 0xAF, 0xAF, 0x5F }, + til::color{ 0xAF, 0xAF, 0x87 }, + til::color{ 0xAF, 0xAF, 0xAF }, + til::color{ 0xAF, 0xAF, 0xD7 }, + til::color{ 0xAF, 0xAF, 0xFF }, + til::color{ 0xAF, 0xD7, 0x00 }, + til::color{ 0xAF, 0xD7, 0x5F }, + til::color{ 0xAF, 0xD7, 0x87 }, + til::color{ 0xAF, 0xD7, 0xAF }, + til::color{ 0xAF, 0xD7, 0xD7 }, + til::color{ 0xAF, 0xD7, 0xFF }, + til::color{ 0xAF, 0xFF, 0x00 }, + til::color{ 0xAF, 0xFF, 0x5F }, + til::color{ 0xAF, 0xFF, 0x87 }, + til::color{ 0xAF, 0xFF, 0xAF }, + til::color{ 0xAF, 0xFF, 0xD7 }, + til::color{ 0xAF, 0xFF, 0xFF }, + til::color{ 0xD7, 0x00, 0x00 }, + til::color{ 0xD7, 0x00, 0x5F }, + til::color{ 0xD7, 0x00, 0x87 }, + til::color{ 0xD7, 0x00, 0xAF }, + til::color{ 0xD7, 0x00, 0xD7 }, + til::color{ 0xD7, 0x00, 0xFF }, + til::color{ 0xD7, 0x5F, 0x00 }, + til::color{ 0xD7, 0x5F, 0x5F }, + til::color{ 0xD7, 0x5F, 0x87 }, + til::color{ 0xD7, 0x5F, 0xAF }, + til::color{ 0xD7, 0x5F, 0xD7 }, + til::color{ 0xD7, 0x5F, 0xFF }, + til::color{ 0xD7, 0x87, 0x00 }, + til::color{ 0xD7, 0x87, 0x5F }, + til::color{ 0xD7, 0x87, 0x87 }, + til::color{ 0xD7, 0x87, 0xAF }, + til::color{ 0xD7, 0x87, 0xD7 }, + til::color{ 0xD7, 0x87, 0xFF }, + til::color{ 0xD7, 0xAF, 0x00 }, + til::color{ 0xD7, 0xAF, 0x5F }, + til::color{ 0xD7, 0xAF, 0x87 }, + til::color{ 0xD7, 0xAF, 0xAF }, + til::color{ 0xD7, 0xAF, 0xD7 }, + til::color{ 0xD7, 0xAF, 0xFF }, + til::color{ 0xD7, 0xD7, 0x00 }, + til::color{ 0xD7, 0xD7, 0x5F }, + til::color{ 0xD7, 0xD7, 0x87 }, + til::color{ 0xD7, 0xD7, 0xAF }, + til::color{ 0xD7, 0xD7, 0xD7 }, + til::color{ 0xD7, 0xD7, 0xFF }, + til::color{ 0xD7, 0xFF, 0x00 }, + til::color{ 0xD7, 0xFF, 0x5F }, + til::color{ 0xD7, 0xFF, 0x87 }, + til::color{ 0xD7, 0xFF, 0xAF }, + til::color{ 0xD7, 0xFF, 0xD7 }, + til::color{ 0xD7, 0xFF, 0xFF }, + til::color{ 0xFF, 0x00, 0x00 }, + til::color{ 0xFF, 0x00, 0x5F }, + til::color{ 0xFF, 0x00, 0x87 }, + til::color{ 0xFF, 0x00, 0xAF }, + til::color{ 0xFF, 0x00, 0xD7 }, + til::color{ 0xFF, 0x00, 0xFF }, + til::color{ 0xFF, 0x5F, 0x00 }, + til::color{ 0xFF, 0x5F, 0x5F }, + til::color{ 0xFF, 0x5F, 0x87 }, + til::color{ 0xFF, 0x5F, 0xAF }, + til::color{ 0xFF, 0x5F, 0xD7 }, + til::color{ 0xFF, 0x5F, 0xFF }, + til::color{ 0xFF, 0x87, 0x00 }, + til::color{ 0xFF, 0x87, 0x5F }, + til::color{ 0xFF, 0x87, 0x87 }, + til::color{ 0xFF, 0x87, 0xAF }, + til::color{ 0xFF, 0x87, 0xD7 }, + til::color{ 0xFF, 0x87, 0xFF }, + til::color{ 0xFF, 0xAF, 0x00 }, + til::color{ 0xFF, 0xAF, 0x5F }, + til::color{ 0xFF, 0xAF, 0x87 }, + til::color{ 0xFF, 0xAF, 0xAF }, + til::color{ 0xFF, 0xAF, 0xD7 }, + til::color{ 0xFF, 0xAF, 0xFF }, + til::color{ 0xFF, 0xD7, 0x00 }, + til::color{ 0xFF, 0xD7, 0x5F }, + til::color{ 0xFF, 0xD7, 0x87 }, + til::color{ 0xFF, 0xD7, 0xAF }, + til::color{ 0xFF, 0xD7, 0xD7 }, + til::color{ 0xFF, 0xD7, 0xFF }, + til::color{ 0xFF, 0xFF, 0x00 }, + til::color{ 0xFF, 0xFF, 0x5F }, + til::color{ 0xFF, 0xFF, 0x87 }, + til::color{ 0xFF, 0xFF, 0xAF }, + til::color{ 0xFF, 0xFF, 0xD7 }, + til::color{ 0xFF, 0xFF, 0xFF }, + til::color{ 0x08, 0x08, 0x08 }, + til::color{ 0x12, 0x12, 0x12 }, + til::color{ 0x1C, 0x1C, 0x1C }, + til::color{ 0x26, 0x26, 0x26 }, + til::color{ 0x30, 0x30, 0x30 }, + til::color{ 0x3A, 0x3A, 0x3A }, + til::color{ 0x44, 0x44, 0x44 }, + til::color{ 0x4E, 0x4E, 0x4E }, + til::color{ 0x58, 0x58, 0x58 }, + til::color{ 0x62, 0x62, 0x62 }, + til::color{ 0x6C, 0x6C, 0x6C }, + til::color{ 0x76, 0x76, 0x76 }, + til::color{ 0x80, 0x80, 0x80 }, + til::color{ 0x8A, 0x8A, 0x8A }, + til::color{ 0x94, 0x94, 0x94 }, + til::color{ 0x9E, 0x9E, 0x9E }, + til::color{ 0xA8, 0xA8, 0xA8 }, + til::color{ 0xB2, 0xB2, 0xB2 }, + til::color{ 0xBC, 0xBC, 0xBC }, + til::color{ 0xC6, 0xC6, 0xC6 }, + til::color{ 0xD0, 0xD0, 0xD0 }, + til::color{ 0xDA, 0xDA, 0xDA }, + til::color{ 0xE4, 0xE4, 0xE4 }, + til::color{ 0xEE, 0xEE, 0xEE }, +}; + +static til::static_map xorgAppColorTable{ + std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, + std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, + std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, + std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, + std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, + std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, + std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, + std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, + std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, + std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, + std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, + std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, + std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, + std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, + std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, + std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, + std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, + std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, + std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, + std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, + std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, + std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, + std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, + std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, + std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, + std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, + std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, + std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, + std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, + std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, + std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, + std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, + std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, + std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, + std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, + std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, + std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, + std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, + std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, + std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, + std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, + std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, + std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, + std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, + std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, + std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, + std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, + std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, + std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, + std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, + std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, + std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, + std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, + std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, + std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, + std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, + std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, + std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, + std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, + std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, + std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, + std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, + std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, + std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, + std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, + std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, + std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, + std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, + std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, + std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, + std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, + std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, + std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, + std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, + std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, + std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, + std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, + std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, + std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ L"antiquewhite1"sv, til::color{ 255, 239, 219 } }, + std::pair{ L"antiquewhite2"sv, til::color{ 238, 223, 204 } }, + std::pair{ L"antiquewhite3"sv, til::color{ 205, 192, 176 } }, + std::pair{ L"antiquewhite4"sv, til::color{ 139, 131, 120 } }, + std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, + std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, + std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, + std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, + std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, + std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, + std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, + std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, + std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, + std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, + std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, + std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, + std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, + std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, + std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, + std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, + std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, + std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, + std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, + std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, + std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, + std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, + std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, + std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, + std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, + std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, + std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ L"azure1"sv, til::color{ 240, 255, 255 } }, + std::pair{ L"azure2"sv, til::color{ 224, 238, 238 } }, + std::pair{ L"azure3"sv, til::color{ 193, 205, 205 } }, + std::pair{ L"azure4"sv, til::color{ 131, 139, 139 } }, + std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, + std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, + std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, + std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, + std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, + std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, + std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, + std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ L"blue1"sv, til::color{ 0, 0, 255 } }, + std::pair{ L"blue2"sv, til::color{ 0, 0, 238 } }, + std::pair{ L"blue3"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"blue4"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, + std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, + std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, + std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, + std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, + std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, + std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, + std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, + std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, + std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, + std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, + std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, + std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, + std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, + std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, + std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, + std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, + std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, + std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, + std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, + std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, + std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, + std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, + std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, + std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, + std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, + std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, + std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, + std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, + std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, + std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, + std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, + std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, + std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, + std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, + std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, + std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ L"cadetblue1"sv, til::color{ 152, 245, 255 } }, + std::pair{ L"cadetblue2"sv, til::color{ 142, 229, 238 } }, + std::pair{ L"cadetblue3"sv, til::color{ 122, 197, 205 } }, + std::pair{ L"cadetblue4"sv, til::color{ 83, 134, 139 } }, + std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, + std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, + std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, + std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, + std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, + std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, + std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, + std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, + std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, + std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, + std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, + std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, + std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, + std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, + std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, + std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, + std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, + std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, + std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, + std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, + std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, + std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, + std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, + std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, + std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, + std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, + std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, + std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ L"chartreuse1"sv, til::color{ 127, 255, 0 } }, + std::pair{ L"chartreuse2"sv, til::color{ 118, 238, 0 } }, + std::pair{ L"chartreuse3"sv, til::color{ 102, 205, 0 } }, + std::pair{ L"chartreuse4"sv, til::color{ 69, 139, 0 } }, + std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, + std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, + std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, + std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, + std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, + std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, + std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, + std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, + std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, + std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, + std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, + std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, + std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, + std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, + std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, + std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, + std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, + std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, + std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, + std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, + std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, + std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, + std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, + std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, + std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, + std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, + std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, + std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, + std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, + std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, + std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, + std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, + std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, + std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, + std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, + std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, + std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, + std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, + std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, + std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, + std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, + std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, + std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, + std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, + std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, + std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, + std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, + std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, + std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, + std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, + std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, + std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, + std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, + std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, + std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ L"chocolate1"sv, til::color{ 255, 127, 36 } }, + std::pair{ L"chocolate2"sv, til::color{ 238, 118, 33 } }, + std::pair{ L"chocolate3"sv, til::color{ 205, 102, 29 } }, + std::pair{ L"chocolate4"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, + std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, + std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, + std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, + std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, + std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, + std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, + std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, + std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, + std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, + std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, + std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, + std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, + std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, + std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, + std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, + std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, + std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, + std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, + std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, + std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, + std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ L"coral1"sv, til::color{ 255, 114, 86 } }, + std::pair{ L"coral2"sv, til::color{ 238, 106, 80 } }, + std::pair{ L"coral3"sv, til::color{ 205, 91, 69 } }, + std::pair{ L"coral4"sv, til::color{ 139, 62, 47 } }, + std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, + std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, + std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, + std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, + std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, + std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, + std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, + std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, + std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, + std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, + std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, + std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, + std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, + std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, + std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, + std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, + std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, + std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, + std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, + std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, + std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, + std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, + std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, + std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, + std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, + std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, + std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, + std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, + std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, + std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, + std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, + std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, + std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, + std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, + std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, + std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, + std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, + std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, + std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, + std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, + std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, + std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, + std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, + std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, + std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, + std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, + std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, + std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, + std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ L"darkorchid1"sv, til::color{ 191, 62, 255 } }, + std::pair{ L"darkorchid2"sv, til::color{ 178, 58, 238 } }, + std::pair{ L"darkorchid3"sv, til::color{ 154, 50, 205 } }, + std::pair{ L"darkorchid4"sv, til::color{ 104, 34, 139 } }, + std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, + std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, + std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, + std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, + std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, + std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, + std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, + std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, + std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, + std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, + std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, + std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, + std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, + std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, + std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, + std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, + std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, + std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, + std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, + std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, + std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, + std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, + std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, + std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, + std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, + std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, + std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, + std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, + std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"gray10"sv, til::color{ 26, 26, 26 } }, + std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, + std::pair{ L"gray11"sv, til::color{ 28, 28, 28 } }, + std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, + std::pair{ L"gray12"sv, til::color{ 31, 31, 31 } }, + std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, + std::pair{ L"gray13"sv, til::color{ 33, 33, 33 } }, + std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, + std::pair{ L"gray14"sv, til::color{ 36, 36, 36 } }, + std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, + std::pair{ L"gray15"sv, til::color{ 38, 38, 38 } }, + std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, + std::pair{ L"gray16"sv, til::color{ 41, 41, 41 } }, + std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, + std::pair{ L"gray17"sv, til::color{ 43, 43, 43 } }, + std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, + std::pair{ L"gray18"sv, til::color{ 46, 46, 46 } }, + std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, + std::pair{ L"gray19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"gray20"sv, til::color{ 51, 51, 51 } }, + std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, + std::pair{ L"gray21"sv, til::color{ 54, 54, 54 } }, + std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, + std::pair{ L"gray22"sv, til::color{ 56, 56, 56 } }, + std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, + std::pair{ L"gray23"sv, til::color{ 59, 59, 59 } }, + std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, + std::pair{ L"gray24"sv, til::color{ 61, 61, 61 } }, + std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, + std::pair{ L"gray25"sv, til::color{ 64, 64, 64 } }, + std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, + std::pair{ L"gray26"sv, til::color{ 66, 66, 66 } }, + std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, + std::pair{ L"gray27"sv, til::color{ 69, 69, 69 } }, + std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, + std::pair{ L"gray28"sv, til::color{ 71, 71, 71 } }, + std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, + std::pair{ L"gray29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"gray30"sv, til::color{ 77, 77, 77 } }, + std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, + std::pair{ L"gray31"sv, til::color{ 79, 79, 79 } }, + std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, + std::pair{ L"gray32"sv, til::color{ 82, 82, 82 } }, + std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, + std::pair{ L"gray33"sv, til::color{ 84, 84, 84 } }, + std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, + std::pair{ L"gray34"sv, til::color{ 87, 87, 87 } }, + std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, + std::pair{ L"gray35"sv, til::color{ 89, 89, 89 } }, + std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, + std::pair{ L"gray36"sv, til::color{ 92, 92, 92 } }, + std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, + std::pair{ L"gray37"sv, til::color{ 94, 94, 94 } }, + std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, + std::pair{ L"gray38"sv, til::color{ 97, 97, 97 } }, + std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, + std::pair{ L"gray39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"gray40"sv, til::color{ 102, 102, 102 } }, + std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, + std::pair{ L"gray41"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"gray42"sv, til::color{ 107, 107, 107 } }, + std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, + std::pair{ L"gray43"sv, til::color{ 110, 110, 110 } }, + std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, + std::pair{ L"gray44"sv, til::color{ 112, 112, 112 } }, + std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, + std::pair{ L"gray45"sv, til::color{ 115, 115, 115 } }, + std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, + std::pair{ L"gray46"sv, til::color{ 117, 117, 117 } }, + std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, + std::pair{ L"gray47"sv, til::color{ 120, 120, 120 } }, + std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, + std::pair{ L"gray48"sv, til::color{ 122, 122, 122 } }, + std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, + std::pair{ L"gray49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"gray50"sv, til::color{ 127, 127, 127 } }, + std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, + std::pair{ L"gray51"sv, til::color{ 130, 130, 130 } }, + std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, + std::pair{ L"gray52"sv, til::color{ 133, 133, 133 } }, + std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, + std::pair{ L"gray53"sv, til::color{ 135, 135, 135 } }, + std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, + std::pair{ L"gray54"sv, til::color{ 138, 138, 138 } }, + std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, + std::pair{ L"gray55"sv, til::color{ 140, 140, 140 } }, + std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, + std::pair{ L"gray56"sv, til::color{ 143, 143, 143 } }, + std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, + std::pair{ L"gray57"sv, til::color{ 145, 145, 145 } }, + std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, + std::pair{ L"gray58"sv, til::color{ 148, 148, 148 } }, + std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, + std::pair{ L"gray59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"gray60"sv, til::color{ 153, 153, 153 } }, + std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, + std::pair{ L"gray61"sv, til::color{ 156, 156, 156 } }, + std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, + std::pair{ L"gray62"sv, til::color{ 158, 158, 158 } }, + std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, + std::pair{ L"gray63"sv, til::color{ 161, 161, 161 } }, + std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, + std::pair{ L"gray64"sv, til::color{ 163, 163, 163 } }, + std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, + std::pair{ L"gray65"sv, til::color{ 166, 166, 166 } }, + std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, + std::pair{ L"gray66"sv, til::color{ 168, 168, 168 } }, + std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, + std::pair{ L"gray67"sv, til::color{ 171, 171, 171 } }, + std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, + std::pair{ L"gray68"sv, til::color{ 173, 173, 173 } }, + std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, + std::pair{ L"gray69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"gray70"sv, til::color{ 179, 179, 179 } }, + std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, + std::pair{ L"gray71"sv, til::color{ 181, 181, 181 } }, + std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, + std::pair{ L"gray72"sv, til::color{ 184, 184, 184 } }, + std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, + std::pair{ L"gray73"sv, til::color{ 186, 186, 186 } }, + std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, + std::pair{ L"gray74"sv, til::color{ 189, 189, 189 } }, + std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, + std::pair{ L"gray75"sv, til::color{ 191, 191, 191 } }, + std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, + std::pair{ L"gray76"sv, til::color{ 194, 194, 194 } }, + std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, + std::pair{ L"gray77"sv, til::color{ 196, 196, 196 } }, + std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, + std::pair{ L"gray78"sv, til::color{ 199, 199, 199 } }, + std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, + std::pair{ L"gray79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"gray80"sv, til::color{ 204, 204, 204 } }, + std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, + std::pair{ L"gray81"sv, til::color{ 207, 207, 207 } }, + std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, + std::pair{ L"gray82"sv, til::color{ 209, 209, 209 } }, + std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, + std::pair{ L"gray83"sv, til::color{ 212, 212, 212 } }, + std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, + std::pair{ L"gray84"sv, til::color{ 214, 214, 214 } }, + std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, + std::pair{ L"gray85"sv, til::color{ 217, 217, 217 } }, + std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, + std::pair{ L"gray86"sv, til::color{ 219, 219, 219 } }, + std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, + std::pair{ L"gray87"sv, til::color{ 222, 222, 222 } }, + std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, + std::pair{ L"gray88"sv, til::color{ 224, 224, 224 } }, + std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, + std::pair{ L"gray89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"gray90"sv, til::color{ 229, 229, 229 } }, + std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, + std::pair{ L"gray91"sv, til::color{ 232, 232, 232 } }, + std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, + std::pair{ L"gray92"sv, til::color{ 235, 235, 235 } }, + std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, + std::pair{ L"gray93"sv, til::color{ 237, 237, 237 } }, + std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, + std::pair{ L"gray94"sv, til::color{ 240, 240, 240 } }, + std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, + std::pair{ L"gray95"sv, til::color{ 242, 242, 242 } }, + std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, + std::pair{ L"gray96"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"gray97"sv, til::color{ 247, 247, 247 } }, + std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, + std::pair{ L"gray98"sv, til::color{ 250, 250, 250 } }, + std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, + std::pair{ L"gray99"sv, til::color{ 252, 252, 252 } }, + std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, + std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, + std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, + std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, + std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, + std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, + std::pair{ L"teal"sv, til::color{ 0, 128, 128 } } +}; + +// Function Description: +// - Fill the first 16 entries of a given color table with the Campbell color +// scheme, in the ANSI/VT RGB order. +// Arguments: +// - table: a color table with at least 16 entries +// Return Value: +// - , throws if the table has less that 16 entries +void Utils::InitializeCampbellColorTable(const gsl::span table) +{ + THROW_HR_IF(E_INVALIDARG, table.size() < 16); + + std::copy(campbellColorTable.begin(), campbellColorTable.end(), table.begin()); +} + +// Function Description: +// - Fill the first 16 entries of a given color table with the Campbell color +// scheme, in the Windows BGR order. +// Arguments: +// - table: a color table with at least 16 entries +// Return Value: +// - , throws if the table has less that 16 entries +void Utils::InitializeCampbellColorTableForConhost(const gsl::span table) +{ + THROW_HR_IF(E_INVALIDARG, table.size() < 16); + InitializeCampbellColorTable(table); + SwapANSIColorOrderForConhost(table); +} + +// Function Description: +// - modifies in-place the given color table from ANSI (RGB) order to Console order (BRG). +// Arguments: +// - table: a color table with at least 16 entries +// Return Value: +// - , throws if the table has less that 16 entries +void Utils::SwapANSIColorOrderForConhost(const gsl::span table) +{ + THROW_HR_IF(E_INVALIDARG, table.size() < 16); + std::swap(til::at(table, 1), til::at(table, 4)); + std::swap(til::at(table, 3), til::at(table, 6)); + std::swap(til::at(table, 9), til::at(table, 12)); + std::swap(til::at(table, 11), til::at(table, 14)); +} + +// Function Description: +// - Fill the first 255 entries of a given color table with the default values +// of a full 256-color table +// Arguments: +// - table: a color table with at least 256 entries +// Return Value: +// - , throws if the table has less that 256 entries +void Utils::Initialize256ColorTable(const gsl::span table) +{ + THROW_HR_IF(E_INVALIDARG, table.size() < 256); + + std::copy(standardXterm256ColorTable.begin(), standardXterm256ColorTable.end(), table.begin()); +} + +// Function Description: +// - Parses a color from a string based on the XOrg app color name table. +// Arguments: +// - str: a string representation of the color name to parse +// - color: a color to write the result to +// Return Value: +// - True if the string is successfully parsed. False otherwise. +bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) +{ + std::wstring key(wstr); + std::transform(key.begin(), key.end(), key.begin(), std::towlower); + key.erase(std::remove_if(key.begin(), key.end(), std::iswspace), key.end()); + const auto iter = xorgAppColorTable.find(key); + if (iter == xorgAppColorTable.end()) + { + return false; + } + + color = iter->second; + return true; +} diff --git a/src/types/inc/colorTable.hpp b/src/types/inc/colorTable.hpp new file mode 100644 index 00000000000..053e84140f2 --- /dev/null +++ b/src/types/inc/colorTable.hpp @@ -0,0 +1,37 @@ +/*++ +Copyright (c) Microsoft Corporation + +Module Name: +- viewport.hpp + +Abstract: +- Helper for color tables +--*/ + +#pragma once + +namespace Microsoft::Console::Utils +{ + void InitializeCampbellColorTable(const gsl::span table); + void InitializeCampbellColorTableForConhost(const gsl::span table); + void SwapANSIColorOrderForConhost(const gsl::span table); + void Initialize256ColorTable(const gsl::span table); + + bool ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color); + + // Function Description: + // - Fill the alpha byte of the colors in a given color table with the given value. + // Arguments: + // - table: a color table + // - newAlpha: the new value to use as the alpha for all the entries in that table. + // Return Value: + // - + constexpr void SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept + { + const auto shiftedAlpha = newAlpha << 24; + for (auto& color : table) + { + WI_UpdateFlagsInMask(color, 0xff000000, shiftedAlpha); + } + } +} diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index bfaee1a022b..20fd2100848 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -45,28 +45,6 @@ namespace Microsoft::Console::Utils std::string ColorToHexString(const til::color color); til::color ColorFromHexString(const std::string_view wstr); - bool ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color); - - void InitializeCampbellColorTable(const gsl::span table); - void InitializeCampbellColorTableForConhost(const gsl::span table); - void SwapANSIColorOrderForConhost(const gsl::span table); - void Initialize256ColorTable(const gsl::span table); - - // Function Description: - // - Fill the alpha byte of the colors in a given color table with the given value. - // Arguments: - // - table: a color table - // - newAlpha: the new value to use as the alpha for all the entries in that table. - // Return Value: - // - - constexpr void SetColorTableAlpha(const gsl::span table, const BYTE newAlpha) noexcept - { - const auto shiftedAlpha = newAlpha << 24; - for (auto& color : table) - { - WI_UpdateFlagsInMask(color, 0xff000000, shiftedAlpha); - } - } constexpr uint16_t EndianSwap(uint16_t value) { diff --git a/src/types/lib/types.vcxproj b/src/types/lib/types.vcxproj index 6d5835a8bd9..b96b1755ba1 100644 --- a/src/types/lib/types.vcxproj +++ b/src/types/lib/types.vcxproj @@ -12,6 +12,7 @@ + @@ -39,6 +40,7 @@ + diff --git a/src/types/lib/types.vcxproj.filters b/src/types/lib/types.vcxproj.filters index 982dc7c38d6..f3b8cf61a6b 100644 --- a/src/types/lib/types.vcxproj.filters +++ b/src/types/lib/types.vcxproj.filters @@ -18,6 +18,9 @@ Source Files + + Source Files + Source Files @@ -89,6 +92,9 @@ Header Files + + Header Files + Header Files diff --git a/src/types/sources.inc b/src/types/sources.inc index 6dc0c221a96..90cf7f591ce 100644 --- a/src/types/sources.inc +++ b/src/types/sources.inc @@ -39,6 +39,7 @@ SOURCES= \ ..\Viewport.cpp \ ..\WindowBufferSizeEvent.cpp \ ..\convert.cpp \ + ..\colorTable.cpp \ ..\Utf16Parser.cpp \ ..\utils.cpp \ ..\ThemeUtils.cpp \ diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 8624ab1343e..16c31473c80 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -6,6 +6,7 @@ #include "..\..\inc\consoletaeftemplates.hpp" #include "..\inc\utils.hpp" +#include "..\inc\colorTable.hpp" #include using namespace WEX::Common; diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 9ff5ee71c95..90bcd4033c7 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -3,968 +3,9 @@ #include "precomp.h" #include "inc/utils.hpp" -#include "til/static_map.h" -using namespace std::string_view_literals; using namespace Microsoft::Console; -static constexpr std::array campbellColorTable{ - til::color{ 0x0C, 0x0C, 0x0C }, - til::color{ 0xC5, 0x0F, 0x1F }, - til::color{ 0x13, 0xA1, 0x0E }, - til::color{ 0xC1, 0x9C, 0x00 }, - til::color{ 0x00, 0x37, 0xDA }, - til::color{ 0x88, 0x17, 0x98 }, - til::color{ 0x3A, 0x96, 0xDD }, - til::color{ 0xCC, 0xCC, 0xCC }, - til::color{ 0x76, 0x76, 0x76 }, - til::color{ 0xE7, 0x48, 0x56 }, - til::color{ 0x16, 0xC6, 0x0C }, - til::color{ 0xF9, 0xF1, 0xA5 }, - til::color{ 0x3B, 0x78, 0xFF }, - til::color{ 0xB4, 0x00, 0x9E }, - til::color{ 0x61, 0xD6, 0xD6 }, - til::color{ 0xF2, 0xF2, 0xF2 }, -}; - -static constexpr std::array standardXterm256ColorTable{ - til::color{ 0x00, 0x00, 0x00 }, - til::color{ 0x80, 0x00, 0x00 }, - til::color{ 0x00, 0x80, 0x00 }, - til::color{ 0x80, 0x80, 0x00 }, - til::color{ 0x00, 0x00, 0x80 }, - til::color{ 0x80, 0x00, 0x80 }, - til::color{ 0x00, 0x80, 0x80 }, - til::color{ 0xC0, 0xC0, 0xC0 }, - til::color{ 0x80, 0x80, 0x80 }, - til::color{ 0xFF, 0x00, 0x00 }, - til::color{ 0x00, 0xFF, 0x00 }, - til::color{ 0xFF, 0xFF, 0x00 }, - til::color{ 0x00, 0x00, 0xFF }, - til::color{ 0xFF, 0x00, 0xFF }, - til::color{ 0x00, 0xFF, 0xFF }, - til::color{ 0xFF, 0xFF, 0xFF }, - til::color{ 0x00, 0x00, 0x00 }, - til::color{ 0x00, 0x00, 0x5F }, - til::color{ 0x00, 0x00, 0x87 }, - til::color{ 0x00, 0x00, 0xAF }, - til::color{ 0x00, 0x00, 0xD7 }, - til::color{ 0x00, 0x00, 0xFF }, - til::color{ 0x00, 0x5F, 0x00 }, - til::color{ 0x00, 0x5F, 0x5F }, - til::color{ 0x00, 0x5F, 0x87 }, - til::color{ 0x00, 0x5F, 0xAF }, - til::color{ 0x00, 0x5F, 0xD7 }, - til::color{ 0x00, 0x5F, 0xFF }, - til::color{ 0x00, 0x87, 0x00 }, - til::color{ 0x00, 0x87, 0x5F }, - til::color{ 0x00, 0x87, 0x87 }, - til::color{ 0x00, 0x87, 0xAF }, - til::color{ 0x00, 0x87, 0xD7 }, - til::color{ 0x00, 0x87, 0xFF }, - til::color{ 0x00, 0xAF, 0x00 }, - til::color{ 0x00, 0xAF, 0x5F }, - til::color{ 0x00, 0xAF, 0x87 }, - til::color{ 0x00, 0xAF, 0xAF }, - til::color{ 0x00, 0xAF, 0xD7 }, - til::color{ 0x00, 0xAF, 0xFF }, - til::color{ 0x00, 0xD7, 0x00 }, - til::color{ 0x00, 0xD7, 0x5F }, - til::color{ 0x00, 0xD7, 0x87 }, - til::color{ 0x00, 0xD7, 0xAF }, - til::color{ 0x00, 0xD7, 0xD7 }, - til::color{ 0x00, 0xD7, 0xFF }, - til::color{ 0x00, 0xFF, 0x00 }, - til::color{ 0x00, 0xFF, 0x5F }, - til::color{ 0x00, 0xFF, 0x87 }, - til::color{ 0x00, 0xFF, 0xAF }, - til::color{ 0x00, 0xFF, 0xD7 }, - til::color{ 0x00, 0xFF, 0xFF }, - til::color{ 0x5F, 0x00, 0x00 }, - til::color{ 0x5F, 0x00, 0x5F }, - til::color{ 0x5F, 0x00, 0x87 }, - til::color{ 0x5F, 0x00, 0xAF }, - til::color{ 0x5F, 0x00, 0xD7 }, - til::color{ 0x5F, 0x00, 0xFF }, - til::color{ 0x5F, 0x5F, 0x00 }, - til::color{ 0x5F, 0x5F, 0x5F }, - til::color{ 0x5F, 0x5F, 0x87 }, - til::color{ 0x5F, 0x5F, 0xAF }, - til::color{ 0x5F, 0x5F, 0xD7 }, - til::color{ 0x5F, 0x5F, 0xFF }, - til::color{ 0x5F, 0x87, 0x00 }, - til::color{ 0x5F, 0x87, 0x5F }, - til::color{ 0x5F, 0x87, 0x87 }, - til::color{ 0x5F, 0x87, 0xAF }, - til::color{ 0x5F, 0x87, 0xD7 }, - til::color{ 0x5F, 0x87, 0xFF }, - til::color{ 0x5F, 0xAF, 0x00 }, - til::color{ 0x5F, 0xAF, 0x5F }, - til::color{ 0x5F, 0xAF, 0x87 }, - til::color{ 0x5F, 0xAF, 0xAF }, - til::color{ 0x5F, 0xAF, 0xD7 }, - til::color{ 0x5F, 0xAF, 0xFF }, - til::color{ 0x5F, 0xD7, 0x00 }, - til::color{ 0x5F, 0xD7, 0x5F }, - til::color{ 0x5F, 0xD7, 0x87 }, - til::color{ 0x5F, 0xD7, 0xAF }, - til::color{ 0x5F, 0xD7, 0xD7 }, - til::color{ 0x5F, 0xD7, 0xFF }, - til::color{ 0x5F, 0xFF, 0x00 }, - til::color{ 0x5F, 0xFF, 0x5F }, - til::color{ 0x5F, 0xFF, 0x87 }, - til::color{ 0x5F, 0xFF, 0xAF }, - til::color{ 0x5F, 0xFF, 0xD7 }, - til::color{ 0x5F, 0xFF, 0xFF }, - til::color{ 0x87, 0x00, 0x00 }, - til::color{ 0x87, 0x00, 0x5F }, - til::color{ 0x87, 0x00, 0x87 }, - til::color{ 0x87, 0x00, 0xAF }, - til::color{ 0x87, 0x00, 0xD7 }, - til::color{ 0x87, 0x00, 0xFF }, - til::color{ 0x87, 0x5F, 0x00 }, - til::color{ 0x87, 0x5F, 0x5F }, - til::color{ 0x87, 0x5F, 0x87 }, - til::color{ 0x87, 0x5F, 0xAF }, - til::color{ 0x87, 0x5F, 0xD7 }, - til::color{ 0x87, 0x5F, 0xFF }, - til::color{ 0x87, 0x87, 0x00 }, - til::color{ 0x87, 0x87, 0x5F }, - til::color{ 0x87, 0x87, 0x87 }, - til::color{ 0x87, 0x87, 0xAF }, - til::color{ 0x87, 0x87, 0xD7 }, - til::color{ 0x87, 0x87, 0xFF }, - til::color{ 0x87, 0xAF, 0x00 }, - til::color{ 0x87, 0xAF, 0x5F }, - til::color{ 0x87, 0xAF, 0x87 }, - til::color{ 0x87, 0xAF, 0xAF }, - til::color{ 0x87, 0xAF, 0xD7 }, - til::color{ 0x87, 0xAF, 0xFF }, - til::color{ 0x87, 0xD7, 0x00 }, - til::color{ 0x87, 0xD7, 0x5F }, - til::color{ 0x87, 0xD7, 0x87 }, - til::color{ 0x87, 0xD7, 0xAF }, - til::color{ 0x87, 0xD7, 0xD7 }, - til::color{ 0x87, 0xD7, 0xFF }, - til::color{ 0x87, 0xFF, 0x00 }, - til::color{ 0x87, 0xFF, 0x5F }, - til::color{ 0x87, 0xFF, 0x87 }, - til::color{ 0x87, 0xFF, 0xAF }, - til::color{ 0x87, 0xFF, 0xD7 }, - til::color{ 0x87, 0xFF, 0xFF }, - til::color{ 0xAF, 0x00, 0x00 }, - til::color{ 0xAF, 0x00, 0x5F }, - til::color{ 0xAF, 0x00, 0x87 }, - til::color{ 0xAF, 0x00, 0xAF }, - til::color{ 0xAF, 0x00, 0xD7 }, - til::color{ 0xAF, 0x00, 0xFF }, - til::color{ 0xAF, 0x5F, 0x00 }, - til::color{ 0xAF, 0x5F, 0x5F }, - til::color{ 0xAF, 0x5F, 0x87 }, - til::color{ 0xAF, 0x5F, 0xAF }, - til::color{ 0xAF, 0x5F, 0xD7 }, - til::color{ 0xAF, 0x5F, 0xFF }, - til::color{ 0xAF, 0x87, 0x00 }, - til::color{ 0xAF, 0x87, 0x5F }, - til::color{ 0xAF, 0x87, 0x87 }, - til::color{ 0xAF, 0x87, 0xAF }, - til::color{ 0xAF, 0x87, 0xD7 }, - til::color{ 0xAF, 0x87, 0xFF }, - til::color{ 0xAF, 0xAF, 0x00 }, - til::color{ 0xAF, 0xAF, 0x5F }, - til::color{ 0xAF, 0xAF, 0x87 }, - til::color{ 0xAF, 0xAF, 0xAF }, - til::color{ 0xAF, 0xAF, 0xD7 }, - til::color{ 0xAF, 0xAF, 0xFF }, - til::color{ 0xAF, 0xD7, 0x00 }, - til::color{ 0xAF, 0xD7, 0x5F }, - til::color{ 0xAF, 0xD7, 0x87 }, - til::color{ 0xAF, 0xD7, 0xAF }, - til::color{ 0xAF, 0xD7, 0xD7 }, - til::color{ 0xAF, 0xD7, 0xFF }, - til::color{ 0xAF, 0xFF, 0x00 }, - til::color{ 0xAF, 0xFF, 0x5F }, - til::color{ 0xAF, 0xFF, 0x87 }, - til::color{ 0xAF, 0xFF, 0xAF }, - til::color{ 0xAF, 0xFF, 0xD7 }, - til::color{ 0xAF, 0xFF, 0xFF }, - til::color{ 0xD7, 0x00, 0x00 }, - til::color{ 0xD7, 0x00, 0x5F }, - til::color{ 0xD7, 0x00, 0x87 }, - til::color{ 0xD7, 0x00, 0xAF }, - til::color{ 0xD7, 0x00, 0xD7 }, - til::color{ 0xD7, 0x00, 0xFF }, - til::color{ 0xD7, 0x5F, 0x00 }, - til::color{ 0xD7, 0x5F, 0x5F }, - til::color{ 0xD7, 0x5F, 0x87 }, - til::color{ 0xD7, 0x5F, 0xAF }, - til::color{ 0xD7, 0x5F, 0xD7 }, - til::color{ 0xD7, 0x5F, 0xFF }, - til::color{ 0xD7, 0x87, 0x00 }, - til::color{ 0xD7, 0x87, 0x5F }, - til::color{ 0xD7, 0x87, 0x87 }, - til::color{ 0xD7, 0x87, 0xAF }, - til::color{ 0xD7, 0x87, 0xD7 }, - til::color{ 0xD7, 0x87, 0xFF }, - til::color{ 0xD7, 0xAF, 0x00 }, - til::color{ 0xD7, 0xAF, 0x5F }, - til::color{ 0xD7, 0xAF, 0x87 }, - til::color{ 0xD7, 0xAF, 0xAF }, - til::color{ 0xD7, 0xAF, 0xD7 }, - til::color{ 0xD7, 0xAF, 0xFF }, - til::color{ 0xD7, 0xD7, 0x00 }, - til::color{ 0xD7, 0xD7, 0x5F }, - til::color{ 0xD7, 0xD7, 0x87 }, - til::color{ 0xD7, 0xD7, 0xAF }, - til::color{ 0xD7, 0xD7, 0xD7 }, - til::color{ 0xD7, 0xD7, 0xFF }, - til::color{ 0xD7, 0xFF, 0x00 }, - til::color{ 0xD7, 0xFF, 0x5F }, - til::color{ 0xD7, 0xFF, 0x87 }, - til::color{ 0xD7, 0xFF, 0xAF }, - til::color{ 0xD7, 0xFF, 0xD7 }, - til::color{ 0xD7, 0xFF, 0xFF }, - til::color{ 0xFF, 0x00, 0x00 }, - til::color{ 0xFF, 0x00, 0x5F }, - til::color{ 0xFF, 0x00, 0x87 }, - til::color{ 0xFF, 0x00, 0xAF }, - til::color{ 0xFF, 0x00, 0xD7 }, - til::color{ 0xFF, 0x00, 0xFF }, - til::color{ 0xFF, 0x5F, 0x00 }, - til::color{ 0xFF, 0x5F, 0x5F }, - til::color{ 0xFF, 0x5F, 0x87 }, - til::color{ 0xFF, 0x5F, 0xAF }, - til::color{ 0xFF, 0x5F, 0xD7 }, - til::color{ 0xFF, 0x5F, 0xFF }, - til::color{ 0xFF, 0x87, 0x00 }, - til::color{ 0xFF, 0x87, 0x5F }, - til::color{ 0xFF, 0x87, 0x87 }, - til::color{ 0xFF, 0x87, 0xAF }, - til::color{ 0xFF, 0x87, 0xD7 }, - til::color{ 0xFF, 0x87, 0xFF }, - til::color{ 0xFF, 0xAF, 0x00 }, - til::color{ 0xFF, 0xAF, 0x5F }, - til::color{ 0xFF, 0xAF, 0x87 }, - til::color{ 0xFF, 0xAF, 0xAF }, - til::color{ 0xFF, 0xAF, 0xD7 }, - til::color{ 0xFF, 0xAF, 0xFF }, - til::color{ 0xFF, 0xD7, 0x00 }, - til::color{ 0xFF, 0xD7, 0x5F }, - til::color{ 0xFF, 0xD7, 0x87 }, - til::color{ 0xFF, 0xD7, 0xAF }, - til::color{ 0xFF, 0xD7, 0xD7 }, - til::color{ 0xFF, 0xD7, 0xFF }, - til::color{ 0xFF, 0xFF, 0x00 }, - til::color{ 0xFF, 0xFF, 0x5F }, - til::color{ 0xFF, 0xFF, 0x87 }, - til::color{ 0xFF, 0xFF, 0xAF }, - til::color{ 0xFF, 0xFF, 0xD7 }, - til::color{ 0xFF, 0xFF, 0xFF }, - til::color{ 0x08, 0x08, 0x08 }, - til::color{ 0x12, 0x12, 0x12 }, - til::color{ 0x1C, 0x1C, 0x1C }, - til::color{ 0x26, 0x26, 0x26 }, - til::color{ 0x30, 0x30, 0x30 }, - til::color{ 0x3A, 0x3A, 0x3A }, - til::color{ 0x44, 0x44, 0x44 }, - til::color{ 0x4E, 0x4E, 0x4E }, - til::color{ 0x58, 0x58, 0x58 }, - til::color{ 0x62, 0x62, 0x62 }, - til::color{ 0x6C, 0x6C, 0x6C }, - til::color{ 0x76, 0x76, 0x76 }, - til::color{ 0x80, 0x80, 0x80 }, - til::color{ 0x8A, 0x8A, 0x8A }, - til::color{ 0x94, 0x94, 0x94 }, - til::color{ 0x9E, 0x9E, 0x9E }, - til::color{ 0xA8, 0xA8, 0xA8 }, - til::color{ 0xB2, 0xB2, 0xB2 }, - til::color{ 0xBC, 0xBC, 0xBC }, - til::color{ 0xC6, 0xC6, 0xC6 }, - til::color{ 0xD0, 0xD0, 0xD0 }, - til::color{ 0xDA, 0xDA, 0xDA }, - til::color{ 0xE4, 0xE4, 0xE4 }, - til::color{ 0xEE, 0xEE, 0xEE }, -}; - -static til::static_map xorgAppColorTable{ - std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, - std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, - std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, - std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, - std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, - std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, - std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, - std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, - std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, - std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, - std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, - std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, - std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, - std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, - std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, - std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, - std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, - std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, - std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, - std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, - std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, - std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, - std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, - std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, - std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, - std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, - std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, - std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, - std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, - std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, - std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, - std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, - std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, - std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, - std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, - std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, - std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, - std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, - std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, - std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, - std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, - std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, - std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, - std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, - std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, - std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, - std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, - std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, - std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, - std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, - std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, - std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, - std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, - std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, - std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, - std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, - std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, - std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, - std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, - std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, - std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, - std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, - std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, - std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, - std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, - std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, - std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, - std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, - std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, - std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, - std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, - std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, - std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, - std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, - std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, - std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, - std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, - std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, - std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, - std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, - std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, - std::pair{ L"antiquewhite1"sv, til::color{ 255, 239, 219 } }, - std::pair{ L"antiquewhite2"sv, til::color{ 238, 223, 204 } }, - std::pair{ L"antiquewhite3"sv, til::color{ 205, 192, 176 } }, - std::pair{ L"antiquewhite4"sv, til::color{ 139, 131, 120 } }, - std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, - std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, - std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, - std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, - std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, - std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, - std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, - std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, - std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, - std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, - std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, - std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, - std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, - std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, - std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, - std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, - std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, - std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, - std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, - std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, - std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, - std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, - std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, - std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, - std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, - std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, - std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, - std::pair{ L"azure1"sv, til::color{ 240, 255, 255 } }, - std::pair{ L"azure2"sv, til::color{ 224, 238, 238 } }, - std::pair{ L"azure3"sv, til::color{ 193, 205, 205 } }, - std::pair{ L"azure4"sv, til::color{ 131, 139, 139 } }, - std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, - std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, - std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, - std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, - std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, - std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, - std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, - std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, - std::pair{ L"blue1"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"blue2"sv, til::color{ 0, 0, 238 } }, - std::pair{ L"blue3"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"blue4"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, - std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, - std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, - std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, - std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, - std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, - std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, - std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, - std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, - std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, - std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, - std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, - std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, - std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, - std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, - std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, - std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, - std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, - std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, - std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, - std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, - std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, - std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, - std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, - std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, - std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, - std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, - std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, - std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, - std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, - std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, - std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, - std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, - std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, - std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, - std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, - std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, - std::pair{ L"cadetblue1"sv, til::color{ 152, 245, 255 } }, - std::pair{ L"cadetblue2"sv, til::color{ 142, 229, 238 } }, - std::pair{ L"cadetblue3"sv, til::color{ 122, 197, 205 } }, - std::pair{ L"cadetblue4"sv, til::color{ 83, 134, 139 } }, - std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, - std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, - std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, - std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, - std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, - std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, - std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, - std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, - std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, - std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, - std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, - std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, - std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, - std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, - std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, - std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, - std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, - std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, - std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, - std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, - std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, - std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, - std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, - std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, - std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, - std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, - std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, - std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, - std::pair{ L"chartreuse1"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"chartreuse2"sv, til::color{ 118, 238, 0 } }, - std::pair{ L"chartreuse3"sv, til::color{ 102, 205, 0 } }, - std::pair{ L"chartreuse4"sv, til::color{ 69, 139, 0 } }, - std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, - std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, - std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, - std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, - std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, - std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, - std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, - std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, - std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, - std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, - std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, - std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, - std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, - std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, - std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, - std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, - std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, - std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, - std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, - std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, - std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, - std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, - std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, - std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, - std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, - std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, - std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, - std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, - std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, - std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, - std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, - std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, - std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, - std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, - std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, - std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, - std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, - std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, - std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, - std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, - std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, - std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, - std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, - std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, - std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, - std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, - std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, - std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, - std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, - std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, - std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, - std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, - std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, - std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, - std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, - std::pair{ L"chocolate1"sv, til::color{ 255, 127, 36 } }, - std::pair{ L"chocolate2"sv, til::color{ 238, 118, 33 } }, - std::pair{ L"chocolate3"sv, til::color{ 205, 102, 29 } }, - std::pair{ L"chocolate4"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, - std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, - std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, - std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, - std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, - std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, - std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, - std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, - std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, - std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, - std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, - std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, - std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, - std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, - std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, - std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, - std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, - std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, - std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, - std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, - std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, - std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, - std::pair{ L"coral1"sv, til::color{ 255, 114, 86 } }, - std::pair{ L"coral2"sv, til::color{ 238, 106, 80 } }, - std::pair{ L"coral3"sv, til::color{ 205, 91, 69 } }, - std::pair{ L"coral4"sv, til::color{ 139, 62, 47 } }, - std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, - std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, - std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, - std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, - std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, - std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, - std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, - std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, - std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, - std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, - std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, - std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, - std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, - std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, - std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, - std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, - std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, - std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, - std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, - std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, - std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, - std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, - std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, - std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, - std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, - std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, - std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, - std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, - std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, - std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, - std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, - std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, - std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, - std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, - std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, - std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, - std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, - std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, - std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, - std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, - std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, - std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, - std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, - std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, - std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, - std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, - std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, - std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, - std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, - std::pair{ L"darkorchid1"sv, til::color{ 191, 62, 255 } }, - std::pair{ L"darkorchid2"sv, til::color{ 178, 58, 238 } }, - std::pair{ L"darkorchid3"sv, til::color{ 154, 50, 205 } }, - std::pair{ L"darkorchid4"sv, til::color{ 104, 34, 139 } }, - std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, - std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, - std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, - std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, - std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, - std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, - std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, - std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, - std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, - std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, - std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, - std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, - std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, - std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, - std::pair{ L"gray10"sv, til::color{ 26, 26, 26 } }, - std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, - std::pair{ L"gray11"sv, til::color{ 28, 28, 28 } }, - std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, - std::pair{ L"gray12"sv, til::color{ 31, 31, 31 } }, - std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, - std::pair{ L"gray13"sv, til::color{ 33, 33, 33 } }, - std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, - std::pair{ L"gray14"sv, til::color{ 36, 36, 36 } }, - std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, - std::pair{ L"gray15"sv, til::color{ 38, 38, 38 } }, - std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, - std::pair{ L"gray16"sv, til::color{ 41, 41, 41 } }, - std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, - std::pair{ L"gray17"sv, til::color{ 43, 43, 43 } }, - std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, - std::pair{ L"gray18"sv, til::color{ 46, 46, 46 } }, - std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, - std::pair{ L"gray19"sv, til::color{ 48, 48, 48 } }, - std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, - std::pair{ L"gray20"sv, til::color{ 51, 51, 51 } }, - std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, - std::pair{ L"gray21"sv, til::color{ 54, 54, 54 } }, - std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, - std::pair{ L"gray22"sv, til::color{ 56, 56, 56 } }, - std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, - std::pair{ L"gray23"sv, til::color{ 59, 59, 59 } }, - std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, - std::pair{ L"gray24"sv, til::color{ 61, 61, 61 } }, - std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, - std::pair{ L"gray25"sv, til::color{ 64, 64, 64 } }, - std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, - std::pair{ L"gray26"sv, til::color{ 66, 66, 66 } }, - std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, - std::pair{ L"gray27"sv, til::color{ 69, 69, 69 } }, - std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, - std::pair{ L"gray28"sv, til::color{ 71, 71, 71 } }, - std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, - std::pair{ L"gray29"sv, til::color{ 74, 74, 74 } }, - std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, - std::pair{ L"gray30"sv, til::color{ 77, 77, 77 } }, - std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, - std::pair{ L"gray31"sv, til::color{ 79, 79, 79 } }, - std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, - std::pair{ L"gray32"sv, til::color{ 82, 82, 82 } }, - std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, - std::pair{ L"gray33"sv, til::color{ 84, 84, 84 } }, - std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, - std::pair{ L"gray34"sv, til::color{ 87, 87, 87 } }, - std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, - std::pair{ L"gray35"sv, til::color{ 89, 89, 89 } }, - std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, - std::pair{ L"gray36"sv, til::color{ 92, 92, 92 } }, - std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, - std::pair{ L"gray37"sv, til::color{ 94, 94, 94 } }, - std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, - std::pair{ L"gray38"sv, til::color{ 97, 97, 97 } }, - std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, - std::pair{ L"gray39"sv, til::color{ 99, 99, 99 } }, - std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, - std::pair{ L"gray40"sv, til::color{ 102, 102, 102 } }, - std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, - std::pair{ L"gray41"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"gray42"sv, til::color{ 107, 107, 107 } }, - std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, - std::pair{ L"gray43"sv, til::color{ 110, 110, 110 } }, - std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, - std::pair{ L"gray44"sv, til::color{ 112, 112, 112 } }, - std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, - std::pair{ L"gray45"sv, til::color{ 115, 115, 115 } }, - std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, - std::pair{ L"gray46"sv, til::color{ 117, 117, 117 } }, - std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, - std::pair{ L"gray47"sv, til::color{ 120, 120, 120 } }, - std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, - std::pair{ L"gray48"sv, til::color{ 122, 122, 122 } }, - std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, - std::pair{ L"gray49"sv, til::color{ 125, 125, 125 } }, - std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, - std::pair{ L"gray50"sv, til::color{ 127, 127, 127 } }, - std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, - std::pair{ L"gray51"sv, til::color{ 130, 130, 130 } }, - std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, - std::pair{ L"gray52"sv, til::color{ 133, 133, 133 } }, - std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, - std::pair{ L"gray53"sv, til::color{ 135, 135, 135 } }, - std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, - std::pair{ L"gray54"sv, til::color{ 138, 138, 138 } }, - std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, - std::pair{ L"gray55"sv, til::color{ 140, 140, 140 } }, - std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, - std::pair{ L"gray56"sv, til::color{ 143, 143, 143 } }, - std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, - std::pair{ L"gray57"sv, til::color{ 145, 145, 145 } }, - std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, - std::pair{ L"gray58"sv, til::color{ 148, 148, 148 } }, - std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, - std::pair{ L"gray59"sv, til::color{ 150, 150, 150 } }, - std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, - std::pair{ L"gray60"sv, til::color{ 153, 153, 153 } }, - std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, - std::pair{ L"gray61"sv, til::color{ 156, 156, 156 } }, - std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, - std::pair{ L"gray62"sv, til::color{ 158, 158, 158 } }, - std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, - std::pair{ L"gray63"sv, til::color{ 161, 161, 161 } }, - std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, - std::pair{ L"gray64"sv, til::color{ 163, 163, 163 } }, - std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, - std::pair{ L"gray65"sv, til::color{ 166, 166, 166 } }, - std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, - std::pair{ L"gray66"sv, til::color{ 168, 168, 168 } }, - std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, - std::pair{ L"gray67"sv, til::color{ 171, 171, 171 } }, - std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, - std::pair{ L"gray68"sv, til::color{ 173, 173, 173 } }, - std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, - std::pair{ L"gray69"sv, til::color{ 176, 176, 176 } }, - std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, - std::pair{ L"gray70"sv, til::color{ 179, 179, 179 } }, - std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, - std::pair{ L"gray71"sv, til::color{ 181, 181, 181 } }, - std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, - std::pair{ L"gray72"sv, til::color{ 184, 184, 184 } }, - std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, - std::pair{ L"gray73"sv, til::color{ 186, 186, 186 } }, - std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, - std::pair{ L"gray74"sv, til::color{ 189, 189, 189 } }, - std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, - std::pair{ L"gray75"sv, til::color{ 191, 191, 191 } }, - std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, - std::pair{ L"gray76"sv, til::color{ 194, 194, 194 } }, - std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, - std::pair{ L"gray77"sv, til::color{ 196, 196, 196 } }, - std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, - std::pair{ L"gray78"sv, til::color{ 199, 199, 199 } }, - std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, - std::pair{ L"gray79"sv, til::color{ 201, 201, 201 } }, - std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, - std::pair{ L"gray80"sv, til::color{ 204, 204, 204 } }, - std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, - std::pair{ L"gray81"sv, til::color{ 207, 207, 207 } }, - std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, - std::pair{ L"gray82"sv, til::color{ 209, 209, 209 } }, - std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, - std::pair{ L"gray83"sv, til::color{ 212, 212, 212 } }, - std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, - std::pair{ L"gray84"sv, til::color{ 214, 214, 214 } }, - std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, - std::pair{ L"gray85"sv, til::color{ 217, 217, 217 } }, - std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, - std::pair{ L"gray86"sv, til::color{ 219, 219, 219 } }, - std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, - std::pair{ L"gray87"sv, til::color{ 222, 222, 222 } }, - std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, - std::pair{ L"gray88"sv, til::color{ 224, 224, 224 } }, - std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, - std::pair{ L"gray89"sv, til::color{ 227, 227, 227 } }, - std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, - std::pair{ L"gray90"sv, til::color{ 229, 229, 229 } }, - std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, - std::pair{ L"gray91"sv, til::color{ 232, 232, 232 } }, - std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, - std::pair{ L"gray92"sv, til::color{ 235, 235, 235 } }, - std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, - std::pair{ L"gray93"sv, til::color{ 237, 237, 237 } }, - std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, - std::pair{ L"gray94"sv, til::color{ 240, 240, 240 } }, - std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, - std::pair{ L"gray95"sv, til::color{ 242, 242, 242 } }, - std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, - std::pair{ L"gray96"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"gray97"sv, til::color{ 247, 247, 247 } }, - std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, - std::pair{ L"gray98"sv, til::color{ 250, 250, 250 } }, - std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, - std::pair{ L"gray99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, - std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, - std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, - std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, - std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, - std::pair{ L"teal"sv, til::color{ 0, 128, 128 } } -}; - // Function Description: // - Creates a String representation of a guid, in the format // "{12345678-ABCD-EF12-3456-7890ABCDEF12}" @@ -1058,28 +99,6 @@ til::color Utils::ColorFromHexString(const std::string_view str) return til::color{ r, g, b }; } -// Function Description: -// - Parses a color from a string based on the XOrg app color name table. -// Arguments: -// - str: a string representation of the color name to parse -// - color: a color to write the result to -// Return Value: -// - True if the string is successfully parsed. False otherwise. -bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) -{ - std::wstring key(wstr); - std::transform(key.begin(), key.end(), key.begin(), std::towlower); - key.erase(std::remove_if(key.begin(), key.end(), std::iswspace), key.end()); - const auto iter = xorgAppColorTable.find(key); - if (iter == xorgAppColorTable.end()) - { - return false; - } - - color = iter->second; - return true; -} - // Routine Description: // - Shorthand check if a handle value is null or invalid. // Arguments: @@ -1091,63 +110,6 @@ bool Utils::IsValidHandle(const HANDLE handle) noexcept return handle != nullptr && handle != INVALID_HANDLE_VALUE; } -// Function Description: -// - Fill the first 16 entries of a given color table with the Campbell color -// scheme, in the ANSI/VT RGB order. -// Arguments: -// - table: a color table with at least 16 entries -// Return Value: -// - , throws if the table has less that 16 entries -void Utils::InitializeCampbellColorTable(const gsl::span table) -{ - THROW_HR_IF(E_INVALIDARG, table.size() < 16); - - std::copy(campbellColorTable.begin(), campbellColorTable.end(), table.begin()); -} - -// Function Description: -// - Fill the first 16 entries of a given color table with the Campbell color -// scheme, in the Windows BGR order. -// Arguments: -// - table: a color table with at least 16 entries -// Return Value: -// - , throws if the table has less that 16 entries -void Utils::InitializeCampbellColorTableForConhost(const gsl::span table) -{ - THROW_HR_IF(E_INVALIDARG, table.size() < 16); - InitializeCampbellColorTable(table); - SwapANSIColorOrderForConhost(table); -} - -// Function Description: -// - modifies in-place the given color table from ANSI (RGB) order to Console order (BRG). -// Arguments: -// - table: a color table with at least 16 entries -// Return Value: -// - , throws if the table has less that 16 entries -void Utils::SwapANSIColorOrderForConhost(const gsl::span table) -{ - THROW_HR_IF(E_INVALIDARG, table.size() < 16); - std::swap(til::at(table, 1), til::at(table, 4)); - std::swap(til::at(table, 3), til::at(table, 6)); - std::swap(til::at(table, 9), til::at(table, 12)); - std::swap(til::at(table, 11), til::at(table, 14)); -} - -// Function Description: -// - Fill the first 255 entries of a given color table with the default values -// of a full 256-color table -// Arguments: -// - table: a color table with at least 256 entries -// Return Value: -// - , throws if the table has less that 256 entries -void Utils::Initialize256ColorTable(const gsl::span table) -{ - THROW_HR_IF(E_INVALIDARG, table.size() < 256); - - std::copy(standardXterm256ColorTable.begin(), standardXterm256ColorTable.end(), table.begin()); -} - // Function Description: // - Generate a Version 5 UUID (specified in RFC4122 4.3) // v5 UUIDs are stable given the same namespace and "name". From 4d2b204ed6d66665cf0e3da709bd508e12f0b2a6 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 09:47:09 +0800 Subject: [PATCH 25/43] Move XParseColor things into utils.cpp --- .../actions/spell-check/dictionary/apis.txt | 2 + .../parser/OutputStateMachineEngine.cpp | 248 +----------------- .../parser/OutputStateMachineEngine.hpp | 5 - .../parser/ut_parser/OutputEngineTest.cpp | 104 -------- src/types/colorTable.cpp | 10 +- src/types/inc/colorTable.hpp | 4 +- src/types/inc/utils.hpp | 3 + src/types/ut_types/UtilsTests.cpp | 90 +++++++ src/types/utils.cpp | 214 +++++++++++++++ 9 files changed, 324 insertions(+), 356 deletions(-) diff --git a/.github/actions/spell-check/dictionary/apis.txt b/.github/actions/spell-check/dictionary/apis.txt index 6e450ee12bb..37997d31a4c 100644 --- a/.github/actions/spell-check/dictionary/apis.txt +++ b/.github/actions/spell-check/dictionary/apis.txt @@ -53,3 +53,5 @@ userenv wcstoui XDocument XElement +XParseColor + diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 8037dce5586..e4b0b45ca3f 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -8,7 +8,7 @@ #include "base64.hpp" #include "ascii.hpp" -#include "../../types/inc/colorTable.hpp" +#include "../../types/inc/utils.hpp" using namespace Microsoft::Console; using namespace Microsoft::Console::VirtualTerminal; @@ -1348,36 +1348,6 @@ bool OutputStateMachineEngine::DispatchIntermediatesFromEscape() const noexcept return false; } -// Routine Description: -// - Converts a hex character to its equivalent integer value. -// Arguments: -// - wch - Character to convert. -// - value - receives the int value of the char -// Return Value: -// - true iff the character is a hex character. -bool OutputStateMachineEngine::s_HexToUint(const wchar_t wch, - unsigned int& value) noexcept -{ - value = 0; - bool success = false; - if (wch >= L'0' && wch <= L'9') - { - value = wch - L'0'; - success = true; - } - else if (wch >= L'A' && wch <= L'F') - { - value = (wch - L'A') + 10; - success = true; - } - else if (wch >= L'a' && wch <= L'f') - { - value = (wch - L'a') + 10; - success = true; - } - return success; -} - #pragma warning(push) #pragma warning(disable : 26497) // We don't use any of these "constexprable" functions in that fashion @@ -1392,208 +1362,8 @@ static constexpr bool _isNumber(const wchar_t wch) noexcept return wch >= L'0' && wch <= L'9'; // 0x30 - 0x39 } -// Routine Description: -// - Determines if a character is a valid hex character, 0-9a-fA-F. -// Arguments: -// - wch - Character to check. -// Return Value: -// - True if it is. False if it isn't. -static constexpr bool _isHexNumber(const wchar_t wch) noexcept -{ - return (wch >= L'0' && wch <= L'9') || // 0x30 - 0x39 - (wch >= L'A' && wch <= L'F') || - (wch >= L'a' && wch <= L'f'); -} - #pragma warning(pop) -// Routine Description: -// - Given a color spec string, attempts to parse the color that's encoded. -// The supported specs currently are the following: -// spec1: a color in the following format: -// "rgb://" -// spec2: a color in the following format: -// "#" -// -// In both specs, is a value contains up to 4 hex digits, upper or lower case. -// Arguments: -// - string - The string containing the color spec string to parse. -// - rgb - receives the color that we parsed -// Return Value: -// - True if a color was successfully parsed -bool OutputStateMachineEngine::s_ParseColorSpec(const std::wstring_view string, - DWORD& rgb) noexcept -try -{ - bool foundRGBColorSpec = false; - bool foundValidColorSpec = false; - - bool isSharpSignFormat = false; - size_t rgbHexDigitCount = 0; - std::array colorValues = { 0 }; - std::array parameterValues = { 0 }; - bool success = false; - const auto stringSize = string.size(); - - // First we look for "rgb:" - // Other colorspaces are theoretically possible, but we don't support them. - auto curr = string.cbegin(); - if (stringSize > 4) - { - auto prefix = std::wstring(string.substr(0, 4)); - std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); - if (prefix.compare(L"rgb:") == 0) - { - // If all the components have the same digit count, we can have one of the following formats: - // 9 "rgb:h/h/h" - // 12 "rgb:hh/hh/hh" - // 15 "rgb:hhh/hhh/hhh" - // 18 "rgb:hhhh/hhhh/hhhh" - // Note that the component sizes aren't required to be the same. - // Anything in between is also valid, e.g. "rgb:h/hh/h" and "rgb:h/hh/hhh". - // Any fewer cannot be valid, and any more will be too many. Return early in this case. - if (stringSize < 9 || stringSize > 18) - { - return false; - } - - foundRGBColorSpec = true; - - std::advance(curr, 4); - } - } - - // Try the sharp sign format. - if (!foundRGBColorSpec && stringSize > 1) - { - const auto prefix = string.substr(0, 1); - if (prefix.compare(L"#") == 0) - { - // We can have one of the following formats: - // 4 "#hhh" - // 7 "#hhhhhh" - // 10 "#hhhhhhhhh" - // 13 "#hhhhhhhhhhhh" - // Any other cases will be invalid. Return early in this case. - if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) - { - return false; - } - - isSharpSignFormat = true; - foundRGBColorSpec = true; - rgbHexDigitCount = (stringSize - 1) / 3; - - std::advance(curr, 1); - } - } - - // Try the XOrg app color name. - if (!foundRGBColorSpec) - { - til::color color; - success = Utils::ColorFromXOrgAppColorName(string, color); - if (success) - { - rgb = color; - } - } - - if (foundRGBColorSpec) - { - for (size_t component = 0; component < 3; component++) - { - bool foundColor = false; - auto& parameterValue = til::at(parameterValues, component); - // For "sharp sign" format, the rgbHexDigitCount is known. - // For "rgb:" format, colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's - const auto iteration = isSharpSignFormat ? rgbHexDigitCount : 4; - for (size_t i = 0; i < iteration && curr < string.cend(); i++) - { - const wchar_t wch = *curr++; - - parameterValue *= 16; - unsigned int intVal = 0; - const auto ret = s_HexToUint(wch, intVal); - if (!ret) - { - // Encountered something weird oh no - return false; - } - - parameterValue += intVal; - - if (isSharpSignFormat) - { - // If we get this far, any number can be seen as a valid part - // of this component. - foundColor = true; - - if (i >= rgbHexDigitCount) - { - // Successfully parsed this component. Start the next one. - break; - } - } - else - { - // Record the hex digit count of the current component. - rgbHexDigitCount = i + 1; - - // If this is the first 2 component... - if (component < 2 && curr < string.cend() && *curr == L'/') - { - // ...and we have successfully parsed this component, we need - // to skip the delimiter before starting the next one. - curr++; - foundColor = true; - break; - } - // Or we have reached the end of the string... - else if (curr >= string.cend()) - { - // ...meaning that this is the last component. We're not going to - // see any delimiter. We can just break out. - foundColor = true; - break; - } - } - } - - if (!foundColor) - { - // Indicates there was some error parsing color. - return false; - } - - // Calculate the actual color value based on the hex digit count. - auto& colorValue = til::at(colorValues, component); - const auto scaleMultiplier = isSharpSignFormat ? 0x10 : 0x11; - const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); - colorValue = parameterValue * scaleMultiplier / scaleDivisor; - } - - if (curr >= string.cend()) - { - // We're at the end of the string and we have successfully parsed the color. - foundValidColorSpec = true; - } - } - - // Only if we find a valid colorspec can we pass it out successfully. - if (foundValidColorSpec) - { - DWORD color = RGB(LOBYTE(colorValues.at(0)), - LOBYTE(colorValues.at(1)), - LOBYTE(colorValues.at(2))); - - rgb = color; - success = true; - } - return success; -} -CATCH_LOG_RETURN_FALSE() - // Routine Description: // - OSC 4 ; c ; spec ST // c: the index of the ansi color table @@ -1647,13 +1417,13 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri // Other colorspaces are theoretically possible, but we don't support them. if (foundTableIndex) { - DWORD color = 0; - success = s_ParseColorSpec(string.substr(current), color); + std::optional colorOptional = Utils::ColorForXParseColorSpec(string.substr(current)); - if (success) + if (colorOptional.has_value()) { tableIndex = _TableIndex; - rgb = color; + rgb = colorOptional.value(); + success = true; } } @@ -1715,12 +1485,12 @@ bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, bool success = false; - DWORD color = 0; - success = s_ParseColorSpec(string, color); + std::optional colorOptional = Utils::ColorForXParseColorSpec(string); - if (success) + if (colorOptional.has_value()) { - rgb = color; + rgb = colorOptional.value(); + success = true; } return success; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 770ad61020b..d22d86583bb 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -227,15 +227,10 @@ namespace Microsoft::Console::VirtualTerminal bool _GetWindowManipulationType(const gsl::span parameters, unsigned int& function) const noexcept; - static bool s_HexToUint(const wchar_t wch, - unsigned int& value) noexcept; bool _GetOscSetColorTable(const std::wstring_view string, size_t& tableIndex, DWORD& rgb) const noexcept; - static bool s_ParseColorSpec(const std::wstring_view string, - DWORD& rgb) noexcept; - bool _GetOscSetColor(const std::wstring_view string, DWORD& rgb) const noexcept; diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index d203645cde0..11b4fe1c054 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -596,110 +596,6 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final VERIFY_ARE_EQUAL(mach._state, StateMachine::VTStates::Ground); } - TEST_METHOD(TestOscParseColorSpec) - { - DWORD color = 0; - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"RGB:1/1/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:111/1/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1111/1/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/11/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/111/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1111/1", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/11", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/111", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1111", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x11, 0x11)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/4", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x44)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/45", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x45)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/23/456", color)); - VERIFY_ARE_EQUAL(color, RGB(0x11, 0x23, 0x45)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/34/5", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x55)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/34/56", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x56)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/345/67", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x67)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:12/345/678", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x67)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/456/789", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/4564/789", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:123/4564/7897", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1231/4564/7897", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#111", color)); - VERIFY_ARE_EQUAL(color, RGB(0x10, 0x10, 0x10)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x34, 0x56)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123456789", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"#123145647897", color)); - VERIFY_ARE_EQUAL(color, RGB(0x12, 0x45, 0x78)); - - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"orange", color)); - VERIFY_ARE_EQUAL(color, RGB(255, 165, 0)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"dark green", color)); - VERIFY_ARE_EQUAL(color, RGB(0, 100, 0)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"medium sea green", color)); - VERIFY_ARE_EQUAL(color, RGB(60, 179, 113)); - VERIFY_IS_TRUE(OutputStateMachineEngine::s_ParseColorSpec(L"LightYellow", color)); - VERIFY_ARE_EQUAL(color, RGB(255, 255, 224)); - - // Invalid sequences. - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"r:", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rg:", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb://", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:///", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/11/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:1/1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:this/is/invalid", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgba:1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgbi:1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"cmyk:1/1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb#111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"rgb:#111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#11111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#11/1/", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#/1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#rgb:1/1/1", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#111invalid", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#1111111111111111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"#invalid111", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"12/34/56", color)); - VERIFY_IS_FALSE(OutputStateMachineEngine::s_ParseColorSpec(L"123456", color)); - } - TEST_METHOD(TestDcsEntry) { auto dispatch = std::make_unique(); diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index a213a6afd6e..258d75e40d0 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -1026,10 +1026,9 @@ void Utils::Initialize256ColorTable(const gsl::span table) // - Parses a color from a string based on the XOrg app color name table. // Arguments: // - str: a string representation of the color name to parse -// - color: a color to write the result to // Return Value: -// - True if the string is successfully parsed. False otherwise. -bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color) +// - An optional color which contains value if a color was successfully parsed +std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) { std::wstring key(wstr); std::transform(key.begin(), key.end(), key.begin(), std::towlower); @@ -1037,9 +1036,8 @@ bool Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& const auto iter = xorgAppColorTable.find(key); if (iter == xorgAppColorTable.end()) { - return false; + return std::nullopt; } - color = iter->second; - return true; + return iter->second; } diff --git a/src/types/inc/colorTable.hpp b/src/types/inc/colorTable.hpp index 053e84140f2..dd6cd0de484 100644 --- a/src/types/inc/colorTable.hpp +++ b/src/types/inc/colorTable.hpp @@ -2,7 +2,7 @@ Copyright (c) Microsoft Corporation Module Name: -- viewport.hpp +- colorTable.hpp Abstract: - Helper for color tables @@ -17,7 +17,7 @@ namespace Microsoft::Console::Utils void SwapANSIColorOrderForConhost(const gsl::span table); void Initialize256ColorTable(const gsl::span table); - bool ColorFromXOrgAppColorName(const std::wstring_view wstr, til::color& color); + std::optional ColorFromXOrgAppColorName(const std::wstring_view wstr); // Function Description: // - Fill the alpha byte of the colors in a given color table with the given value. diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index 20fd2100848..c6abc844978 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -45,6 +45,9 @@ namespace Microsoft::Console::Utils std::string ColorToHexString(const til::color color); til::color ColorFromHexString(const std::string_view wstr); + std::optional ColorForXParseColorSpec(const std::wstring_view wstr) noexcept; + + bool HexToUint(const wchar_t wch, unsigned int& value) noexcept; constexpr uint16_t EndianSwap(uint16_t value) { diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 16c31473c80..af686074839 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -22,6 +22,10 @@ class UtilsTests TEST_METHOD(TestClampToShortMax); TEST_METHOD(TestSwapColorPalette); TEST_METHOD(TestGuidToString); + TEST_METHOD(TestColorFromXParseColorSpec); + + void _VerifyXParseColorResult(const std::wstring_view wstr, DWORD colorValue); + void _VerfiyXParserColorInvalid(const std::wstring_view wstr); }; void UtilsTests::TestClampToShortMax() @@ -90,3 +94,89 @@ void UtilsTests::TestGuidToString() VERIFY_ARE_EQUAL(constantGuidString.size(), generatedGuid.size()); VERIFY_ARE_EQUAL(constantGuidString, generatedGuid); } + +void UtilsTests::TestColorFromXParseColorSpec() +{ + _VerifyXParseColorResult(L"rgb:1/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"RGB:1/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:111/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1111/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/11/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/111/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/1111/1", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/1/11", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/1/111", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/1/1111", RGB(0x11, 0x11, 0x11)); + _VerifyXParseColorResult(L"rgb:1/23/4", RGB(0x11, 0x23, 0x44)); + _VerifyXParseColorResult(L"rgb:1/23/45", RGB(0x11, 0x23, 0x45)); + _VerifyXParseColorResult(L"rgb:1/23/456", RGB(0x11, 0x23, 0x45)); + _VerifyXParseColorResult(L"rgb:12/34/5", RGB(0x12, 0x34, 0x55)); + _VerifyXParseColorResult(L"rgb:12/34/56", RGB(0x12, 0x34, 0x56)); + _VerifyXParseColorResult(L"rgb:12/345/67", RGB(0x12, 0x34, 0x67)); + _VerifyXParseColorResult(L"rgb:12/345/678", RGB(0x12, 0x34, 0x67)); + _VerifyXParseColorResult(L"rgb:123/456/789", RGB(0x12, 0x45, 0x78)); + _VerifyXParseColorResult(L"rgb:123/4564/789", RGB(0x12, 0x45, 0x78)); + _VerifyXParseColorResult(L"rgb:123/4564/7897", RGB(0x12, 0x45, 0x78)); + _VerifyXParseColorResult(L"rgb:1231/4564/7897", RGB(0x12, 0x45, 0x78)); + + _VerifyXParseColorResult(L"#111", RGB(0x10, 0x10, 0x10)); + _VerifyXParseColorResult(L"#123456", RGB(0x12, 0x34, 0x56)); + _VerifyXParseColorResult(L"#123456789", RGB(0x12, 0x45, 0x78)); + _VerifyXParseColorResult(L"#123145647897", RGB(0x12, 0x45, 0x78)); + + _VerifyXParseColorResult(L"orange", RGB(255, 165, 0)); + _VerifyXParseColorResult(L"dark green", RGB(0, 100, 0)); + _VerifyXParseColorResult(L"medium sea green", RGB(60, 179, 113)); + _VerifyXParseColorResult(L"LightYellow", RGB(255, 255, 224)); + + // Invalid sequences. + _VerfiyXParserColorInvalid(L""); + _VerfiyXParserColorInvalid(L"r:"); + _VerfiyXParserColorInvalid(L"rg:"); + _VerfiyXParserColorInvalid(L"rgb:"); + _VerfiyXParserColorInvalid(L"rgb:/"); + _VerfiyXParserColorInvalid(L"rgb://"); + _VerfiyXParserColorInvalid(L"rgb:///"); + _VerfiyXParserColorInvalid(L"rgb:1"); + _VerfiyXParserColorInvalid(L"rgb:1/"); + _VerfiyXParserColorInvalid(L"rgb:/1"); + _VerfiyXParserColorInvalid(L"rgb:1/1"); + _VerfiyXParserColorInvalid(L"rgb:1/1/"); + _VerfiyXParserColorInvalid(L"rgb:1/11/"); + _VerfiyXParserColorInvalid(L"rgb:/1/1"); + _VerfiyXParserColorInvalid(L"rgb:1/1/1/"); + _VerfiyXParserColorInvalid(L"rgb:1/1/1/1"); + _VerfiyXParserColorInvalid(L"rgb:this/is/invalid"); + _VerfiyXParserColorInvalid(L"rgba:1/1/1"); + _VerfiyXParserColorInvalid(L"rgbi:1/1/1"); + _VerfiyXParserColorInvalid(L"cmyk:1/1/1/1"); + _VerfiyXParserColorInvalid(L"rgb#111"); + _VerfiyXParserColorInvalid(L"rgb:#111"); + _VerfiyXParserColorInvalid(L"#"); + _VerfiyXParserColorInvalid(L"#1"); + _VerfiyXParserColorInvalid(L"#1111"); + _VerfiyXParserColorInvalid(L"#11111"); + _VerfiyXParserColorInvalid(L"#1/1/1"); + _VerfiyXParserColorInvalid(L"#11/1/"); + _VerfiyXParserColorInvalid(L"#1111111"); + _VerfiyXParserColorInvalid(L"#/1/1/1"); + _VerfiyXParserColorInvalid(L"#rgb:1/1/1"); + _VerfiyXParserColorInvalid(L"#111invalid"); + _VerfiyXParserColorInvalid(L"#1111111111111111"); + _VerfiyXParserColorInvalid(L"#invalid111"); + _VerfiyXParserColorInvalid(L"12/34/56"); + _VerfiyXParserColorInvalid(L"123456"); +} + +void UtilsTests::_VerifyXParseColorResult(const std::wstring_view wstr, DWORD colorValue) +{ + std::optional color = ColorForXParseColorSpec(wstr); + VERIFY_IS_TRUE(color.has_value()); + VERIFY_ARE_EQUAL((COLORREF)color.value(), colorValue); +} + +void UtilsTests::_VerfiyXParserColorInvalid(const std::wstring_view wstr) +{ + std::optional color = ColorForXParseColorSpec(wstr); + VERIFY_IS_FALSE(color.has_value()); +} diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 90bcd4033c7..b543bf7afa1 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -3,6 +3,7 @@ #include "precomp.h" #include "inc/utils.hpp" +#include "inc/colorTable.hpp" using namespace Microsoft::Console; @@ -99,6 +100,219 @@ til::color Utils::ColorFromHexString(const std::string_view str) return til::color{ r, g, b }; } +// Routine Description: +// - Given a color spec string, attempts to parse the color that's encoded. +// Based on the XParseColor documentation, the supported specs currently are the following: +// spec1: a color in the following format: +// "rgb://" +// spec2: a color in the following format: +// "#" +// spec3: The XOrg app color names: +// "orange" +// +// In the first two specs, is a value contains up to 4 hex digits, upper or lower case. +// Arguments: +// - string - The string containing the color spec string to parse. +// Return Value: +// - An optional color which contains value if a color was successfully parsed +std::optional Utils::ColorForXParseColorSpec(const std::wstring_view string) noexcept +try +{ + bool foundXParseColorSpec = false; + bool foundValidColorSpec = false; + + bool isSharpSignFormat = false; + size_t rgbHexDigitCount = 0; + std::array colorValues = { 0 }; + std::array parameterValues = { 0 }; + const auto stringSize = string.size(); + + // First we look for "rgb:" + // Other colorspaces are theoretically possible, but we don't support them. + auto curr = string.cbegin(); + if (stringSize > 4) + { + auto prefix = std::wstring(string.substr(0, 4)); + std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); + if (prefix.compare(L"rgb:") == 0) + { + // If all the components have the same digit count, we can have one of the following formats: + // 9 "rgb:h/h/h" + // 12 "rgb:hh/hh/hh" + // 15 "rgb:hhh/hhh/hhh" + // 18 "rgb:hhhh/hhhh/hhhh" + // Note that the component sizes aren't required to be the same. + // Anything in between is also valid, e.g. "rgb:h/hh/h" and "rgb:h/hh/hhh". + // Any fewer cannot be valid, and any more will be too many. Return early in this case. + if (stringSize < 9 || stringSize > 18) + { + return std::nullopt; + } + + foundXParseColorSpec = true; + + std::advance(curr, 4); + } + } + + // Try the sharp sign format. + if (!foundXParseColorSpec && stringSize > 1) + { + const auto prefix = string.substr(0, 1); + if (til::at(prefix, 0) == L'#') + { + // We can have one of the following formats: + // 4 "#hhh" + // 7 "#hhhhhh" + // 10 "#hhhhhhhhh" + // 13 "#hhhhhhhhhhhh" + // Any other cases will be invalid. Return early in this case. + if (!(stringSize == 4 || stringSize == 7 || stringSize == 10 || stringSize == 13)) + { + return std::nullopt; + } + + isSharpSignFormat = true; + foundXParseColorSpec = true; + rgbHexDigitCount = (stringSize - 1) / 3; + + std::advance(curr, 1); + } + } + + // Try the XOrg app color name. + if (!foundXParseColorSpec) + { + std::optional color = Utils::ColorFromXOrgAppColorName(string); + if (color.has_value()) + { + return color.value(); + } + } + + if (foundXParseColorSpec) + { + for (size_t component = 0; component < 3; component++) + { + bool foundColor = false; + auto& parameterValue = til::at(parameterValues, component); + // For "sharp sign" format, the rgbHexDigitCount is known. + // For "rgb:" format, colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's + const auto iteration = isSharpSignFormat ? rgbHexDigitCount : 4; + for (size_t i = 0; i < iteration && curr < string.cend(); i++) + { + const wchar_t wch = *curr++; + + parameterValue *= 16; + unsigned int intVal = 0; + const auto ret = HexToUint(wch, intVal); + if (!ret) + { + // Encountered something weird oh no + return std::nullopt; + } + + parameterValue += intVal; + + if (isSharpSignFormat) + { + // If we get this far, any number can be seen as a valid part + // of this component. + foundColor = true; + + if (i >= rgbHexDigitCount) + { + // Successfully parsed this component. Start the next one. + break; + } + } + else + { + // Record the hex digit count of the current component. + rgbHexDigitCount = i + 1; + + // If this is the first 2 component... + if (component < 2 && curr < string.cend() && *curr == L'/') + { + // ...and we have successfully parsed this component, we need + // to skip the delimiter before starting the next one. + curr++; + foundColor = true; + break; + } + // Or we have reached the end of the string... + else if (curr >= string.cend()) + { + // ...meaning that this is the last component. We're not going to + // see any delimiter. We can just break out. + foundColor = true; + break; + } + } + } + + if (!foundColor) + { + // Indicates there was some error parsing color. + return std::nullopt; + } + + // Calculate the actual color value based on the hex digit count. + auto& colorValue = til::at(colorValues, component); + const auto scaleMultiplier = isSharpSignFormat ? 0x10 : 0x11; + const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); + colorValue = parameterValue * scaleMultiplier / scaleDivisor; + } + + if (curr >= string.cend()) + { + // We're at the end of the string and we have successfully parsed the color. + foundValidColorSpec = true; + } + } + + // Only if we find a valid colorspec can we pass it out successfully. + if (foundValidColorSpec) + { + return til::color(LOBYTE(colorValues.at(0)), + LOBYTE(colorValues.at(1)), + LOBYTE(colorValues.at(2))); + } + + return std::nullopt; +} +CATCH_FAIL_FAST() + +// Routine Description: +// - Converts a hex character to its equivalent integer value. +// Arguments: +// - wch - Character to convert. +// - value - receives the int value of the char +// Return Value: +// - true iff the character is a hex character. +bool Utils::HexToUint(const wchar_t wch, + unsigned int& value) noexcept +{ + value = 0; + bool success = false; + if (wch >= L'0' && wch <= L'9') + { + value = wch - L'0'; + success = true; + } + else if (wch >= L'A' && wch <= L'F') + { + value = (wch - L'A') + 10; + success = true; + } + else if (wch >= L'a' && wch <= L'f') + { + value = (wch - L'a') + 10; + success = true; + } + return success; +} + // Routine Description: // - Shorthand check if a handle value is null or invalid. // Arguments: From d09549a8a9dffda8f05fab78c8a2d858d3debdff Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 16 Sep 2020 13:24:32 +0800 Subject: [PATCH 26/43] Trying to 'sort' things out --- .../actions/spell-check/dictionary/apis.txt | 3 +- .../parser/OutputStateMachineEngine.cpp | 16 +- .../parser/OutputStateMachineEngine.hpp | 4 - src/types/colorTable.cpp | 1104 ++++++++--------- src/types/inc/utils.hpp | 3 +- src/types/ut_types/UtilsTests.cpp | 150 +-- src/types/utils.cpp | 44 +- 7 files changed, 664 insertions(+), 660 deletions(-) diff --git a/.github/actions/spell-check/dictionary/apis.txt b/.github/actions/spell-check/dictionary/apis.txt index 37997d31a4c..82e282d8f8d 100644 --- a/.github/actions/spell-check/dictionary/apis.txt +++ b/.github/actions/spell-check/dictionary/apis.txt @@ -53,5 +53,4 @@ userenv wcstoui XDocument XElement -XParseColor - +XParse diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index e4b0b45ca3f..8d16ff76db1 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1367,9 +1367,7 @@ static constexpr bool _isNumber(const wchar_t wch) noexcept // Routine Description: // - OSC 4 ; c ; spec ST // c: the index of the ansi color table -// spec: a color in the following format: -// "rgb://" -// where is two hex digits +// spec: The colors are specified by name or RGB specification as per XParseColor // Arguments: // - string - the Osc String to parse // - tableIndex - receives the table index @@ -1413,11 +1411,10 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri break; } } - // Now we look for the actual RGB value. - // Other colorspaces are theoretically possible, but we don't support them. + // Now we try to parse the RGB color value from the string. if (foundTableIndex) { - std::optional colorOptional = Utils::ColorForXParseColorSpec(string.substr(current)); + std::optional colorOptional = Utils::ColorFromXTermColor(string.substr(current)); if (colorOptional.has_value()) { @@ -1470,9 +1467,8 @@ bool OutputStateMachineEngine::_ParseHyperlink(const std::wstring_view string, // Routine Description: // - OSC 10, 11, 12 ; spec ST -// spec: a color in the following format: -// "rgb://" -// where is two hex digits +// spec: The colors are specified by name or RGB specification as per XParseColor +// // Arguments: // - string - the Osc String to parse // - rgb - receives the color that we parsed in the format: 0x00BBGGRR @@ -1485,7 +1481,7 @@ bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, bool success = false; - std::optional colorOptional = Utils::ColorForXParseColorSpec(string); + std::optional colorOptional = Utils::ColorFromXTermColor(string); if (colorOptional.has_value()) { diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index d22d86583bb..310cab1f4d2 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -252,9 +252,5 @@ namespace Microsoft::Console::VirtualTerminal std::wstring& uri) const; void _ClearLastChar() noexcept; - -#ifdef UNIT_TESTING - friend class OutputEngineTest; -#endif }; } diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index 258d75e40d0..e5d20587813 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -287,682 +287,682 @@ static constexpr std::array standardXterm256ColorTable{ }; static til::static_map xorgAppColorTable{ - std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, - std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, - std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, - std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, - std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, - std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, - std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, - std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, - std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, - std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, - std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, - std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, - std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, - std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, - std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, - std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, - std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, - std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, - std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, - std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, - std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, - std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, - std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, - std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, - std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, - std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, - std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, - std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, - std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, - std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, - std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, - std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, - std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, - std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, - std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, - std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, - std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, - std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, - std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, - std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, - std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, - std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, - std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, - std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, - std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, - std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, - std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, - std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, - std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, - std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, - std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, - std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, - std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, - std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, - std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, - std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, - std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, - std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, - std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, - std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, - std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, - std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, - std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, - std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, - std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, - std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, - std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, - std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, - std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, - std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, - std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, - std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, - std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, - std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, - std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, - std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, - std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, - std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, - std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, - std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, std::pair{ L"antiquewhite1"sv, til::color{ 255, 239, 219 } }, std::pair{ L"antiquewhite2"sv, til::color{ 238, 223, 204 } }, std::pair{ L"antiquewhite3"sv, til::color{ 205, 192, 176 } }, std::pair{ L"antiquewhite4"sv, til::color{ 139, 131, 120 } }, - std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, - std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, - std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, - std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, - std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, - std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, - std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, - std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, - std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, - std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, - std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, - std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, - std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, - std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, - std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, - std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, - std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, - std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, - std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, - std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, - std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, - std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, - std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, - std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, - std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, - std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, - std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, + std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, + std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, + std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, std::pair{ L"azure1"sv, til::color{ 240, 255, 255 } }, std::pair{ L"azure2"sv, til::color{ 224, 238, 238 } }, std::pair{ L"azure3"sv, til::color{ 193, 205, 205 } }, std::pair{ L"azure4"sv, til::color{ 131, 139, 139 } }, - std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, - std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, - std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, - std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, - std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, - std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, - std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, - std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, + std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, + std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, + std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, + std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, + std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, + std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, std::pair{ L"blue1"sv, til::color{ 0, 0, 255 } }, std::pair{ L"blue2"sv, til::color{ 0, 0, 238 } }, std::pair{ L"blue3"sv, til::color{ 0, 0, 205 } }, std::pair{ L"blue4"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, - std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, - std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, - std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, - std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, - std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, - std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, - std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, - std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, - std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, - std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, - std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, - std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, - std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, - std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, - std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, - std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, - std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, - std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, - std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, - std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, - std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, - std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, - std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, - std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, - std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, - std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, - std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, - std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, - std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, - std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, - std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, - std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, - std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, - std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, - std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, - std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, + std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, + std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, + std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, + std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, + std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, + std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, + std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, + std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, + std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, + std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, + std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, std::pair{ L"cadetblue1"sv, til::color{ 152, 245, 255 } }, std::pair{ L"cadetblue2"sv, til::color{ 142, 229, 238 } }, std::pair{ L"cadetblue3"sv, til::color{ 122, 197, 205 } }, std::pair{ L"cadetblue4"sv, til::color{ 83, 134, 139 } }, - std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, - std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, - std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, - std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, - std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, - std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, - std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, - std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, - std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, - std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, - std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, - std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, - std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, - std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, - std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, - std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, - std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, - std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, - std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, - std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, - std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, - std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, - std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, - std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, - std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, - std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, - std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, - std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, std::pair{ L"chartreuse1"sv, til::color{ 127, 255, 0 } }, std::pair{ L"chartreuse2"sv, til::color{ 118, 238, 0 } }, std::pair{ L"chartreuse3"sv, til::color{ 102, 205, 0 } }, std::pair{ L"chartreuse4"sv, til::color{ 69, 139, 0 } }, - std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, - std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, - std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, - std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, - std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, - std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, - std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, - std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, - std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, - std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, - std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, - std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, - std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, - std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, - std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, - std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, - std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, - std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, - std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, - std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, - std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, - std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, - std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, - std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, - std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, - std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, - std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, - std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, - std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, - std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, - std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, - std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, - std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, - std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, - std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, - std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, - std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, - std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, - std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, - std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, - std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, - std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, - std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, - std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, - std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, - std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, - std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, - std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, - std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, - std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, - std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, - std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, - std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, - std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, - std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, std::pair{ L"chocolate1"sv, til::color{ 255, 127, 36 } }, std::pair{ L"chocolate2"sv, til::color{ 238, 118, 33 } }, std::pair{ L"chocolate3"sv, til::color{ 205, 102, 29 } }, std::pair{ L"chocolate4"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, - std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, - std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, - std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, - std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, - std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, - std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, - std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, - std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, - std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, - std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, - std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, - std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, - std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, - std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, - std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, - std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, - std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, - std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, - std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, - std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, - std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, std::pair{ L"coral1"sv, til::color{ 255, 114, 86 } }, std::pair{ L"coral2"sv, til::color{ 238, 106, 80 } }, std::pair{ L"coral3"sv, til::color{ 205, 91, 69 } }, std::pair{ L"coral4"sv, til::color{ 139, 62, 47 } }, - std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, - std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, - std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, - std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, - std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, - std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, - std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, - std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, - std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, - std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, - std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, - std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, - std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, - std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, - std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, - std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, - std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, - std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, - std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, - std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, - std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, - std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, - std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, - std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, - std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, - std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, - std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, - std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, - std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, - std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, - std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, - std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, - std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, - std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, - std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, - std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, - std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, - std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, - std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, - std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, - std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, - std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, - std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, - std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, - std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, - std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, - std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, - std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, - std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, + std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, + std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, + std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, + std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, + std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, + std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, + std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, + std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, + std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, + std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, + std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, + std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, + std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, + std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, + std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, + std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, + std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, + std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, + std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, + std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, + std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, + std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, + std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, + std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, + std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, std::pair{ L"darkorchid1"sv, til::color{ 191, 62, 255 } }, std::pair{ L"darkorchid2"sv, til::color{ 178, 58, 238 } }, std::pair{ L"darkorchid3"sv, til::color{ 154, 50, 205 } }, std::pair{ L"darkorchid4"sv, til::color{ 104, 34, 139 } }, - std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, - std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, - std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, - std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, - std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, - std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, - std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, - std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, - std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, - std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, - std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, - std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, - std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, - std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, + std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, + std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, + std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, + std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, + std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, + std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, + std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, + std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, + std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, + std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, + std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, + std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, + std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, + std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, + std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, + std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, + std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, + std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, + std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, + std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, + std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, + std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, + std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, + std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, + std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, + std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, + std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, + std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, + std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, + std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, + std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, + std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, + std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, + std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, + std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, + std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, + std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, + std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, + std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, + std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, + std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, + std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, std::pair{ L"gray10"sv, til::color{ 26, 26, 26 } }, - std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, + std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, std::pair{ L"gray11"sv, til::color{ 28, 28, 28 } }, - std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, std::pair{ L"gray12"sv, til::color{ 31, 31, 31 } }, - std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, std::pair{ L"gray13"sv, til::color{ 33, 33, 33 } }, - std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, std::pair{ L"gray14"sv, til::color{ 36, 36, 36 } }, - std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, std::pair{ L"gray15"sv, til::color{ 38, 38, 38 } }, - std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, std::pair{ L"gray16"sv, til::color{ 41, 41, 41 } }, - std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, std::pair{ L"gray17"sv, til::color{ 43, 43, 43 } }, - std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, std::pair{ L"gray18"sv, til::color{ 46, 46, 46 } }, - std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, std::pair{ L"gray19"sv, til::color{ 48, 48, 48 } }, - std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, std::pair{ L"gray20"sv, til::color{ 51, 51, 51 } }, - std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, std::pair{ L"gray21"sv, til::color{ 54, 54, 54 } }, - std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, std::pair{ L"gray22"sv, til::color{ 56, 56, 56 } }, - std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, std::pair{ L"gray23"sv, til::color{ 59, 59, 59 } }, - std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, std::pair{ L"gray24"sv, til::color{ 61, 61, 61 } }, - std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, std::pair{ L"gray25"sv, til::color{ 64, 64, 64 } }, - std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, std::pair{ L"gray26"sv, til::color{ 66, 66, 66 } }, - std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, std::pair{ L"gray27"sv, til::color{ 69, 69, 69 } }, - std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, std::pair{ L"gray28"sv, til::color{ 71, 71, 71 } }, - std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, std::pair{ L"gray29"sv, til::color{ 74, 74, 74 } }, - std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, std::pair{ L"gray30"sv, til::color{ 77, 77, 77 } }, - std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, std::pair{ L"gray31"sv, til::color{ 79, 79, 79 } }, - std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, std::pair{ L"gray32"sv, til::color{ 82, 82, 82 } }, - std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, std::pair{ L"gray33"sv, til::color{ 84, 84, 84 } }, - std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, std::pair{ L"gray34"sv, til::color{ 87, 87, 87 } }, - std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, std::pair{ L"gray35"sv, til::color{ 89, 89, 89 } }, - std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, std::pair{ L"gray36"sv, til::color{ 92, 92, 92 } }, - std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, std::pair{ L"gray37"sv, til::color{ 94, 94, 94 } }, - std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, std::pair{ L"gray38"sv, til::color{ 97, 97, 97 } }, - std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, std::pair{ L"gray39"sv, til::color{ 99, 99, 99 } }, - std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, std::pair{ L"gray40"sv, til::color{ 102, 102, 102 } }, - std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, std::pair{ L"gray41"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, std::pair{ L"gray42"sv, til::color{ 107, 107, 107 } }, - std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, std::pair{ L"gray43"sv, til::color{ 110, 110, 110 } }, - std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, std::pair{ L"gray44"sv, til::color{ 112, 112, 112 } }, - std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, std::pair{ L"gray45"sv, til::color{ 115, 115, 115 } }, - std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, std::pair{ L"gray46"sv, til::color{ 117, 117, 117 } }, - std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, std::pair{ L"gray47"sv, til::color{ 120, 120, 120 } }, - std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, std::pair{ L"gray48"sv, til::color{ 122, 122, 122 } }, - std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, std::pair{ L"gray49"sv, til::color{ 125, 125, 125 } }, - std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, std::pair{ L"gray50"sv, til::color{ 127, 127, 127 } }, - std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, std::pair{ L"gray51"sv, til::color{ 130, 130, 130 } }, - std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, std::pair{ L"gray52"sv, til::color{ 133, 133, 133 } }, - std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, std::pair{ L"gray53"sv, til::color{ 135, 135, 135 } }, - std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, std::pair{ L"gray54"sv, til::color{ 138, 138, 138 } }, - std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, std::pair{ L"gray55"sv, til::color{ 140, 140, 140 } }, - std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, std::pair{ L"gray56"sv, til::color{ 143, 143, 143 } }, - std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, std::pair{ L"gray57"sv, til::color{ 145, 145, 145 } }, - std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, std::pair{ L"gray58"sv, til::color{ 148, 148, 148 } }, - std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, std::pair{ L"gray59"sv, til::color{ 150, 150, 150 } }, - std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, std::pair{ L"gray60"sv, til::color{ 153, 153, 153 } }, - std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, std::pair{ L"gray61"sv, til::color{ 156, 156, 156 } }, - std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, std::pair{ L"gray62"sv, til::color{ 158, 158, 158 } }, - std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, std::pair{ L"gray63"sv, til::color{ 161, 161, 161 } }, - std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, std::pair{ L"gray64"sv, til::color{ 163, 163, 163 } }, - std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, std::pair{ L"gray65"sv, til::color{ 166, 166, 166 } }, - std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, std::pair{ L"gray66"sv, til::color{ 168, 168, 168 } }, - std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, std::pair{ L"gray67"sv, til::color{ 171, 171, 171 } }, - std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, std::pair{ L"gray68"sv, til::color{ 173, 173, 173 } }, - std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, std::pair{ L"gray69"sv, til::color{ 176, 176, 176 } }, - std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, std::pair{ L"gray70"sv, til::color{ 179, 179, 179 } }, - std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, std::pair{ L"gray71"sv, til::color{ 181, 181, 181 } }, - std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, std::pair{ L"gray72"sv, til::color{ 184, 184, 184 } }, - std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, std::pair{ L"gray73"sv, til::color{ 186, 186, 186 } }, - std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, std::pair{ L"gray74"sv, til::color{ 189, 189, 189 } }, - std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, std::pair{ L"gray75"sv, til::color{ 191, 191, 191 } }, - std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, std::pair{ L"gray76"sv, til::color{ 194, 194, 194 } }, - std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, std::pair{ L"gray77"sv, til::color{ 196, 196, 196 } }, - std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, std::pair{ L"gray78"sv, til::color{ 199, 199, 199 } }, - std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, std::pair{ L"gray79"sv, til::color{ 201, 201, 201 } }, - std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, std::pair{ L"gray80"sv, til::color{ 204, 204, 204 } }, - std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, std::pair{ L"gray81"sv, til::color{ 207, 207, 207 } }, - std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, std::pair{ L"gray82"sv, til::color{ 209, 209, 209 } }, - std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, std::pair{ L"gray83"sv, til::color{ 212, 212, 212 } }, - std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, std::pair{ L"gray84"sv, til::color{ 214, 214, 214 } }, - std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, std::pair{ L"gray85"sv, til::color{ 217, 217, 217 } }, - std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, std::pair{ L"gray86"sv, til::color{ 219, 219, 219 } }, - std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, std::pair{ L"gray87"sv, til::color{ 222, 222, 222 } }, - std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, std::pair{ L"gray88"sv, til::color{ 224, 224, 224 } }, - std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, std::pair{ L"gray89"sv, til::color{ 227, 227, 227 } }, - std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, std::pair{ L"gray90"sv, til::color{ 229, 229, 229 } }, - std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, std::pair{ L"gray91"sv, til::color{ 232, 232, 232 } }, - std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, std::pair{ L"gray92"sv, til::color{ 235, 235, 235 } }, - std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, std::pair{ L"gray93"sv, til::color{ 237, 237, 237 } }, - std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, std::pair{ L"gray94"sv, til::color{ 240, 240, 240 } }, - std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, std::pair{ L"gray95"sv, til::color{ 242, 242, 242 } }, - std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, std::pair{ L"gray96"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, std::pair{ L"gray97"sv, til::color{ 247, 247, 247 } }, - std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, std::pair{ L"gray98"sv, til::color{ 250, 250, 250 } }, - std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, std::pair{ L"gray99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, + std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, + std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, + std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, + std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, - std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, - std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, - std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, - std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, - std::pair{ L"teal"sv, til::color{ 0, 128, 128 } } + std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, + std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, + std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, + std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, + std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, + std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, + std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, + std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, + std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, + std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, + std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, + std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, + std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, + std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, + std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, + std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, + std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, + std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, + std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, + std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, + std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, + std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, + std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, + std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, + std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, + std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, + std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, + std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, + std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, + std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, + std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, + std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, + std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, + std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, + std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, + std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, + std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, + std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, + std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, + std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, + std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, + std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, + std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, + std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, + std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, + std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, + std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, + std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, + std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, + std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, + std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, + std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, + std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, + std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, + std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, + std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, + std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, + std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, + std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, + std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, + std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, + std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, + std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, + std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, + std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, + std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, + std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, + std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, + std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, + std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, + std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, + std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, + std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, + std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, + std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, + std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, + std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, + std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, + std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, + std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, + std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, + std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, + std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, + std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, + std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, + std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, + std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, + std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, + std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, + std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, + std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, + std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, + std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, + std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, + std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, + std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, + std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, + std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, + std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, + std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, + std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, + std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, + std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, + std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, + std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, + std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, + std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, + std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, + std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, + std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, + std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, + std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, + std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, + std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, + std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, + std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, + std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, + std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, + std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, + std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, + std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, + std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, + std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, + std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, + std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, + std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, + std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, + std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, + std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, + std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, + std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, + std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, + std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, + std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, + std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, + std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, + std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, + std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, + std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, + std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, + std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, + std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, + std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, + std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, + std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, + std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, + std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, + std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, + std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, + std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, + std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, + std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, + std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, + std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, + std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, + std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, + std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, + std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, + std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, + std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, + std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, + std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, + std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, + std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, + std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, + std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, + std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, + std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, + std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, + std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, + std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, + std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, + std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, + std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, + std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, + std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, + std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, + std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, + std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, + std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, + std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, + std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, + std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, + std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, + std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, + std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, + std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, + std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, + std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, + std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, + std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, + std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, + std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, + std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, + std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, + std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, + std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, + std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, + std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, + std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, + std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, + std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, + std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, + std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, + std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, + std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, + std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, + std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, + std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, + std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, + std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, + std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, + std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, + std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, + std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, + std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, + std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, + std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, + std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, + std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, + std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, + std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, + std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, + std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, + std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, + std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, + std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, + std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, + std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, + std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, + std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, + std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, + std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, + std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, + std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, + std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, + std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, + std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, + std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, + std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, + std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, + std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, + std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, + std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, + std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, + std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, + std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, + std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, + std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, + std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, + std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, + std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, + std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, + std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, + std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, + std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, + std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, + std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, + std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, + std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, + std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, + std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, + std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, + std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, + std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, + std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, + std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, + std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, + std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, + std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, + std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, + std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, + std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, + std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, + std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, + std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, + std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, + std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, + std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, + std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, + std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, + std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, + std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, + std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, + std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, + std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, + std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, + std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, + std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, + std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, + std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, + std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, + std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, + std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, + std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, + std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, + std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, + std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, + std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, + std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, + std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, + std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, + std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, + std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, + std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, + std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, + std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, + std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, + std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, + std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, + std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, + std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, + std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, + std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, + std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, + std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ L"teal"sv, til::color{ 0, 128, 128 } }, + std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, + std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, + std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, + std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, + std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, + std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, + std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, + std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, + std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, + std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, + std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, + std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, + std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, + std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, + std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, + std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, + std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, + std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, + std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, + std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, + std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, + std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, + std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, + std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, + std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, + std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, + std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, + std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, + std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, + std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, + std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, + std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, + std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, + std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, + std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } } }; // Function Description: diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index c6abc844978..8ba21e1ddc3 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -45,7 +45,8 @@ namespace Microsoft::Console::Utils std::string ColorToHexString(const til::color color); til::color ColorFromHexString(const std::string_view wstr); - std::optional ColorForXParseColorSpec(const std::wstring_view wstr) noexcept; + std::optional ColorFromXTermColor(const std::wstring_view wstr) noexcept; + std::optional ColorFromXParseColorSpec(const std::wstring_view wstr) noexcept; bool HexToUint(const wchar_t wch, unsigned int& value) noexcept; diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index af686074839..568a7e5ad67 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -22,10 +22,10 @@ class UtilsTests TEST_METHOD(TestClampToShortMax); TEST_METHOD(TestSwapColorPalette); TEST_METHOD(TestGuidToString); - TEST_METHOD(TestColorFromXParseColorSpec); + TEST_METHOD(TestColorFromXTermColor); - void _VerifyXParseColorResult(const std::wstring_view wstr, DWORD colorValue); - void _VerfiyXParserColorInvalid(const std::wstring_view wstr); + void _VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue); + void _VerifyXTermColorInvalid(const std::wstring_view wstr); }; void UtilsTests::TestClampToShortMax() @@ -95,88 +95,88 @@ void UtilsTests::TestGuidToString() VERIFY_ARE_EQUAL(constantGuidString, generatedGuid); } -void UtilsTests::TestColorFromXParseColorSpec() +void UtilsTests::TestColorFromXTermColor() { - _VerifyXParseColorResult(L"rgb:1/1/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"RGB:1/1/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:111/1/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1111/1/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/11/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/111/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/1111/1", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/1/11", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/1/111", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/1/1111", RGB(0x11, 0x11, 0x11)); - _VerifyXParseColorResult(L"rgb:1/23/4", RGB(0x11, 0x23, 0x44)); - _VerifyXParseColorResult(L"rgb:1/23/45", RGB(0x11, 0x23, 0x45)); - _VerifyXParseColorResult(L"rgb:1/23/456", RGB(0x11, 0x23, 0x45)); - _VerifyXParseColorResult(L"rgb:12/34/5", RGB(0x12, 0x34, 0x55)); - _VerifyXParseColorResult(L"rgb:12/34/56", RGB(0x12, 0x34, 0x56)); - _VerifyXParseColorResult(L"rgb:12/345/67", RGB(0x12, 0x34, 0x67)); - _VerifyXParseColorResult(L"rgb:12/345/678", RGB(0x12, 0x34, 0x67)); - _VerifyXParseColorResult(L"rgb:123/456/789", RGB(0x12, 0x45, 0x78)); - _VerifyXParseColorResult(L"rgb:123/4564/789", RGB(0x12, 0x45, 0x78)); - _VerifyXParseColorResult(L"rgb:123/4564/7897", RGB(0x12, 0x45, 0x78)); - _VerifyXParseColorResult(L"rgb:1231/4564/7897", RGB(0x12, 0x45, 0x78)); - - _VerifyXParseColorResult(L"#111", RGB(0x10, 0x10, 0x10)); - _VerifyXParseColorResult(L"#123456", RGB(0x12, 0x34, 0x56)); - _VerifyXParseColorResult(L"#123456789", RGB(0x12, 0x45, 0x78)); - _VerifyXParseColorResult(L"#123145647897", RGB(0x12, 0x45, 0x78)); - - _VerifyXParseColorResult(L"orange", RGB(255, 165, 0)); - _VerifyXParseColorResult(L"dark green", RGB(0, 100, 0)); - _VerifyXParseColorResult(L"medium sea green", RGB(60, 179, 113)); - _VerifyXParseColorResult(L"LightYellow", RGB(255, 255, 224)); + _VerifyXTermColorResult(L"rgb:1/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"RGB:1/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:111/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1111/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/11/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/111/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/1111/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/1/11", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/1/111", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/1/1111", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rgb:1/23/4", RGB(0x11, 0x23, 0x44)); + _VerifyXTermColorResult(L"rgb:1/23/45", RGB(0x11, 0x23, 0x45)); + _VerifyXTermColorResult(L"rgb:1/23/456", RGB(0x11, 0x23, 0x45)); + _VerifyXTermColorResult(L"rgb:12/34/5", RGB(0x12, 0x34, 0x55)); + _VerifyXTermColorResult(L"rgb:12/34/56", RGB(0x12, 0x34, 0x56)); + _VerifyXTermColorResult(L"rgb:12/345/67", RGB(0x12, 0x34, 0x67)); + _VerifyXTermColorResult(L"rgb:12/345/678", RGB(0x12, 0x34, 0x67)); + _VerifyXTermColorResult(L"rgb:123/456/789", RGB(0x12, 0x45, 0x78)); + _VerifyXTermColorResult(L"rgb:123/4564/789", RGB(0x12, 0x45, 0x78)); + _VerifyXTermColorResult(L"rgb:123/4564/7897", RGB(0x12, 0x45, 0x78)); + _VerifyXTermColorResult(L"rgb:1231/4564/7897", RGB(0x12, 0x45, 0x78)); + + _VerifyXTermColorResult(L"#111", RGB(0x10, 0x10, 0x10)); + _VerifyXTermColorResult(L"#123456", RGB(0x12, 0x34, 0x56)); + _VerifyXTermColorResult(L"#123456789", RGB(0x12, 0x45, 0x78)); + _VerifyXTermColorResult(L"#123145647897", RGB(0x12, 0x45, 0x78)); + + _VerifyXTermColorResult(L"orange", RGB(255, 165, 0)); + _VerifyXTermColorResult(L"dark green", RGB(0, 100, 0)); + _VerifyXTermColorResult(L"medium sea green", RGB(60, 179, 113)); + _VerifyXTermColorResult(L"LightYellow", RGB(255, 255, 224)); // Invalid sequences. - _VerfiyXParserColorInvalid(L""); - _VerfiyXParserColorInvalid(L"r:"); - _VerfiyXParserColorInvalid(L"rg:"); - _VerfiyXParserColorInvalid(L"rgb:"); - _VerfiyXParserColorInvalid(L"rgb:/"); - _VerfiyXParserColorInvalid(L"rgb://"); - _VerfiyXParserColorInvalid(L"rgb:///"); - _VerfiyXParserColorInvalid(L"rgb:1"); - _VerfiyXParserColorInvalid(L"rgb:1/"); - _VerfiyXParserColorInvalid(L"rgb:/1"); - _VerfiyXParserColorInvalid(L"rgb:1/1"); - _VerfiyXParserColorInvalid(L"rgb:1/1/"); - _VerfiyXParserColorInvalid(L"rgb:1/11/"); - _VerfiyXParserColorInvalid(L"rgb:/1/1"); - _VerfiyXParserColorInvalid(L"rgb:1/1/1/"); - _VerfiyXParserColorInvalid(L"rgb:1/1/1/1"); - _VerfiyXParserColorInvalid(L"rgb:this/is/invalid"); - _VerfiyXParserColorInvalid(L"rgba:1/1/1"); - _VerfiyXParserColorInvalid(L"rgbi:1/1/1"); - _VerfiyXParserColorInvalid(L"cmyk:1/1/1/1"); - _VerfiyXParserColorInvalid(L"rgb#111"); - _VerfiyXParserColorInvalid(L"rgb:#111"); - _VerfiyXParserColorInvalid(L"#"); - _VerfiyXParserColorInvalid(L"#1"); - _VerfiyXParserColorInvalid(L"#1111"); - _VerfiyXParserColorInvalid(L"#11111"); - _VerfiyXParserColorInvalid(L"#1/1/1"); - _VerfiyXParserColorInvalid(L"#11/1/"); - _VerfiyXParserColorInvalid(L"#1111111"); - _VerfiyXParserColorInvalid(L"#/1/1/1"); - _VerfiyXParserColorInvalid(L"#rgb:1/1/1"); - _VerfiyXParserColorInvalid(L"#111invalid"); - _VerfiyXParserColorInvalid(L"#1111111111111111"); - _VerfiyXParserColorInvalid(L"#invalid111"); - _VerfiyXParserColorInvalid(L"12/34/56"); - _VerfiyXParserColorInvalid(L"123456"); + _VerifyXTermColorInvalid(L""); + _VerifyXTermColorInvalid(L"r:"); + _VerifyXTermColorInvalid(L"rg:"); + _VerifyXTermColorInvalid(L"rgb:"); + _VerifyXTermColorInvalid(L"rgb:/"); + _VerifyXTermColorInvalid(L"rgb://"); + _VerifyXTermColorInvalid(L"rgb:///"); + _VerifyXTermColorInvalid(L"rgb:1"); + _VerifyXTermColorInvalid(L"rgb:1/"); + _VerifyXTermColorInvalid(L"rgb:/1"); + _VerifyXTermColorInvalid(L"rgb:1/1"); + _VerifyXTermColorInvalid(L"rgb:1/1/"); + _VerifyXTermColorInvalid(L"rgb:1/11/"); + _VerifyXTermColorInvalid(L"rgb:/1/1"); + _VerifyXTermColorInvalid(L"rgb:1/1/1/"); + _VerifyXTermColorInvalid(L"rgb:1/1/1/1"); + _VerifyXTermColorInvalid(L"rgb:this/is/invalid"); + _VerifyXTermColorInvalid(L"rgba:1/1/1"); + _VerifyXTermColorInvalid(L"rgbi:1/1/1"); + _VerifyXTermColorInvalid(L"cmyk:1/1/1/1"); + _VerifyXTermColorInvalid(L"rgb#111"); + _VerifyXTermColorInvalid(L"rgb:#111"); + _VerifyXTermColorInvalid(L"#"); + _VerifyXTermColorInvalid(L"#1"); + _VerifyXTermColorInvalid(L"#1111"); + _VerifyXTermColorInvalid(L"#11111"); + _VerifyXTermColorInvalid(L"#1/1/1"); + _VerifyXTermColorInvalid(L"#11/1/"); + _VerifyXTermColorInvalid(L"#1111111"); + _VerifyXTermColorInvalid(L"#/1/1/1"); + _VerifyXTermColorInvalid(L"#rgb:1/1/1"); + _VerifyXTermColorInvalid(L"#111invalid"); + _VerifyXTermColorInvalid(L"#1111111111111111"); + _VerifyXTermColorInvalid(L"#invalid111"); + _VerifyXTermColorInvalid(L"12/34/56"); + _VerifyXTermColorInvalid(L"123456"); } -void UtilsTests::_VerifyXParseColorResult(const std::wstring_view wstr, DWORD colorValue) +void UtilsTests::_VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue) { - std::optional color = ColorForXParseColorSpec(wstr); + std::optional color = ColorFromXTermColor(wstr); VERIFY_IS_TRUE(color.has_value()); VERIFY_ARE_EQUAL((COLORREF)color.value(), colorValue); } -void UtilsTests::_VerfiyXParserColorInvalid(const std::wstring_view wstr) +void UtilsTests::_VerifyXTermColorInvalid(const std::wstring_view wstr) { - std::optional color = ColorForXParseColorSpec(wstr); + std::optional color = ColorFromXTermColor(wstr); VERIFY_IS_FALSE(color.has_value()); } diff --git a/src/types/utils.cpp b/src/types/utils.cpp index b543bf7afa1..c21e78057c2 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -100,22 +100,45 @@ til::color Utils::ColorFromHexString(const std::string_view str) return til::color{ r, g, b }; } +// Routine Description: +// - Given a color string, attempts to parse the color. +// The color are specified by name or RGB specification as per XParseColor. +// Arguments: +// - string - The string containing the color spec string to parse. +// Return Value: +// - An optional color which contains value if a color was successfully parsed +std::optional Utils::ColorFromXTermColor(const std::wstring_view string) noexcept +{ + std::optional color = ColorFromXParseColorSpec(string); + if (color.has_value()) + { + return color.value(); + } + + color = ColorFromXOrgAppColorName(string); + if (color.has_value()) + { + return color.value(); + } + + return std::nullopt; +} + // Routine Description: // - Given a color spec string, attempts to parse the color that's encoded. +// // Based on the XParseColor documentation, the supported specs currently are the following: // spec1: a color in the following format: // "rgb://" // spec2: a color in the following format: // "#" -// spec3: The XOrg app color names: -// "orange" // -// In the first two specs, is a value contains up to 4 hex digits, upper or lower case. +// In both specs, is a value contains up to 4 hex digits, upper or lower case. // Arguments: // - string - The string containing the color spec string to parse. // Return Value: // - An optional color which contains value if a color was successfully parsed -std::optional Utils::ColorForXParseColorSpec(const std::wstring_view string) noexcept +std::optional Utils::ColorFromXParseColorSpec(const std::wstring_view string) noexcept try { bool foundXParseColorSpec = false; @@ -158,8 +181,7 @@ try // Try the sharp sign format. if (!foundXParseColorSpec && stringSize > 1) { - const auto prefix = string.substr(0, 1); - if (til::at(prefix, 0) == L'#') + if (til::at(string, 0) == L'#') { // We can have one of the following formats: // 4 "#hhh" @@ -180,16 +202,6 @@ try } } - // Try the XOrg app color name. - if (!foundXParseColorSpec) - { - std::optional color = Utils::ColorFromXOrgAppColorName(string); - if (color.has_value()) - { - return color.value(); - } - } - if (foundXParseColorSpec) { for (size_t component = 0; component < 3; component++) From 819668e3480c397014f12c202b5573c0ecfb574f Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Wed, 16 Sep 2020 18:40:35 +0800 Subject: [PATCH 27/43] Filter before towlower --- src/types/colorTable.cpp | 4 +++- src/types/inc/colorTable.hpp | 2 +- src/types/ut_types/UtilsTests.cpp | 2 ++ src/types/utils.cpp | 12 +++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index e5d20587813..b649aedcf4d 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -1028,7 +1028,8 @@ void Utils::Initialize256ColorTable(const gsl::span table) // - str: a string representation of the color name to parse // Return Value: // - An optional color which contains value if a color was successfully parsed -std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) +std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) noexcept +try { std::wstring key(wstr); std::transform(key.begin(), key.end(), key.begin(), std::towlower); @@ -1041,3 +1042,4 @@ std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_vi return iter->second; } +CATCH_FAIL_FAST() diff --git a/src/types/inc/colorTable.hpp b/src/types/inc/colorTable.hpp index dd6cd0de484..d09653da83c 100644 --- a/src/types/inc/colorTable.hpp +++ b/src/types/inc/colorTable.hpp @@ -17,7 +17,7 @@ namespace Microsoft::Console::Utils void SwapANSIColorOrderForConhost(const gsl::span table); void Initialize256ColorTable(const gsl::span table); - std::optional ColorFromXOrgAppColorName(const std::wstring_view wstr); + std::optional ColorFromXOrgAppColorName(const std::wstring_view wstr) noexcept; // Function Description: // - Fill the alpha byte of the colors in a given color table with the given value. diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 568a7e5ad67..6cfc020f8f0 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -166,6 +166,8 @@ void UtilsTests::TestColorFromXTermColor() _VerifyXTermColorInvalid(L"#invalid111"); _VerifyXTermColorInvalid(L"12/34/56"); _VerifyXTermColorInvalid(L"123456"); + _VerifyXTermColorInvalid(L"rgb:1/1/1"); + _VerifyXTermColorInvalid(L"中文rgb:1/1/1"); } void UtilsTests::_VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index c21e78057c2..c15c52d93ab 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -156,7 +156,17 @@ try if (stringSize > 4) { auto prefix = std::wstring(string.substr(0, 4)); - std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::towlower); + std::transform(prefix.begin(), prefix.end(), prefix.begin(), [](const auto x) { + // Replace characters beyond ASCII range with space to prevent possible issues + // with towlower under different locales. + if (x > 0x7f) + { + return 0x20ui16; // Space + } + + return ::towlower(x); + }); + if (prefix.compare(L"rgb:") == 0) { // If all the components have the same digit count, we can have one of the following formats: From b4e44abf6546abcf106695fceb0688852d43f7df Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 21:17:25 +0800 Subject: [PATCH 28/43] Multi params --- .../parser/OutputStateMachineEngine.cpp | 141 +++++++++++++----- .../parser/OutputStateMachineEngine.hpp | 6 +- .../parser/ut_parser/OutputEngineTest.cpp | 118 +++++++++++++++ 3 files changed, 225 insertions(+), 40 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 8d16ff76db1..3f12473eff0 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -735,7 +735,8 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, std::wstring params; std::wstring uri; bool queryClipboard = false; - size_t tableIndex = 0; + std::vector tableIndexes; + std::vector colors; DWORD color = 0; switch (parameter) @@ -746,12 +747,12 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, success = _GetOscTitle(string, title); break; case OscActionCodes::SetColor: - success = _GetOscSetColorTable(string, tableIndex, color); + success = _GetOscSetColorTable(string, tableIndexes, colors); break; case OscActionCodes::SetForegroundColor: case OscActionCodes::SetBackgroundColor: case OscActionCodes::SetCursorColor: - success = _GetOscSetColor(string, color); + success = _GetOscSetColor(string, colors); break; case OscActionCodes::SetClipboard: success = _GetOscSetClipboard(string, setClipboardContent, queryClipboard); @@ -780,19 +781,33 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCWT); break; case OscActionCodes::SetColor: - success = _dispatch->SetColorTableEntry(tableIndex, color); + for (size_t i = 0; i < tableIndexes.size(); i++) + { + auto tableIndex = tableIndexes.at(i); + auto rgb = colors.at(i); + success = _dispatch->SetColorTableEntry(tableIndex, rgb); + } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCCT); break; case OscActionCodes::SetForegroundColor: - success = _dispatch->SetDefaultForeground(color); + if (colors.size() > 0) + { + success = _dispatch->SetDefaultForeground(colors.at(0)); + } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCFG); break; case OscActionCodes::SetBackgroundColor: - success = _dispatch->SetDefaultBackground(color); + if (colors.size() > 0) + { + success = _dispatch->SetDefaultBackground(colors.at(0)); + } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCBG); break; case OscActionCodes::SetCursorColor: - success = _dispatch->SetCursorColor(color); + if (colors.size() > 0) + { + success = _dispatch->SetCursorColor(color); + } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCSCC); break; case OscActionCodes::SetClipboard: @@ -1368,6 +1383,9 @@ static constexpr bool _isNumber(const wchar_t wch) noexcept // - OSC 4 ; c ; spec ST // c: the index of the ansi color table // spec: The colors are specified by name or RGB specification as per XParseColor +// +// It's possible to have multiple "c ; spec" pairs, which will set the index "c" of the color table +// with color parsed from "spec". // Arguments: // - string - the Osc String to parse // - tableIndex - receives the table index @@ -1375,20 +1393,18 @@ static constexpr bool _isNumber(const wchar_t wch) noexcept // Return Value: // - True if a table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) const noexcept + std::vector& tableIndexes, + std::vector& rgbs) const noexcept +try { - tableIndex = 0; - rgb = 0; + tableIndexes.clear(); + rgbs.clear(); size_t _TableIndex = 0; - bool foundTableIndex = false; - bool success = false; - - // First try to get the table index, a number between [0,256] size_t current = 0; while (current < string.size()) { + // First try to get the table index, a number between [0,256] const wchar_t wch = string.at(current); if (_isNumber(wch)) { @@ -1402,8 +1418,37 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri // We need to explicitly pass in a number, we can't default to 0 if // there's no param ++current; - foundTableIndex = true; - break; + + // Now we try to parse the RGB color value from the string. + std::optional colorOptional; + + // Find the next ';' to determine how to substr. + // For example if the string is '0;rgb:1/1/1;1;rgb/2/2/2', we will need + // to correctly recognize both "rgb:1/1/1;1" and "rgb/2/2/2". + const auto nextDelimiter = string.find(L";", current); + if (nextDelimiter == std::wstring::npos) + { + colorOptional = Utils::ColorFromXTermColor(string.substr(current)); + // No more delimiter means no more left for parsing. This will effectively break out the loop. + current = string.size(); + } + else + { + // Substr until the delimiter. + const auto length = nextDelimiter - current; + colorOptional = Utils::ColorFromXTermColor(string.substr(current, length)); + // Skip this color and the delimiter. Start the next one. + current += length + 1; + } + + if (colorOptional.has_value()) + { + tableIndexes.push_back(_TableIndex); + rgbs.push_back(colorOptional.value()); + } + + // Reset the state. + _TableIndex = 0; } else { @@ -1411,21 +1456,10 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri break; } } - // Now we try to parse the RGB color value from the string. - if (foundTableIndex) - { - std::optional colorOptional = Utils::ColorFromXTermColor(string.substr(current)); - if (colorOptional.has_value()) - { - tableIndex = _TableIndex; - rgb = colorOptional.value(); - success = true; - } - } - - return success; + return tableIndexes.size() > 0 && rgbs.size() > 0; } +CATCH_LOG_RETURN_FALSE() // Routine Description: // - Given a hyperlink string, attempts to parse the URI encoded. An 'id' parameter @@ -1467,26 +1501,59 @@ bool OutputStateMachineEngine::_ParseHyperlink(const std::wstring_view string, // Routine Description: // - OSC 10, 11, 12 ; spec ST -// spec: The colors are specified by name or RGB specification as per XParseColor +// spec: The colors are specified by name or RGB specification as per +// +// It's possible to have multiple "spec", which by design equals to a series of OSC command +// with accumulated Ps. For example "OSC 10;color1;11;color2" is effectively an "OSC 10;color1" +// and an "OSC 11;color2". // +// However, we do not support the chaining of OSC 10-17 yet. Right now only the first parameter +// will take effect. // Arguments: // - string - the Osc String to parse // - rgb - receives the color that we parsed in the format: 0x00BBGGRR // Return Value: // - True if a table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, - DWORD& rgb) const noexcept + std::vector& rgbs) const noexcept { - rgb = 0; + rgbs.clear(); bool success = false; - std::optional colorOptional = Utils::ColorFromXTermColor(string); + size_t current = 0; + size_t expectedColorCount = 0; - if (colorOptional.has_value()) + while (current < string.size()) { - rgb = colorOptional.value(); - success = true; + std::optional colorOptional; + const auto nextDelimiter = string.find(L";", current); + if (nextDelimiter == std::wstring::npos) + { + colorOptional = Utils::ColorFromXTermColor(string.substr(current)); + // No more delimiter means no more left for parsing. This will effectively break out the loop. + current = string.size(); + } + else + { + // Substr until the delimiter. + const auto length = nextDelimiter - current; + colorOptional = Utils::ColorFromXTermColor(string.substr(current, length)); + // Skip this color and the delimiter. Start the next one. + current += length + 1; + } + + expectedColorCount++; + + if (colorOptional.has_value()) + { + rgbs.push_back(colorOptional.value()); + // Only mark the parsing as a success iff the first color is a success. + if (expectedColorCount == 1) + { + success = true; + } + } } return success; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 310cab1f4d2..0a85b914e34 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -228,11 +228,11 @@ namespace Microsoft::Console::VirtualTerminal unsigned int& function) const noexcept; bool _GetOscSetColorTable(const std::wstring_view string, - size_t& tableIndex, - DWORD& rgb) const noexcept; + std::vector& tableIndexes, + std::vector& rgbs) const noexcept; bool _GetOscSetColor(const std::wstring_view string, - DWORD& rgb) const noexcept; + std::vector& rgbs) const noexcept; static constexpr DispatchTypes::CursorStyle DefaultCursorStyle = DispatchTypes::CursorStyle::UserDefault; bool _GetCursorStyle(const gsl::span parameters, diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 11b4fe1c054..e82f95787b0 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -2487,6 +2487,39 @@ class StateMachineExternalTest final pDispatch->ClearState(); + // Multiple params. + mach.ProcessString(L"\033]10;#111;rgb:2/2/2\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#111;DarkOrange\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + // Partially valid sequences. Only the first color works. + mach.ProcessString(L"\033]10;#111;\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#111;rgb:\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#111;#2\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultForeground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultForegroundColor); + + pDispatch->ClearState(); + + // Invalid sequences. mach.ProcessString(L"\033]10;rgb:1/1/\033\\"); VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); @@ -2496,6 +2529,11 @@ class StateMachineExternalTest final VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); pDispatch->ClearState(); + + mach.ProcessString(L"\033]10;#1;rgb:1/1/1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); + + pDispatch->ClearState(); } TEST_METHOD(TestOscSetDefaultBackground) @@ -2535,6 +2573,26 @@ class StateMachineExternalTest final pDispatch->ClearState(); + // Partially valid sequences. Only the first color works. + mach.ProcessString(L"\033]11;#111;\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#111;rgb:\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#111;#2\033\\"); + VERIFY_IS_TRUE(pDispatch->_setDefaultBackground); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_defaultBackgroundColor); + + pDispatch->ClearState(); + + // Invalid sequences. mach.ProcessString(L"\033]11;rgb:1/1/\033\\"); VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); @@ -2544,6 +2602,11 @@ class StateMachineExternalTest final VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); pDispatch->ClearState(); + + mach.ProcessString(L"\033]11;#1;rgb:1/1/1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); + + pDispatch->ClearState(); } TEST_METHOD(TestOscSetColorTableEntry) @@ -2612,6 +2675,61 @@ class StateMachineExternalTest final VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); pDispatch->ClearState(); + + // Multiple params. + mach.ProcessString(L"\033]4;0;rgb:1/1/1;16;rgb:2/2/2\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0x22, 0x22, 0x22), pDispatch->_colorTable.at(16)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;0;rgb:1/1/1;16;rgb:2/2/2;64;#111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0x22, 0x22, 0x22), pDispatch->_colorTable.at(16)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(64)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;0;rgb:1/1/1;16;rgb:2/2/2;64;#111;128;orange\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0x22, 0x22, 0x22), pDispatch->_colorTable.at(16)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(64)); + VERIFY_ARE_EQUAL(RGB(255, 165, 0), pDispatch->_colorTable.at(128)); + + pDispatch->ClearState(); + + // Partially valid sequences. Valid colors should not be affected by invalid colors. + mach.ProcessString(L"\033]4;0;rgb:1/1/1;1;rgb:2/2/2;2;#111;3;orange;4;111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0x22, 0x22, 0x22), pDispatch->_colorTable.at(1)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(2)); + VERIFY_ARE_EQUAL(RGB(255, 165, 0), pDispatch->_colorTable.at(3)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(4)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;0;rgb:1/1/1;1;rgb:2;2;#111;3;orange;4;#222\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(1)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(2)); + VERIFY_ARE_EQUAL(RGB(255, 165, 0), pDispatch->_colorTable.at(3)); + VERIFY_ARE_EQUAL(RGB(0x20, 0x20, 0x20), pDispatch->_colorTable.at(4)); + + pDispatch->ClearState(); + + // Invalid sequences. + mach.ProcessString(L"\033]4;0;rgb:1/1/;16;rgb:2/2/;64;#11\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(16)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(64)); + + pDispatch->ClearState(); } TEST_METHOD(TestSetClipboard) From 45377bb431a30cbaabc774de6f18f9b7fe8f5718 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 21:32:12 +0800 Subject: [PATCH 29/43] Audit --- src/terminal/parser/OutputStateMachineEngine.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 3f12473eff0..ba17d0e832a 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -737,7 +737,6 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, bool queryClipboard = false; std::vector tableIndexes; std::vector colors; - DWORD color = 0; switch (parameter) { @@ -758,8 +757,6 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, success = _GetOscSetClipboard(string, setClipboardContent, queryClipboard); break; case OscActionCodes::ResetCursorColor: - // the console uses 0xffffffff as an "invalid color" value - color = 0xffffffff; success = true; break; case OscActionCodes::Hyperlink: @@ -806,7 +803,7 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, case OscActionCodes::SetCursorColor: if (colors.size() > 0) { - success = _dispatch->SetCursorColor(color); + success = _dispatch->SetCursorColor(colors.at(0)); } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCSCC); break; @@ -818,6 +815,8 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCSCB); break; case OscActionCodes::ResetCursorColor: + // the console uses 0xffffffff as an "invalid color" value + DWORD color = 0xffffffff; success = _dispatch->SetCursorColor(color); TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCRCC); break; @@ -1516,6 +1515,7 @@ bool OutputStateMachineEngine::_ParseHyperlink(const std::wstring_view string, // - True if a table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, std::vector& rgbs) const noexcept +try { rgbs.clear(); @@ -1558,6 +1558,7 @@ bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, return success; } +CATCH_LOG_RETURN_FALSE() // Method Description: // - Retrieves the type of window manipulation operation from the parameter pool From f352e388cc8e9b8ea2168b68eed91009a2dd4783 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 21:33:54 +0800 Subject: [PATCH 30/43] OK, seriously --- src/terminal/parser/OutputStateMachineEngine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index ba17d0e832a..5a2ea12e5b0 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -816,8 +816,7 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, break; case OscActionCodes::ResetCursorColor: // the console uses 0xffffffff as an "invalid color" value - DWORD color = 0xffffffff; - success = _dispatch->SetCursorColor(color); + success = _dispatch->SetCursorColor(0xffffffff); TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCRCC); break; case OscActionCodes::Hyperlink: From a7d77e438a01285cf85f039ecdcf00db30612265 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Wed, 16 Sep 2020 21:37:02 +0800 Subject: [PATCH 31/43] Some comment --- src/terminal/parser/OutputStateMachineEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 5a2ea12e5b0..e73fe9bc623 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1417,12 +1417,12 @@ try // there's no param ++current; - // Now we try to parse the RGB color value from the string. + // We have found the table index. Now we need to parse the RGB color value from the string. std::optional colorOptional; // Find the next ';' to determine how to substr. // For example if the string is '0;rgb:1/1/1;1;rgb/2/2/2', we will need - // to correctly recognize both "rgb:1/1/1;1" and "rgb/2/2/2". + // to correctly recognize both "0;rgb:1/1/1;" and "1;rgb/2/2/2". const auto nextDelimiter = string.find(L";", current); if (nextDelimiter == std::wstring::npos) { From dbfc3c569ad3199db71de59d50d4127bfa951688 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Thu, 17 Sep 2020 07:46:53 +0800 Subject: [PATCH 32/43] Resolve comments --- .../parser/OutputStateMachineEngine.cpp | 21 +-- src/types/utils.cpp | 140 +++++++++--------- 2 files changed, 81 insertions(+), 80 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index e73fe9bc623..217eb775441 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1383,13 +1383,13 @@ static constexpr bool _isNumber(const wchar_t wch) noexcept // spec: The colors are specified by name or RGB specification as per XParseColor // // It's possible to have multiple "c ; spec" pairs, which will set the index "c" of the color table -// with color parsed from "spec". +// with color parsed from "spec" for each pair respectively. // Arguments: // - string - the Osc String to parse -// - tableIndex - receives the table index -// - rgb - receives the color that we parsed in the format: 0x00BBGGRR +// - tableIndexes - receives the table indexes +// - rgbs - receives the colors that we parsed in the format: 0x00BBGGRR // Return Value: -// - True if a table index and color was parsed successfully. False otherwise. +// - True if at least one table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view string, std::vector& tableIndexes, std::vector& rgbs) const noexcept @@ -1413,11 +1413,12 @@ try } else if (wch == L';' && current > 0) { - // We need to explicitly pass in a number, we can't default to 0 if + // We have found the table index and can move on. + // We need to explicitly know the table index, we can't default to 0 if // there's no param ++current; - // We have found the table index. Now we need to parse the RGB color value from the string. + // Now we need to parse the RGB color value from the string. std::optional colorOptional; // Find the next ';' to determine how to substr. @@ -1499,19 +1500,19 @@ bool OutputStateMachineEngine::_ParseHyperlink(const std::wstring_view string, // Routine Description: // - OSC 10, 11, 12 ; spec ST -// spec: The colors are specified by name or RGB specification as per +// spec: The colors are specified by name or RGB specification as per XParseColor // // It's possible to have multiple "spec", which by design equals to a series of OSC command -// with accumulated Ps. For example "OSC 10;color1;11;color2" is effectively an "OSC 10;color1" +// with accumulated Ps. For example "OSC 10;color1;color2" is effectively an "OSC 10;color1" // and an "OSC 11;color2". // // However, we do not support the chaining of OSC 10-17 yet. Right now only the first parameter // will take effect. // Arguments: // - string - the Osc String to parse -// - rgb - receives the color that we parsed in the format: 0x00BBGGRR +// - rgbs - receives the colors that we parsed in the format: 0x00BBGGRR // Return Value: -// - True if a table index and color was parsed successfully. False otherwise. +// - True if the first table index and color was parsed successfully. False otherwise. bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, std::vector& rgbs) const noexcept try diff --git a/src/types/utils.cpp b/src/types/utils.cpp index c15c52d93ab..8bf856ad749 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -156,15 +156,11 @@ try if (stringSize > 4) { auto prefix = std::wstring(string.substr(0, 4)); - std::transform(prefix.begin(), prefix.end(), prefix.begin(), [](const auto x) { - // Replace characters beyond ASCII range with space to prevent possible issues - // with towlower under different locales. - if (x > 0x7f) - { - return 0x20ui16; // Space - } - return ::towlower(x); + // The "rgb:" indicator should be case insensitive. To prevent possible issues under + // different locales, transform only ASCII range latin characters. + std::transform(prefix.begin(), prefix.end(), prefix.begin(), [](const auto x) { + return x >= L'A' && x <= L'Z' ? static_cast(x - L'A' + L'a') : x; }); if (prefix.compare(L"rgb:") == 0) @@ -212,85 +208,89 @@ try } } - if (foundXParseColorSpec) + // No valid spec is found. Return early. + if (!foundXParseColorSpec) + { + return std::nullopt; + } + + // Try to parse the actual color value of each component. + for (size_t component = 0; component < 3; component++) { - for (size_t component = 0; component < 3; component++) + bool foundColor = false; + auto& parameterValue = til::at(parameterValues, component); + // For "sharp sign" format, the rgbHexDigitCount is known. + // For "rgb:" format, colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's + const auto iteration = isSharpSignFormat ? rgbHexDigitCount : 4; + for (size_t i = 0; i < iteration && curr < string.cend(); i++) { - bool foundColor = false; - auto& parameterValue = til::at(parameterValues, component); - // For "sharp sign" format, the rgbHexDigitCount is known. - // For "rgb:" format, colorspecs are up to hhhh/hhhh/hhhh, for 1-4 h's - const auto iteration = isSharpSignFormat ? rgbHexDigitCount : 4; - for (size_t i = 0; i < iteration && curr < string.cend(); i++) + const wchar_t wch = *curr++; + + parameterValue *= 16; + unsigned int intVal = 0; + const auto ret = HexToUint(wch, intVal); + if (!ret) { - const wchar_t wch = *curr++; + // Encountered something weird oh no + return std::nullopt; + } + + parameterValue += intVal; - parameterValue *= 16; - unsigned int intVal = 0; - const auto ret = HexToUint(wch, intVal); - if (!ret) + if (isSharpSignFormat) + { + // If we get this far, any number can be seen as a valid part + // of this component. + foundColor = true; + + if (i >= rgbHexDigitCount) { - // Encountered something weird oh no - return std::nullopt; + // Successfully parsed this component. Start the next one. + break; } + } + else + { + // Record the hex digit count of the current component. + rgbHexDigitCount = i + 1; - parameterValue += intVal; - - if (isSharpSignFormat) + // If this is the first 2 component... + if (component < 2 && curr < string.cend() && *curr == L'/') { - // If we get this far, any number can be seen as a valid part - // of this component. + // ...and we have successfully parsed this component, we need + // to skip the delimiter before starting the next one. + curr++; foundColor = true; - - if (i >= rgbHexDigitCount) - { - // Successfully parsed this component. Start the next one. - break; - } + break; } - else + // Or we have reached the end of the string... + else if (curr >= string.cend()) { - // Record the hex digit count of the current component. - rgbHexDigitCount = i + 1; - - // If this is the first 2 component... - if (component < 2 && curr < string.cend() && *curr == L'/') - { - // ...and we have successfully parsed this component, we need - // to skip the delimiter before starting the next one. - curr++; - foundColor = true; - break; - } - // Or we have reached the end of the string... - else if (curr >= string.cend()) - { - // ...meaning that this is the last component. We're not going to - // see any delimiter. We can just break out. - foundColor = true; - break; - } + // ...meaning that this is the last component. We're not going to + // see any delimiter. We can just break out. + foundColor = true; + break; } } - - if (!foundColor) - { - // Indicates there was some error parsing color. - return std::nullopt; - } - - // Calculate the actual color value based on the hex digit count. - auto& colorValue = til::at(colorValues, component); - const auto scaleMultiplier = isSharpSignFormat ? 0x10 : 0x11; - const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); - colorValue = parameterValue * scaleMultiplier / scaleDivisor; } - if (curr >= string.cend()) + if (!foundColor) { - // We're at the end of the string and we have successfully parsed the color. - foundValidColorSpec = true; + // Indicates there was some error parsing color. + return std::nullopt; } + + // Calculate the actual color value based on the hex digit count. + auto& colorValue = til::at(colorValues, component); + const auto scaleMultiplier = isSharpSignFormat ? 0x10 : 0x11; + const auto scaleDivisor = scaleMultiplier << 8 >> 4 * (4 - rgbHexDigitCount); + colorValue = parameterValue * scaleMultiplier / scaleDivisor; + } + + if (curr >= string.cend()) + { + // We're at the end of the string and we have successfully parsed the color. + foundValidColorSpec = true; } // Only if we find a valid colorspec can we pass it out successfully. From 9f81761a5cffe70b0a69ad80ae17a47473849534 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Thu, 17 Sep 2020 09:40:28 +0800 Subject: [PATCH 33/43] More tests --- src/types/ut_types/UtilsTests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 6cfc020f8f0..a9c9d453bad 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -168,6 +168,10 @@ void UtilsTests::TestColorFromXTermColor() _VerifyXTermColorInvalid(L"123456"); _VerifyXTermColorInvalid(L"rgb:1/1/1"); _VerifyXTermColorInvalid(L"中文rgb:1/1/1"); + _VerifyXTermColorInvalid(L"rgb中文:1/1/1"); + _VerifyXTermColorInvalid(L"RGBİ1/1/1"); + _VerifyXTermColorInvalid(L"rgbİ1/1/1"); + _VerifyXTermColorInvalid(L"rgbİ:1/1/1"); } void UtilsTests::_VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue) From 401d6f79f2c44b39c8c591bdbdb3790067772abb Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Thu, 17 Sep 2020 11:17:13 +0800 Subject: [PATCH 34/43] Even more tests --- .../parser/ut_parser/OutputEngineTest.cpp | 38 ++++++++++++++++++- src/types/ut_types/UtilsTests.cpp | 8 +++- src/types/utils.cpp | 2 +- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp index 328af7cfd9b..45ec5ca2185 100644 --- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp +++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp @@ -2722,6 +2722,12 @@ class StateMachineExternalTest final pDispatch->ClearState(); + // Invalid multi-param sequences. + mach.ProcessString(L"\033]10;;rgb:1/1/1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); + + pDispatch->ClearState(); + mach.ProcessString(L"\033]10;#1;rgb:1/1/1\033\\"); VERIFY_IS_FALSE(pDispatch->_setDefaultForeground); @@ -2795,6 +2801,12 @@ class StateMachineExternalTest final pDispatch->ClearState(); + // Invalid multi-param sequences. + mach.ProcessString(L"\033]11;;rgb:1/1/1\033\\"); + VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); + + pDispatch->ClearState(); + mach.ProcessString(L"\033]11;#1;rgb:1/1/1\033\\"); VERIFY_IS_FALSE(pDispatch->_setDefaultBackground); @@ -2894,6 +2906,16 @@ class StateMachineExternalTest final pDispatch->ClearState(); // Partially valid sequences. Valid colors should not be affected by invalid colors. + mach.ProcessString(L"\033]4;0;rgb:11;1;rgb:2/2/2;2;#111;3;orange;4;#111\033\\"); + VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0x22, 0x22, 0x22), pDispatch->_colorTable.at(1)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(2)); + VERIFY_ARE_EQUAL(RGB(255, 165, 0), pDispatch->_colorTable.at(3)); + VERIFY_ARE_EQUAL(RGB(0x10, 0x10, 0x10), pDispatch->_colorTable.at(4)); + + pDispatch->ClearState(); + mach.ProcessString(L"\033]4;0;rgb:1/1/1;1;rgb:2/2/2;2;#111;3;orange;4;111\033\\"); VERIFY_IS_TRUE(pDispatch->_setColorTableEntry); VERIFY_ARE_EQUAL(RGB(0x11, 0x11, 0x11), pDispatch->_colorTable.at(0)); @@ -2914,7 +2936,21 @@ class StateMachineExternalTest final pDispatch->ClearState(); - // Invalid sequences. + // Invalid multi-param sequences + mach.ProcessString(L"\033]4;0;;1;;\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(1)); + + pDispatch->ClearState(); + + mach.ProcessString(L"\033]4;0;;;;;1;;;;;\033\\"); + VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(0)); + VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(1)); + + pDispatch->ClearState(); + mach.ProcessString(L"\033]4;0;rgb:1/1/;16;rgb:2/2/;64;#11\033\\"); VERIFY_IS_FALSE(pDispatch->_setColorTableEntry); VERIFY_ARE_EQUAL(RGB(0, 0, 0), pDispatch->_colorTable.at(0)); diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index a9c9d453bad..2051d1c97f1 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -98,6 +98,7 @@ void UtilsTests::TestGuidToString() void UtilsTests::TestColorFromXTermColor() { _VerifyXTermColorResult(L"rgb:1/1/1", RGB(0x11, 0x11, 0x11)); + _VerifyXTermColorResult(L"rGb:1/1/1", RGB(0x11, 0x11, 0x11)); _VerifyXTermColorResult(L"RGB:1/1/1", RGB(0x11, 0x11, 0x11)); _VerifyXTermColorResult(L"rgb:111/1/1", RGB(0x11, 0x11, 0x11)); _VerifyXTermColorResult(L"rgb:1111/1/1", RGB(0x11, 0x11, 0x11)); @@ -152,6 +153,8 @@ void UtilsTests::TestColorFromXTermColor() _VerifyXTermColorInvalid(L"cmyk:1/1/1/1"); _VerifyXTermColorInvalid(L"rgb#111"); _VerifyXTermColorInvalid(L"rgb:#111"); + _VerifyXTermColorInvalid(L"rgb:rgb:1/1/1"); + _VerifyXTermColorInvalid(L"rgb:rgb:#111"); _VerifyXTermColorInvalid(L"#"); _VerifyXTermColorInvalid(L"#1"); _VerifyXTermColorInvalid(L"#1111"); @@ -162,16 +165,19 @@ void UtilsTests::TestColorFromXTermColor() _VerifyXTermColorInvalid(L"#/1/1/1"); _VerifyXTermColorInvalid(L"#rgb:1/1/1"); _VerifyXTermColorInvalid(L"#111invalid"); - _VerifyXTermColorInvalid(L"#1111111111111111"); _VerifyXTermColorInvalid(L"#invalid111"); + _VerifyXTermColorInvalid(L"#1111111111111111"); _VerifyXTermColorInvalid(L"12/34/56"); _VerifyXTermColorInvalid(L"123456"); _VerifyXTermColorInvalid(L"rgb:1/1/1"); _VerifyXTermColorInvalid(L"中文rgb:1/1/1"); _VerifyXTermColorInvalid(L"rgb中文:1/1/1"); + _VerifyXTermColorInvalid(L"这是一句中文"); _VerifyXTermColorInvalid(L"RGBİ1/1/1"); _VerifyXTermColorInvalid(L"rgbİ1/1/1"); _VerifyXTermColorInvalid(L"rgbİ:1/1/1"); + _VerifyXTermColorInvalid(L"rgß:1/1/1"); + _VerifyXTermColorInvalid(L"rgẞ:1/1/1"); } void UtilsTests::_VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 8bf856ad749..d007ddcd6b2 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -160,7 +160,7 @@ try // The "rgb:" indicator should be case insensitive. To prevent possible issues under // different locales, transform only ASCII range latin characters. std::transform(prefix.begin(), prefix.end(), prefix.begin(), [](const auto x) { - return x >= L'A' && x <= L'Z' ? static_cast(x - L'A' + L'a') : x; + return x >= L'A' && x <= L'Z' ? static_cast(std::towlower(x)) : x; }); if (prefix.compare(L"rgb:") == 0) From 123c7b0f422a75efa15a95a9aa30498927edc1ba Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 19 Sep 2020 19:35:02 +0800 Subject: [PATCH 35/43] Resolve comments --- .../parser/OutputStateMachineEngine.cpp | 130 +++++------------- src/types/inc/utils.hpp | 2 + src/types/utils.cpp | 77 +++++++++++ 3 files changed, 113 insertions(+), 96 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 217eb775441..dedb872097a 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -780,8 +780,8 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, case OscActionCodes::SetColor: for (size_t i = 0; i < tableIndexes.size(); i++) { - auto tableIndex = tableIndexes.at(i); - auto rgb = colors.at(i); + const auto tableIndex = til::at(tableIndexes, i); + const auto rgb = til::at(colors, i); success = _dispatch->SetColorTableEntry(tableIndex, rgb); } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCCT); @@ -789,21 +789,21 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/, case OscActionCodes::SetForegroundColor: if (colors.size() > 0) { - success = _dispatch->SetDefaultForeground(colors.at(0)); + success = _dispatch->SetDefaultForeground(til::at(colors, 0)); } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCFG); break; case OscActionCodes::SetBackgroundColor: if (colors.size() > 0) { - success = _dispatch->SetDefaultBackground(colors.at(0)); + success = _dispatch->SetDefaultBackground(til::at(colors, 0)); } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCBG); break; case OscActionCodes::SetCursorColor: if (colors.size() > 0) { - success = _dispatch->SetCursorColor(colors.at(0)); + success = _dispatch->SetCursorColor(til::at(colors, 0)); } TermTelemetry::Instance().Log(TermTelemetry::Codes::OSCSCC); break; @@ -1364,17 +1364,6 @@ bool OutputStateMachineEngine::DispatchIntermediatesFromEscape() const noexcept #pragma warning(push) #pragma warning(disable : 26497) // We don't use any of these "constexprable" functions in that fashion -// Routine Description: -// - Determines if a character is a valid number character, 0-9. -// Arguments: -// - wch - Character to check. -// Return Value: -// - True if it is. False if it isn't. -static constexpr bool _isNumber(const wchar_t wch) noexcept -{ - return wch >= L'0' && wch <= L'9'; // 0x30 - 0x39 -} - #pragma warning(pop) // Routine Description: @@ -1395,67 +1384,30 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri std::vector& rgbs) const noexcept try { - tableIndexes.clear(); - rgbs.clear(); - size_t _TableIndex = 0; + std::vector newTableIndexes; + std::vector newRgbs; - size_t current = 0; - while (current < string.size()) + const auto parts = Utils::SplitString(string, L';'); + if (parts.size() <= 1) { - // First try to get the table index, a number between [0,256] - const wchar_t wch = string.at(current); - if (_isNumber(wch)) - { - _TableIndex *= 10; - _TableIndex += wch - L'0'; - - ++current; - } - else if (wch == L';' && current > 0) - { - // We have found the table index and can move on. - // We need to explicitly know the table index, we can't default to 0 if - // there's no param - ++current; - - // Now we need to parse the RGB color value from the string. - std::optional colorOptional; - - // Find the next ';' to determine how to substr. - // For example if the string is '0;rgb:1/1/1;1;rgb/2/2/2', we will need - // to correctly recognize both "0;rgb:1/1/1;" and "1;rgb/2/2/2". - const auto nextDelimiter = string.find(L";", current); - if (nextDelimiter == std::wstring::npos) - { - colorOptional = Utils::ColorFromXTermColor(string.substr(current)); - // No more delimiter means no more left for parsing. This will effectively break out the loop. - current = string.size(); - } - else - { - // Substr until the delimiter. - const auto length = nextDelimiter - current; - colorOptional = Utils::ColorFromXTermColor(string.substr(current, length)); - // Skip this color and the delimiter. Start the next one. - current += length + 1; - } - - if (colorOptional.has_value()) - { - tableIndexes.push_back(_TableIndex); - rgbs.push_back(colorOptional.value()); - } + return false; + } - // Reset the state. - _TableIndex = 0; - } - else + for (size_t i = 0, j = 1; j < parts.size(); i += 2, j += 2) + { + unsigned int tableIndex = 0; + const bool indexSuccess = Utils::StringToUint(parts.at(i), tableIndex); + const auto colorOptional = Utils::ColorFromXTermColor(parts.at(j)); + if (indexSuccess && colorOptional.has_value()) { - // Found an unexpected character, fail. - break; + newTableIndexes.push_back(tableIndex); + newRgbs.push_back(colorOptional.value()); } } + tableIndexes.swap(newTableIndexes); + rgbs.swap(newRgbs); + return tableIndexes.size() > 0 && rgbs.size() > 0; } CATCH_LOG_RETURN_FALSE() @@ -1517,45 +1469,31 @@ bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, std::vector& rgbs) const noexcept try { - rgbs.clear(); - + std::vector newRgbs; bool success = false; - size_t current = 0; - size_t expectedColorCount = 0; - - while (current < string.size()) + const auto parts = Utils::SplitString(string, L';'); + if (parts.size() < 1) { - std::optional colorOptional; - const auto nextDelimiter = string.find(L";", current); - if (nextDelimiter == std::wstring::npos) - { - colorOptional = Utils::ColorFromXTermColor(string.substr(current)); - // No more delimiter means no more left for parsing. This will effectively break out the loop. - current = string.size(); - } - else - { - // Substr until the delimiter. - const auto length = nextDelimiter - current; - colorOptional = Utils::ColorFromXTermColor(string.substr(current, length)); - // Skip this color and the delimiter. Start the next one. - current += length + 1; - } - - expectedColorCount++; + return false; + } + for (size_t i = 0; i < parts.size(); i++) + { + const auto colorOptional = Utils::ColorFromXTermColor(parts.at(i)); if (colorOptional.has_value()) { - rgbs.push_back(colorOptional.value()); + newRgbs.push_back(colorOptional.value()); // Only mark the parsing as a success iff the first color is a success. - if (expectedColorCount == 1) + if (i == 0) { success = true; } } } + rgbs.swap(newRgbs); + return success; } CATCH_LOG_RETURN_FALSE() diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index 8ba21e1ddc3..ac54c79cf30 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -49,6 +49,8 @@ namespace Microsoft::Console::Utils std::optional ColorFromXParseColorSpec(const std::wstring_view wstr) noexcept; bool HexToUint(const wchar_t wch, unsigned int& value) noexcept; + bool StringToUint(const std::wstring_view wstr, unsigned int& value); + std::vector SplitString(const std::wstring_view wstr, const wchar_t delimeter); constexpr uint16_t EndianSwap(uint16_t value) { diff --git a/src/types/utils.cpp b/src/types/utils.cpp index d007ddcd6b2..c251da0bc11 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -7,6 +7,17 @@ using namespace Microsoft::Console; +// Routine Description: +// - Determines if a character is a valid number character, 0-9. +// Arguments: +// - wch - Character to check. +// Return Value: +// - True if it is. False if it isn't. +static constexpr bool _isNumber(const wchar_t wch) noexcept +{ + return wch >= L'0' && wch <= L'9'; // 0x30 - 0x39 +} + // Function Description: // - Creates a String representation of a guid, in the format // "{12345678-ABCD-EF12-3456-7890ABCDEF12}" @@ -335,6 +346,72 @@ bool Utils::HexToUint(const wchar_t wch, return success; } +// Routine Description: +// - Converts a number string to its equivalent integer value. +// Arguments: +// - wstr - String to convert. +// - value - receives the int value of the string +// Return Value: +// - true iff the string is a number string. +bool Utils::StringToUint(const std::wstring_view wstr, + unsigned int& value) +{ + unsigned int result = 0; + size_t current = 0; + while (current < wstr.size()) + { + const wchar_t wch = wstr.at(current); + if (_isNumber(wch)) + { + result *= 10; + result += wch - L'0'; + + ++current; + } + else + { + return false; + } + } + + value = result; + + return true; +} + + +// Routine Description: +// - Split a string into different parts using the delimeter provided. +// Arguments: +// - wstr - String to split. +// - delimeter - delimeter to use. +// Return Value: +// - a vector containing the result string parts. +std::vector Utils::SplitString(const std::wstring_view wstr, + const wchar_t delimeter) +{ + std::vector result; + size_t current = 0; + while (current < wstr.size()) + { + const auto nextDelimiter = wstr.find(delimeter, current); + if (nextDelimiter == std::wstring::npos) + { + result.push_back(wstr.substr(current)); + break; + } + else + { + const auto length = nextDelimiter - current; + result.push_back(wstr.substr(current, length)); + // Skip this part and the delimiter. Start the next one + current += length + 1; + } + } + + return result; +} + // Routine Description: // - Shorthand check if a handle value is null or invalid. // Arguments: From da9c42dbac4dd9e05facc3d6784f96e8ebf7dee7 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Sun, 20 Sep 2020 12:19:08 +0800 Subject: [PATCH 36/43] Weekend Update. Get it? In SNL?.. --- src/terminal/parser/OutputStateMachineEngine.cpp | 10 +++++----- src/types/inc/utils.hpp | 2 +- src/types/utils.cpp | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index dedb872097a..7f8dea91eff 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1384,15 +1384,15 @@ bool OutputStateMachineEngine::_GetOscSetColorTable(const std::wstring_view stri std::vector& rgbs) const noexcept try { - std::vector newTableIndexes; - std::vector newRgbs; - const auto parts = Utils::SplitString(string, L';'); - if (parts.size() <= 1) + if (parts.size() < 2) { return false; } + std::vector newTableIndexes; + std::vector newRgbs; + for (size_t i = 0, j = 1; j < parts.size(); i += 2, j += 2) { unsigned int tableIndex = 0; @@ -1469,7 +1469,6 @@ bool OutputStateMachineEngine::_GetOscSetColor(const std::wstring_view string, std::vector& rgbs) const noexcept try { - std::vector newRgbs; bool success = false; const auto parts = Utils::SplitString(string, L';'); @@ -1478,6 +1477,7 @@ try return false; } + std::vector newRgbs; for (size_t i = 0; i < parts.size(); i++) { const auto colorOptional = Utils::ColorFromXTermColor(parts.at(i)); diff --git a/src/types/inc/utils.hpp b/src/types/inc/utils.hpp index ac54c79cf30..3fa1a8a82bb 100644 --- a/src/types/inc/utils.hpp +++ b/src/types/inc/utils.hpp @@ -50,7 +50,7 @@ namespace Microsoft::Console::Utils bool HexToUint(const wchar_t wch, unsigned int& value) noexcept; bool StringToUint(const std::wstring_view wstr, unsigned int& value); - std::vector SplitString(const std::wstring_view wstr, const wchar_t delimeter); + std::vector SplitString(const std::wstring_view wstr, const wchar_t delimiter); constexpr uint16_t EndianSwap(uint16_t value) { diff --git a/src/types/utils.cpp b/src/types/utils.cpp index c251da0bc11..c3ffec029cf 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -379,22 +379,21 @@ bool Utils::StringToUint(const std::wstring_view wstr, return true; } - // Routine Description: // - Split a string into different parts using the delimeter provided. // Arguments: // - wstr - String to split. -// - delimeter - delimeter to use. +// - delimiter - delimiter to use. // Return Value: // - a vector containing the result string parts. std::vector Utils::SplitString(const std::wstring_view wstr, - const wchar_t delimeter) + const wchar_t delimiter) { std::vector result; size_t current = 0; while (current < wstr.size()) { - const auto nextDelimiter = wstr.find(delimeter, current); + const auto nextDelimiter = wstr.find(delimiter, current); if (nextDelimiter == std::wstring::npos) { result.push_back(wstr.substr(current)); From 7570496020ebd9415a6e05cfe70907dfb22ff294 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Sun, 20 Sep 2020 12:47:09 +0800 Subject: [PATCH 37/43] Even more tests --- src/types/ut_types/UtilsTests.cpp | 60 ++++++++++++++++++++++++++++++- src/types/utils.cpp | 18 ++++++++-- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 2051d1c97f1..74f26166082 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -22,6 +22,8 @@ class UtilsTests TEST_METHOD(TestClampToShortMax); TEST_METHOD(TestSwapColorPalette); TEST_METHOD(TestGuidToString); + TEST_METHOD(TestSplitString); + TEST_METHOD(TestStringToUint); TEST_METHOD(TestColorFromXTermColor); void _VerifyXTermColorResult(const std::wstring_view wstr, DWORD colorValue); @@ -95,6 +97,62 @@ void UtilsTests::TestGuidToString() VERIFY_ARE_EQUAL(constantGuidString, generatedGuid); } +void UtilsTests::TestSplitString() +{ + std::vector result; + result = SplitString(L"", L';'); + VERIFY_ARE_EQUAL(0, result.size()); + result = SplitString(L"1", L';'); + VERIFY_ARE_EQUAL(1, result.size()); + result = SplitString(L"123", L';'); + VERIFY_ARE_EQUAL(1, result.size()); + + result = SplitString(L";123", L';'); + VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(L"", result.at(0)); + VERIFY_ARE_EQUAL(L"123", result.at(1)); + + result = SplitString(L"123;", L';'); + VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(L"123", result.at(0)); + VERIFY_ARE_EQUAL(L"", result.at(1)); + + result = SplitString(L"123;456", L';'); + VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(L"123", result.at(0)); + VERIFY_ARE_EQUAL(L"456", result.at(1)); + + result = SplitString(L"123;456;789", L';'); + VERIFY_ARE_EQUAL(3, result.size()); + VERIFY_ARE_EQUAL(L"123", result.at(0)); + VERIFY_ARE_EQUAL(L"456", result.at(1)); + VERIFY_ARE_EQUAL(L"789", result.at(2)); +} + +void UtilsTests::TestStringToUint() +{ + bool success = false; + unsigned int value = 0; + success = StringToUint(L"", value); + VERIFY_IS_FALSE(success); + success = StringToUint(L"xyz", value); + VERIFY_IS_FALSE(success); + success = StringToUint(L";", value); + VERIFY_IS_FALSE(success); + + success = StringToUint(L"1", value); + VERIFY_IS_TRUE(success); + VERIFY_ARE_EQUAL(1u, value); + + success = StringToUint(L"123", value); + VERIFY_IS_TRUE(success); + VERIFY_ARE_EQUAL(123u, value); + + success = StringToUint(L"123456789", value); + VERIFY_IS_TRUE(success); + VERIFY_ARE_EQUAL(123456789u, value); +} + void UtilsTests::TestColorFromXTermColor() { _VerifyXTermColorResult(L"rgb:1/1/1", RGB(0x11, 0x11, 0x11)); @@ -184,7 +242,7 @@ void UtilsTests::_VerifyXTermColorResult(const std::wstring_view wstr, DWORD col { std::optional color = ColorFromXTermColor(wstr); VERIFY_IS_TRUE(color.has_value()); - VERIFY_ARE_EQUAL((COLORREF)color.value(), colorValue); + VERIFY_ARE_EQUAL(colorValue, (COLORREF)color.value()); } void UtilsTests::_VerifyXTermColorInvalid(const std::wstring_view wstr) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index c3ffec029cf..1a7ebcfe7e6 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -347,15 +347,20 @@ bool Utils::HexToUint(const wchar_t wch, } // Routine Description: -// - Converts a number string to its equivalent integer value. +// - Converts a number string to its equivalent unsigned integer value. // Arguments: // - wstr - String to convert. // - value - receives the int value of the string // Return Value: -// - true iff the string is a number string. +// - true iff the string is a unsigned integer string. bool Utils::StringToUint(const std::wstring_view wstr, unsigned int& value) { + if (wstr.size() < 1) + { + return false; + } + unsigned int result = 0; size_t current = 0; while (current < wstr.size()) @@ -380,7 +385,7 @@ bool Utils::StringToUint(const std::wstring_view wstr, } // Routine Description: -// - Split a string into different parts using the delimeter provided. +// - Split a string into different parts using the delimiter provided. // Arguments: // - wstr - String to split. // - delimiter - delimiter to use. @@ -405,6 +410,13 @@ std::vector Utils::SplitString(const std::wstring_view wstr, result.push_back(wstr.substr(current, length)); // Skip this part and the delimiter. Start the next one current += length + 1; + // The next index is larger than string size, which means the string + // is in the format of "part1;part2;" (assuming use ';' as delimiter). + // Add the last part which is an empty string. + if (current >= wstr.size()) + { + result.push_back(L""); + } } } From 6f7d1da3a0947278fd730de0344d992054454a16 Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Mon, 21 Sep 2020 10:54:37 +0800 Subject: [PATCH 38/43] Fix compiling on x86 --- src/types/ut_types/UtilsTests.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 74f26166082..3898be919d5 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -101,29 +101,29 @@ void UtilsTests::TestSplitString() { std::vector result; result = SplitString(L"", L';'); - VERIFY_ARE_EQUAL(0, result.size()); + VERIFY_ARE_EQUAL(0u, result.size()); result = SplitString(L"1", L';'); - VERIFY_ARE_EQUAL(1, result.size()); + VERIFY_ARE_EQUAL(1u, result.size()); result = SplitString(L"123", L';'); - VERIFY_ARE_EQUAL(1, result.size()); + VERIFY_ARE_EQUAL(1u, result.size()); result = SplitString(L";123", L';'); - VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(2u, result.size()); VERIFY_ARE_EQUAL(L"", result.at(0)); VERIFY_ARE_EQUAL(L"123", result.at(1)); result = SplitString(L"123;", L';'); - VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(2u, result.size()); VERIFY_ARE_EQUAL(L"123", result.at(0)); VERIFY_ARE_EQUAL(L"", result.at(1)); result = SplitString(L"123;456", L';'); - VERIFY_ARE_EQUAL(2, result.size()); + VERIFY_ARE_EQUAL(2u, result.size()); VERIFY_ARE_EQUAL(L"123", result.at(0)); VERIFY_ARE_EQUAL(L"456", result.at(1)); result = SplitString(L"123;456;789", L';'); - VERIFY_ARE_EQUAL(3, result.size()); + VERIFY_ARE_EQUAL(3u, result.size()); VERIFY_ARE_EQUAL(L"123", result.at(0)); VERIFY_ARE_EQUAL(L"456", result.at(1)); VERIFY_ARE_EQUAL(L"789", result.at(2)); From a765d3c768a950edf226973df660d22999ed9809 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Thu, 8 Oct 2020 19:26:54 +0800 Subject: [PATCH 39/43] Resolve comments --- src/types/colorTable.cpp | 1384 +++++++++++++++-------------- src/types/ut_types/UtilsTests.cpp | 1 + src/types/utils.cpp | 21 +- 3 files changed, 714 insertions(+), 692 deletions(-) diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index b649aedcf4d..d3d58d250ab 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -286,683 +286,683 @@ static constexpr std::array standardXterm256ColorTable{ til::color{ 0xEE, 0xEE, 0xEE }, }; -static til::static_map xorgAppColorTable{ - std::pair{ L"aliceblue"sv, til::color{ 240, 248, 255 } }, - std::pair{ L"antiquewhite"sv, til::color{ 250, 235, 215 } }, - std::pair{ L"antiquewhite1"sv, til::color{ 255, 239, 219 } }, - std::pair{ L"antiquewhite2"sv, til::color{ 238, 223, 204 } }, - std::pair{ L"antiquewhite3"sv, til::color{ 205, 192, 176 } }, - std::pair{ L"antiquewhite4"sv, til::color{ 139, 131, 120 } }, - std::pair{ L"aqua"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"aquamarine"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"aquamarine1"sv, til::color{ 127, 255, 212 } }, - std::pair{ L"aquamarine2"sv, til::color{ 118, 238, 198 } }, - std::pair{ L"aquamarine3"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"aquamarine4"sv, til::color{ 69, 139, 116 } }, - std::pair{ L"azure"sv, til::color{ 240, 255, 255 } }, - std::pair{ L"azure1"sv, til::color{ 240, 255, 255 } }, - std::pair{ L"azure2"sv, til::color{ 224, 238, 238 } }, - std::pair{ L"azure3"sv, til::color{ 193, 205, 205 } }, - std::pair{ L"azure4"sv, til::color{ 131, 139, 139 } }, - std::pair{ L"beige"sv, til::color{ 245, 245, 220 } }, - std::pair{ L"bisque"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"bisque1"sv, til::color{ 255, 228, 196 } }, - std::pair{ L"bisque2"sv, til::color{ 238, 213, 183 } }, - std::pair{ L"bisque3"sv, til::color{ 205, 183, 158 } }, - std::pair{ L"bisque4"sv, til::color{ 139, 125, 107 } }, - std::pair{ L"black"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"blanchedalmond"sv, til::color{ 255, 235, 205 } }, - std::pair{ L"blue"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"blue1"sv, til::color{ 0, 0, 255 } }, - std::pair{ L"blue2"sv, til::color{ 0, 0, 238 } }, - std::pair{ L"blue3"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"blue4"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"blueviolet"sv, til::color{ 138, 43, 226 } }, - std::pair{ L"brown"sv, til::color{ 165, 42, 42 } }, - std::pair{ L"brown1"sv, til::color{ 255, 64, 64 } }, - std::pair{ L"brown2"sv, til::color{ 238, 59, 59 } }, - std::pair{ L"brown3"sv, til::color{ 205, 51, 51 } }, - std::pair{ L"brown4"sv, til::color{ 139, 35, 35 } }, - std::pair{ L"burlywood"sv, til::color{ 222, 184, 135 } }, - std::pair{ L"burlywood1"sv, til::color{ 255, 211, 155 } }, - std::pair{ L"burlywood2"sv, til::color{ 238, 197, 145 } }, - std::pair{ L"burlywood3"sv, til::color{ 205, 170, 125 } }, - std::pair{ L"burlywood4"sv, til::color{ 139, 115, 85 } }, - std::pair{ L"cadetblue"sv, til::color{ 95, 158, 160 } }, - std::pair{ L"cadetblue1"sv, til::color{ 152, 245, 255 } }, - std::pair{ L"cadetblue2"sv, til::color{ 142, 229, 238 } }, - std::pair{ L"cadetblue3"sv, til::color{ 122, 197, 205 } }, - std::pair{ L"cadetblue4"sv, til::color{ 83, 134, 139 } }, - std::pair{ L"chartreuse"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"chartreuse1"sv, til::color{ 127, 255, 0 } }, - std::pair{ L"chartreuse2"sv, til::color{ 118, 238, 0 } }, - std::pair{ L"chartreuse3"sv, til::color{ 102, 205, 0 } }, - std::pair{ L"chartreuse4"sv, til::color{ 69, 139, 0 } }, - std::pair{ L"chocolate"sv, til::color{ 210, 105, 30 } }, - std::pair{ L"chocolate1"sv, til::color{ 255, 127, 36 } }, - std::pair{ L"chocolate2"sv, til::color{ 238, 118, 33 } }, - std::pair{ L"chocolate3"sv, til::color{ 205, 102, 29 } }, - std::pair{ L"chocolate4"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"coral"sv, til::color{ 255, 127, 80 } }, - std::pair{ L"coral1"sv, til::color{ 255, 114, 86 } }, - std::pair{ L"coral2"sv, til::color{ 238, 106, 80 } }, - std::pair{ L"coral3"sv, til::color{ 205, 91, 69 } }, - std::pair{ L"coral4"sv, til::color{ 139, 62, 47 } }, - std::pair{ L"cornflowerblue"sv, til::color{ 100, 149, 237 } }, - std::pair{ L"cornsilk"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"cornsilk1"sv, til::color{ 255, 248, 220 } }, - std::pair{ L"cornsilk2"sv, til::color{ 238, 232, 205 } }, - std::pair{ L"cornsilk3"sv, til::color{ 205, 200, 177 } }, - std::pair{ L"cornsilk4"sv, til::color{ 139, 136, 120 } }, - std::pair{ L"crimson"sv, til::color{ 220, 20, 60 } }, - std::pair{ L"cyan"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"cyan1"sv, til::color{ 0, 255, 255 } }, - std::pair{ L"cyan2"sv, til::color{ 0, 238, 238 } }, - std::pair{ L"cyan3"sv, til::color{ 0, 205, 205 } }, - std::pair{ L"cyan4"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkblue"sv, til::color{ 0, 0, 139 } }, - std::pair{ L"darkcyan"sv, til::color{ 0, 139, 139 } }, - std::pair{ L"darkgoldenrod"sv, til::color{ 184, 134, 11 } }, - std::pair{ L"darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, - std::pair{ L"darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, - std::pair{ L"darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, - std::pair{ L"darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, - std::pair{ L"darkgray"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkgreen"sv, til::color{ 0, 100, 0 } }, - std::pair{ L"darkgrey"sv, til::color{ 169, 169, 169 } }, - std::pair{ L"darkkhaki"sv, til::color{ 189, 183, 107 } }, - std::pair{ L"darkmagenta"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"darkolivegreen"sv, til::color{ 85, 107, 47 } }, - std::pair{ L"darkolivegreen1"sv, til::color{ 202, 255, 112 } }, - std::pair{ L"darkolivegreen2"sv, til::color{ 188, 238, 104 } }, - std::pair{ L"darkolivegreen3"sv, til::color{ 162, 205, 90 } }, - std::pair{ L"darkolivegreen4"sv, til::color{ 110, 139, 61 } }, - std::pair{ L"darkorange"sv, til::color{ 255, 140, 0 } }, - std::pair{ L"darkorange1"sv, til::color{ 255, 127, 0 } }, - std::pair{ L"darkorange2"sv, til::color{ 238, 118, 0 } }, - std::pair{ L"darkorange3"sv, til::color{ 205, 102, 0 } }, - std::pair{ L"darkorange4"sv, til::color{ 139, 69, 0 } }, - std::pair{ L"darkorchid"sv, til::color{ 153, 50, 204 } }, - std::pair{ L"darkorchid1"sv, til::color{ 191, 62, 255 } }, - std::pair{ L"darkorchid2"sv, til::color{ 178, 58, 238 } }, - std::pair{ L"darkorchid3"sv, til::color{ 154, 50, 205 } }, - std::pair{ L"darkorchid4"sv, til::color{ 104, 34, 139 } }, - std::pair{ L"darkred"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"darksalmon"sv, til::color{ 233, 150, 122 } }, - std::pair{ L"darkseagreen"sv, til::color{ 143, 188, 143 } }, - std::pair{ L"darkseagreen1"sv, til::color{ 193, 255, 193 } }, - std::pair{ L"darkseagreen2"sv, til::color{ 180, 238, 180 } }, - std::pair{ L"darkseagreen3"sv, til::color{ 155, 205, 155 } }, - std::pair{ L"darkseagreen4"sv, til::color{ 105, 139, 105 } }, - std::pair{ L"darkslateblue"sv, til::color{ 72, 61, 139 } }, - std::pair{ L"darkslategray"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"darkslategray1"sv, til::color{ 151, 255, 255 } }, - std::pair{ L"darkslategray2"sv, til::color{ 141, 238, 238 } }, - std::pair{ L"darkslategray3"sv, til::color{ 121, 205, 205 } }, - std::pair{ L"darkslategray4"sv, til::color{ 82, 139, 139 } }, - std::pair{ L"darkslategrey"sv, til::color{ 47, 79, 79 } }, - std::pair{ L"darkturquoise"sv, til::color{ 0, 206, 209 } }, - std::pair{ L"darkviolet"sv, til::color{ 148, 0, 211 } }, - std::pair{ L"deeppink"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"deeppink1"sv, til::color{ 255, 20, 147 } }, - std::pair{ L"deeppink2"sv, til::color{ 238, 18, 137 } }, - std::pair{ L"deeppink3"sv, til::color{ 205, 16, 118 } }, - std::pair{ L"deeppink4"sv, til::color{ 139, 10, 80 } }, - std::pair{ L"deepskyblue"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"deepskyblue1"sv, til::color{ 0, 191, 255 } }, - std::pair{ L"deepskyblue2"sv, til::color{ 0, 178, 238 } }, - std::pair{ L"deepskyblue3"sv, til::color{ 0, 154, 205 } }, - std::pair{ L"deepskyblue4"sv, til::color{ 0, 104, 139 } }, - std::pair{ L"dimgray"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"dimgrey"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"dodgerblue"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"dodgerblue1"sv, til::color{ 30, 144, 255 } }, - std::pair{ L"dodgerblue2"sv, til::color{ 28, 134, 238 } }, - std::pair{ L"dodgerblue3"sv, til::color{ 24, 116, 205 } }, - std::pair{ L"dodgerblue4"sv, til::color{ 16, 78, 139 } }, - std::pair{ L"firebrick"sv, til::color{ 178, 34, 34 } }, - std::pair{ L"firebrick1"sv, til::color{ 255, 48, 48 } }, - std::pair{ L"firebrick2"sv, til::color{ 238, 44, 44 } }, - std::pair{ L"firebrick3"sv, til::color{ 205, 38, 38 } }, - std::pair{ L"firebrick4"sv, til::color{ 139, 26, 26 } }, - std::pair{ L"floralwhite"sv, til::color{ 255, 250, 240 } }, - std::pair{ L"forestgreen"sv, til::color{ 34, 139, 34 } }, - std::pair{ L"fuchsia"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"gainsboro"sv, til::color{ 220, 220, 220 } }, - std::pair{ L"ghostwhite"sv, til::color{ 248, 248, 255 } }, - std::pair{ L"gold"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"gold1"sv, til::color{ 255, 215, 0 } }, - std::pair{ L"gold2"sv, til::color{ 238, 201, 0 } }, - std::pair{ L"gold3"sv, til::color{ 205, 173, 0 } }, - std::pair{ L"gold4"sv, til::color{ 139, 117, 0 } }, - std::pair{ L"goldenrod"sv, til::color{ 218, 165, 32 } }, - std::pair{ L"goldenrod1"sv, til::color{ 255, 193, 37 } }, - std::pair{ L"goldenrod2"sv, til::color{ 238, 180, 34 } }, - std::pair{ L"goldenrod3"sv, til::color{ 205, 155, 29 } }, - std::pair{ L"goldenrod4"sv, til::color{ 139, 105, 20 } }, - std::pair{ L"gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"gray0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"gray1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"gray10"sv, til::color{ 26, 26, 26 } }, - std::pair{ L"gray100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"gray11"sv, til::color{ 28, 28, 28 } }, - std::pair{ L"gray12"sv, til::color{ 31, 31, 31 } }, - std::pair{ L"gray13"sv, til::color{ 33, 33, 33 } }, - std::pair{ L"gray14"sv, til::color{ 36, 36, 36 } }, - std::pair{ L"gray15"sv, til::color{ 38, 38, 38 } }, - std::pair{ L"gray16"sv, til::color{ 41, 41, 41 } }, - std::pair{ L"gray17"sv, til::color{ 43, 43, 43 } }, - std::pair{ L"gray18"sv, til::color{ 46, 46, 46 } }, - std::pair{ L"gray19"sv, til::color{ 48, 48, 48 } }, - std::pair{ L"gray2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"gray20"sv, til::color{ 51, 51, 51 } }, - std::pair{ L"gray21"sv, til::color{ 54, 54, 54 } }, - std::pair{ L"gray22"sv, til::color{ 56, 56, 56 } }, - std::pair{ L"gray23"sv, til::color{ 59, 59, 59 } }, - std::pair{ L"gray24"sv, til::color{ 61, 61, 61 } }, - std::pair{ L"gray25"sv, til::color{ 64, 64, 64 } }, - std::pair{ L"gray26"sv, til::color{ 66, 66, 66 } }, - std::pair{ L"gray27"sv, til::color{ 69, 69, 69 } }, - std::pair{ L"gray28"sv, til::color{ 71, 71, 71 } }, - std::pair{ L"gray29"sv, til::color{ 74, 74, 74 } }, - std::pair{ L"gray3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"gray30"sv, til::color{ 77, 77, 77 } }, - std::pair{ L"gray31"sv, til::color{ 79, 79, 79 } }, - std::pair{ L"gray32"sv, til::color{ 82, 82, 82 } }, - std::pair{ L"gray33"sv, til::color{ 84, 84, 84 } }, - std::pair{ L"gray34"sv, til::color{ 87, 87, 87 } }, - std::pair{ L"gray35"sv, til::color{ 89, 89, 89 } }, - std::pair{ L"gray36"sv, til::color{ 92, 92, 92 } }, - std::pair{ L"gray37"sv, til::color{ 94, 94, 94 } }, - std::pair{ L"gray38"sv, til::color{ 97, 97, 97 } }, - std::pair{ L"gray39"sv, til::color{ 99, 99, 99 } }, - std::pair{ L"gray4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"gray40"sv, til::color{ 102, 102, 102 } }, - std::pair{ L"gray41"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"gray42"sv, til::color{ 107, 107, 107 } }, - std::pair{ L"gray43"sv, til::color{ 110, 110, 110 } }, - std::pair{ L"gray44"sv, til::color{ 112, 112, 112 } }, - std::pair{ L"gray45"sv, til::color{ 115, 115, 115 } }, - std::pair{ L"gray46"sv, til::color{ 117, 117, 117 } }, - std::pair{ L"gray47"sv, til::color{ 120, 120, 120 } }, - std::pair{ L"gray48"sv, til::color{ 122, 122, 122 } }, - std::pair{ L"gray49"sv, til::color{ 125, 125, 125 } }, - std::pair{ L"gray5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"gray50"sv, til::color{ 127, 127, 127 } }, - std::pair{ L"gray51"sv, til::color{ 130, 130, 130 } }, - std::pair{ L"gray52"sv, til::color{ 133, 133, 133 } }, - std::pair{ L"gray53"sv, til::color{ 135, 135, 135 } }, - std::pair{ L"gray54"sv, til::color{ 138, 138, 138 } }, - std::pair{ L"gray55"sv, til::color{ 140, 140, 140 } }, - std::pair{ L"gray56"sv, til::color{ 143, 143, 143 } }, - std::pair{ L"gray57"sv, til::color{ 145, 145, 145 } }, - std::pair{ L"gray58"sv, til::color{ 148, 148, 148 } }, - std::pair{ L"gray59"sv, til::color{ 150, 150, 150 } }, - std::pair{ L"gray6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"gray60"sv, til::color{ 153, 153, 153 } }, - std::pair{ L"gray61"sv, til::color{ 156, 156, 156 } }, - std::pair{ L"gray62"sv, til::color{ 158, 158, 158 } }, - std::pair{ L"gray63"sv, til::color{ 161, 161, 161 } }, - std::pair{ L"gray64"sv, til::color{ 163, 163, 163 } }, - std::pair{ L"gray65"sv, til::color{ 166, 166, 166 } }, - std::pair{ L"gray66"sv, til::color{ 168, 168, 168 } }, - std::pair{ L"gray67"sv, til::color{ 171, 171, 171 } }, - std::pair{ L"gray68"sv, til::color{ 173, 173, 173 } }, - std::pair{ L"gray69"sv, til::color{ 176, 176, 176 } }, - std::pair{ L"gray7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"gray70"sv, til::color{ 179, 179, 179 } }, - std::pair{ L"gray71"sv, til::color{ 181, 181, 181 } }, - std::pair{ L"gray72"sv, til::color{ 184, 184, 184 } }, - std::pair{ L"gray73"sv, til::color{ 186, 186, 186 } }, - std::pair{ L"gray74"sv, til::color{ 189, 189, 189 } }, - std::pair{ L"gray75"sv, til::color{ 191, 191, 191 } }, - std::pair{ L"gray76"sv, til::color{ 194, 194, 194 } }, - std::pair{ L"gray77"sv, til::color{ 196, 196, 196 } }, - std::pair{ L"gray78"sv, til::color{ 199, 199, 199 } }, - std::pair{ L"gray79"sv, til::color{ 201, 201, 201 } }, - std::pair{ L"gray8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"gray80"sv, til::color{ 204, 204, 204 } }, - std::pair{ L"gray81"sv, til::color{ 207, 207, 207 } }, - std::pair{ L"gray82"sv, til::color{ 209, 209, 209 } }, - std::pair{ L"gray83"sv, til::color{ 212, 212, 212 } }, - std::pair{ L"gray84"sv, til::color{ 214, 214, 214 } }, - std::pair{ L"gray85"sv, til::color{ 217, 217, 217 } }, - std::pair{ L"gray86"sv, til::color{ 219, 219, 219 } }, - std::pair{ L"gray87"sv, til::color{ 222, 222, 222 } }, - std::pair{ L"gray88"sv, til::color{ 224, 224, 224 } }, - std::pair{ L"gray89"sv, til::color{ 227, 227, 227 } }, - std::pair{ L"gray9"sv, til::color{ 23, 23, 23 } }, - std::pair{ L"gray90"sv, til::color{ 229, 229, 229 } }, - std::pair{ L"gray91"sv, til::color{ 232, 232, 232 } }, - std::pair{ L"gray92"sv, til::color{ 235, 235, 235 } }, - std::pair{ L"gray93"sv, til::color{ 237, 237, 237 } }, - std::pair{ L"gray94"sv, til::color{ 240, 240, 240 } }, - std::pair{ L"gray95"sv, til::color{ 242, 242, 242 } }, - std::pair{ L"gray96"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"gray97"sv, til::color{ 247, 247, 247 } }, - std::pair{ L"gray98"sv, til::color{ 250, 250, 250 } }, - std::pair{ L"gray99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"green1"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"green2"sv, til::color{ 0, 238, 0 } }, - std::pair{ L"green3"sv, til::color{ 0, 205, 0 } }, - std::pair{ L"green4"sv, til::color{ 0, 139, 0 } }, - std::pair{ L"greenyellow"sv, til::color{ 173, 255, 47 } }, - std::pair{ L"grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"grey0"sv, til::color{ 0, 0, 0 } }, - std::pair{ L"grey1"sv, til::color{ 3, 3, 3 } }, - std::pair{ L"grey10"sv, til::color{ 26, 26, 26 } }, - std::pair{ L"grey100"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"grey11"sv, til::color{ 28, 28, 28 } }, - std::pair{ L"grey12"sv, til::color{ 31, 31, 31 } }, - std::pair{ L"grey13"sv, til::color{ 33, 33, 33 } }, - std::pair{ L"grey14"sv, til::color{ 36, 36, 36 } }, - std::pair{ L"grey15"sv, til::color{ 38, 38, 38 } }, - std::pair{ L"grey16"sv, til::color{ 41, 41, 41 } }, - std::pair{ L"grey17"sv, til::color{ 43, 43, 43 } }, - std::pair{ L"grey18"sv, til::color{ 46, 46, 46 } }, - std::pair{ L"grey19"sv, til::color{ 48, 48, 48 } }, - std::pair{ L"grey2"sv, til::color{ 5, 5, 5 } }, - std::pair{ L"grey20"sv, til::color{ 51, 51, 51 } }, - std::pair{ L"grey21"sv, til::color{ 54, 54, 54 } }, - std::pair{ L"grey22"sv, til::color{ 56, 56, 56 } }, - std::pair{ L"grey23"sv, til::color{ 59, 59, 59 } }, - std::pair{ L"grey24"sv, til::color{ 61, 61, 61 } }, - std::pair{ L"grey25"sv, til::color{ 64, 64, 64 } }, - std::pair{ L"grey26"sv, til::color{ 66, 66, 66 } }, - std::pair{ L"grey27"sv, til::color{ 69, 69, 69 } }, - std::pair{ L"grey28"sv, til::color{ 71, 71, 71 } }, - std::pair{ L"grey29"sv, til::color{ 74, 74, 74 } }, - std::pair{ L"grey3"sv, til::color{ 8, 8, 8 } }, - std::pair{ L"grey30"sv, til::color{ 77, 77, 77 } }, - std::pair{ L"grey31"sv, til::color{ 79, 79, 79 } }, - std::pair{ L"grey32"sv, til::color{ 82, 82, 82 } }, - std::pair{ L"grey33"sv, til::color{ 84, 84, 84 } }, - std::pair{ L"grey34"sv, til::color{ 87, 87, 87 } }, - std::pair{ L"grey35"sv, til::color{ 89, 89, 89 } }, - std::pair{ L"grey36"sv, til::color{ 92, 92, 92 } }, - std::pair{ L"grey37"sv, til::color{ 94, 94, 94 } }, - std::pair{ L"grey38"sv, til::color{ 97, 97, 97 } }, - std::pair{ L"grey39"sv, til::color{ 99, 99, 99 } }, - std::pair{ L"grey4"sv, til::color{ 10, 10, 10 } }, - std::pair{ L"grey40"sv, til::color{ 102, 102, 102 } }, - std::pair{ L"grey41"sv, til::color{ 105, 105, 105 } }, - std::pair{ L"grey42"sv, til::color{ 107, 107, 107 } }, - std::pair{ L"grey43"sv, til::color{ 110, 110, 110 } }, - std::pair{ L"grey44"sv, til::color{ 112, 112, 112 } }, - std::pair{ L"grey45"sv, til::color{ 115, 115, 115 } }, - std::pair{ L"grey46"sv, til::color{ 117, 117, 117 } }, - std::pair{ L"grey47"sv, til::color{ 120, 120, 120 } }, - std::pair{ L"grey48"sv, til::color{ 122, 122, 122 } }, - std::pair{ L"grey49"sv, til::color{ 125, 125, 125 } }, - std::pair{ L"grey5"sv, til::color{ 13, 13, 13 } }, - std::pair{ L"grey50"sv, til::color{ 127, 127, 127 } }, - std::pair{ L"grey51"sv, til::color{ 130, 130, 130 } }, - std::pair{ L"grey52"sv, til::color{ 133, 133, 133 } }, - std::pair{ L"grey53"sv, til::color{ 135, 135, 135 } }, - std::pair{ L"grey54"sv, til::color{ 138, 138, 138 } }, - std::pair{ L"grey55"sv, til::color{ 140, 140, 140 } }, - std::pair{ L"grey56"sv, til::color{ 143, 143, 143 } }, - std::pair{ L"grey57"sv, til::color{ 145, 145, 145 } }, - std::pair{ L"grey58"sv, til::color{ 148, 148, 148 } }, - std::pair{ L"grey59"sv, til::color{ 150, 150, 150 } }, - std::pair{ L"grey6"sv, til::color{ 15, 15, 15 } }, - std::pair{ L"grey60"sv, til::color{ 153, 153, 153 } }, - std::pair{ L"grey61"sv, til::color{ 156, 156, 156 } }, - std::pair{ L"grey62"sv, til::color{ 158, 158, 158 } }, - std::pair{ L"grey63"sv, til::color{ 161, 161, 161 } }, - std::pair{ L"grey64"sv, til::color{ 163, 163, 163 } }, - std::pair{ L"grey65"sv, til::color{ 166, 166, 166 } }, - std::pair{ L"grey66"sv, til::color{ 168, 168, 168 } }, - std::pair{ L"grey67"sv, til::color{ 171, 171, 171 } }, - std::pair{ L"grey68"sv, til::color{ 173, 173, 173 } }, - std::pair{ L"grey69"sv, til::color{ 176, 176, 176 } }, - std::pair{ L"grey7"sv, til::color{ 18, 18, 18 } }, - std::pair{ L"grey70"sv, til::color{ 179, 179, 179 } }, - std::pair{ L"grey71"sv, til::color{ 181, 181, 181 } }, - std::pair{ L"grey72"sv, til::color{ 184, 184, 184 } }, - std::pair{ L"grey73"sv, til::color{ 186, 186, 186 } }, - std::pair{ L"grey74"sv, til::color{ 189, 189, 189 } }, - std::pair{ L"grey75"sv, til::color{ 191, 191, 191 } }, - std::pair{ L"grey76"sv, til::color{ 194, 194, 194 } }, - std::pair{ L"grey77"sv, til::color{ 196, 196, 196 } }, - std::pair{ L"grey78"sv, til::color{ 199, 199, 199 } }, - std::pair{ L"grey79"sv, til::color{ 201, 201, 201 } }, - std::pair{ L"grey8"sv, til::color{ 20, 20, 20 } }, - std::pair{ L"grey80"sv, til::color{ 204, 204, 204 } }, - std::pair{ L"grey81"sv, til::color{ 207, 207, 207 } }, - std::pair{ L"grey82"sv, til::color{ 209, 209, 209 } }, - std::pair{ L"grey83"sv, til::color{ 212, 212, 212 } }, - std::pair{ L"grey84"sv, til::color{ 214, 214, 214 } }, - std::pair{ L"grey85"sv, til::color{ 217, 217, 217 } }, - std::pair{ L"grey86"sv, til::color{ 219, 219, 219 } }, - std::pair{ L"grey87"sv, til::color{ 222, 222, 222 } }, - std::pair{ L"grey88"sv, til::color{ 224, 224, 224 } }, - std::pair{ L"grey89"sv, til::color{ 227, 227, 227 } }, - std::pair{ L"grey9"sv, til::color{ 23, 23, 23 } }, - std::pair{ L"grey90"sv, til::color{ 229, 229, 229 } }, - std::pair{ L"grey91"sv, til::color{ 232, 232, 232 } }, - std::pair{ L"grey92"sv, til::color{ 235, 235, 235 } }, - std::pair{ L"grey93"sv, til::color{ 237, 237, 237 } }, - std::pair{ L"grey94"sv, til::color{ 240, 240, 240 } }, - std::pair{ L"grey95"sv, til::color{ 242, 242, 242 } }, - std::pair{ L"grey96"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"grey97"sv, til::color{ 247, 247, 247 } }, - std::pair{ L"grey98"sv, til::color{ 250, 250, 250 } }, - std::pair{ L"grey99"sv, til::color{ 252, 252, 252 } }, - std::pair{ L"honeydew"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"honeydew1"sv, til::color{ 240, 255, 240 } }, - std::pair{ L"honeydew2"sv, til::color{ 224, 238, 224 } }, - std::pair{ L"honeydew3"sv, til::color{ 193, 205, 193 } }, - std::pair{ L"honeydew4"sv, til::color{ 131, 139, 131 } }, - std::pair{ L"hotpink"sv, til::color{ 255, 105, 180 } }, - std::pair{ L"hotpink1"sv, til::color{ 255, 110, 180 } }, - std::pair{ L"hotpink2"sv, til::color{ 238, 106, 167 } }, - std::pair{ L"hotpink3"sv, til::color{ 205, 96, 144 } }, - std::pair{ L"hotpink4"sv, til::color{ 139, 58, 98 } }, - std::pair{ L"indianred"sv, til::color{ 205, 92, 92 } }, - std::pair{ L"indianred1"sv, til::color{ 255, 106, 106 } }, - std::pair{ L"indianred2"sv, til::color{ 238, 99, 99 } }, - std::pair{ L"indianred3"sv, til::color{ 205, 85, 85 } }, - std::pair{ L"indianred4"sv, til::color{ 139, 58, 58 } }, - std::pair{ L"indigo"sv, til::color{ 75, 0, 130 } }, - std::pair{ L"ivory"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"ivory1"sv, til::color{ 255, 255, 240 } }, - std::pair{ L"ivory2"sv, til::color{ 238, 238, 224 } }, - std::pair{ L"ivory3"sv, til::color{ 205, 205, 193 } }, - std::pair{ L"ivory4"sv, til::color{ 139, 139, 131 } }, - std::pair{ L"khaki"sv, til::color{ 240, 230, 140 } }, - std::pair{ L"khaki1"sv, til::color{ 255, 246, 143 } }, - std::pair{ L"khaki2"sv, til::color{ 238, 230, 133 } }, - std::pair{ L"khaki3"sv, til::color{ 205, 198, 115 } }, - std::pair{ L"khaki4"sv, til::color{ 139, 134, 78 } }, - std::pair{ L"lavender"sv, til::color{ 230, 230, 250 } }, - std::pair{ L"lavenderblush"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"lavenderblush1"sv, til::color{ 255, 240, 245 } }, - std::pair{ L"lavenderblush2"sv, til::color{ 238, 224, 229 } }, - std::pair{ L"lavenderblush3"sv, til::color{ 205, 193, 197 } }, - std::pair{ L"lavenderblush4"sv, til::color{ 139, 131, 134 } }, - std::pair{ L"lawngreen"sv, til::color{ 124, 252, 0 } }, - std::pair{ L"lemonchiffon"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"lemonchiffon1"sv, til::color{ 255, 250, 205 } }, - std::pair{ L"lemonchiffon2"sv, til::color{ 238, 233, 191 } }, - std::pair{ L"lemonchiffon3"sv, til::color{ 205, 201, 165 } }, - std::pair{ L"lemonchiffon4"sv, til::color{ 139, 137, 112 } }, - std::pair{ L"lightblue"sv, til::color{ 173, 216, 230 } }, - std::pair{ L"lightblue1"sv, til::color{ 191, 239, 255 } }, - std::pair{ L"lightblue2"sv, til::color{ 178, 223, 238 } }, - std::pair{ L"lightblue3"sv, til::color{ 154, 192, 205 } }, - std::pair{ L"lightblue4"sv, til::color{ 104, 131, 139 } }, - std::pair{ L"lightcoral"sv, til::color{ 240, 128, 128 } }, - std::pair{ L"lightcyan"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"lightcyan1"sv, til::color{ 224, 255, 255 } }, - std::pair{ L"lightcyan2"sv, til::color{ 209, 238, 238 } }, - std::pair{ L"lightcyan3"sv, til::color{ 180, 205, 205 } }, - std::pair{ L"lightcyan4"sv, til::color{ 122, 139, 139 } }, - std::pair{ L"lightgoldenrod"sv, til::color{ 238, 221, 130 } }, - std::pair{ L"lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, - std::pair{ L"lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, - std::pair{ L"lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, - std::pair{ L"lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, - std::pair{ L"lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, - std::pair{ L"lightgray"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"lightgreen"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"lightgrey"sv, til::color{ 211, 211, 211 } }, - std::pair{ L"lightpink"sv, til::color{ 255, 182, 193 } }, - std::pair{ L"lightpink1"sv, til::color{ 255, 174, 185 } }, - std::pair{ L"lightpink2"sv, til::color{ 238, 162, 173 } }, - std::pair{ L"lightpink3"sv, til::color{ 205, 140, 149 } }, - std::pair{ L"lightpink4"sv, til::color{ 139, 95, 101 } }, - std::pair{ L"lightsalmon"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"lightsalmon1"sv, til::color{ 255, 160, 122 } }, - std::pair{ L"lightsalmon2"sv, til::color{ 238, 149, 114 } }, - std::pair{ L"lightsalmon3"sv, til::color{ 205, 129, 98 } }, - std::pair{ L"lightsalmon4"sv, til::color{ 139, 87, 66 } }, - std::pair{ L"lightseagreen"sv, til::color{ 32, 178, 170 } }, - std::pair{ L"lightskyblue"sv, til::color{ 135, 206, 250 } }, - std::pair{ L"lightskyblue1"sv, til::color{ 176, 226, 255 } }, - std::pair{ L"lightskyblue2"sv, til::color{ 164, 211, 238 } }, - std::pair{ L"lightskyblue3"sv, til::color{ 141, 182, 205 } }, - std::pair{ L"lightskyblue4"sv, til::color{ 96, 123, 139 } }, - std::pair{ L"lightslateblue"sv, til::color{ 132, 112, 255 } }, - std::pair{ L"lightslategray"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"lightslategrey"sv, til::color{ 119, 136, 153 } }, - std::pair{ L"lightsteelblue"sv, til::color{ 176, 196, 222 } }, - std::pair{ L"lightsteelblue1"sv, til::color{ 202, 225, 255 } }, - std::pair{ L"lightsteelblue2"sv, til::color{ 188, 210, 238 } }, - std::pair{ L"lightsteelblue3"sv, til::color{ 162, 181, 205 } }, - std::pair{ L"lightsteelblue4"sv, til::color{ 110, 123, 139 } }, - std::pair{ L"lightyellow"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"lightyellow1"sv, til::color{ 255, 255, 224 } }, - std::pair{ L"lightyellow2"sv, til::color{ 238, 238, 209 } }, - std::pair{ L"lightyellow3"sv, til::color{ 205, 205, 180 } }, - std::pair{ L"lightyellow4"sv, til::color{ 139, 139, 122 } }, - std::pair{ L"lime"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"limegreen"sv, til::color{ 50, 205, 50 } }, - std::pair{ L"linen"sv, til::color{ 250, 240, 230 } }, - std::pair{ L"magenta"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"magenta1"sv, til::color{ 255, 0, 255 } }, - std::pair{ L"magenta2"sv, til::color{ 238, 0, 238 } }, - std::pair{ L"magenta3"sv, til::color{ 205, 0, 205 } }, - std::pair{ L"magenta4"sv, til::color{ 139, 0, 139 } }, - std::pair{ L"maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"maroon1"sv, til::color{ 255, 52, 179 } }, - std::pair{ L"maroon2"sv, til::color{ 238, 48, 167 } }, - std::pair{ L"maroon3"sv, til::color{ 205, 41, 144 } }, - std::pair{ L"maroon4"sv, til::color{ 139, 28, 98 } }, - std::pair{ L"mediumaquamarine"sv, til::color{ 102, 205, 170 } }, - std::pair{ L"mediumblue"sv, til::color{ 0, 0, 205 } }, - std::pair{ L"mediumorchid"sv, til::color{ 186, 85, 211 } }, - std::pair{ L"mediumorchid1"sv, til::color{ 224, 102, 255 } }, - std::pair{ L"mediumorchid2"sv, til::color{ 209, 95, 238 } }, - std::pair{ L"mediumorchid3"sv, til::color{ 180, 82, 205 } }, - std::pair{ L"mediumorchid4"sv, til::color{ 122, 55, 139 } }, - std::pair{ L"mediumpurple"sv, til::color{ 147, 112, 219 } }, - std::pair{ L"mediumpurple1"sv, til::color{ 171, 130, 255 } }, - std::pair{ L"mediumpurple2"sv, til::color{ 159, 121, 238 } }, - std::pair{ L"mediumpurple3"sv, til::color{ 137, 104, 205 } }, - std::pair{ L"mediumpurple4"sv, til::color{ 93, 71, 139 } }, - std::pair{ L"mediumseagreen"sv, til::color{ 60, 179, 113 } }, - std::pair{ L"mediumslateblue"sv, til::color{ 123, 104, 238 } }, - std::pair{ L"mediumspringgreen"sv, til::color{ 0, 250, 154 } }, - std::pair{ L"mediumturquoise"sv, til::color{ 72, 209, 204 } }, - std::pair{ L"mediumvioletred"sv, til::color{ 199, 21, 133 } }, - std::pair{ L"midnightblue"sv, til::color{ 25, 25, 112 } }, - std::pair{ L"mintcream"sv, til::color{ 245, 255, 250 } }, - std::pair{ L"mistyrose"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"mistyrose1"sv, til::color{ 255, 228, 225 } }, - std::pair{ L"mistyrose2"sv, til::color{ 238, 213, 210 } }, - std::pair{ L"mistyrose3"sv, til::color{ 205, 183, 181 } }, - std::pair{ L"mistyrose4"sv, til::color{ 139, 125, 123 } }, - std::pair{ L"moccasin"sv, til::color{ 255, 228, 181 } }, - std::pair{ L"navajowhite"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"navajowhite1"sv, til::color{ 255, 222, 173 } }, - std::pair{ L"navajowhite2"sv, til::color{ 238, 207, 161 } }, - std::pair{ L"navajowhite3"sv, til::color{ 205, 179, 139 } }, - std::pair{ L"navajowhite4"sv, til::color{ 139, 121, 94 } }, - std::pair{ L"navy"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"navyblue"sv, til::color{ 0, 0, 128 } }, - std::pair{ L"oldlace"sv, til::color{ 253, 245, 230 } }, - std::pair{ L"olive"sv, til::color{ 128, 128, 0 } }, - std::pair{ L"olivedrab"sv, til::color{ 107, 142, 35 } }, - std::pair{ L"olivedrab1"sv, til::color{ 192, 255, 62 } }, - std::pair{ L"olivedrab2"sv, til::color{ 179, 238, 58 } }, - std::pair{ L"olivedrab3"sv, til::color{ 154, 205, 50 } }, - std::pair{ L"olivedrab4"sv, til::color{ 105, 139, 34 } }, - std::pair{ L"orange"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"orange1"sv, til::color{ 255, 165, 0 } }, - std::pair{ L"orange2"sv, til::color{ 238, 154, 0 } }, - std::pair{ L"orange3"sv, til::color{ 205, 133, 0 } }, - std::pair{ L"orange4"sv, til::color{ 139, 90, 0 } }, - std::pair{ L"orangered"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"orangered1"sv, til::color{ 255, 69, 0 } }, - std::pair{ L"orangered2"sv, til::color{ 238, 64, 0 } }, - std::pair{ L"orangered3"sv, til::color{ 205, 55, 0 } }, - std::pair{ L"orangered4"sv, til::color{ 139, 37, 0 } }, - std::pair{ L"orchid"sv, til::color{ 218, 112, 214 } }, - std::pair{ L"orchid1"sv, til::color{ 255, 131, 250 } }, - std::pair{ L"orchid2"sv, til::color{ 238, 122, 233 } }, - std::pair{ L"orchid3"sv, til::color{ 205, 105, 201 } }, - std::pair{ L"orchid4"sv, til::color{ 139, 71, 137 } }, - std::pair{ L"palegoldenrod"sv, til::color{ 238, 232, 170 } }, - std::pair{ L"palegreen"sv, til::color{ 152, 251, 152 } }, - std::pair{ L"palegreen1"sv, til::color{ 154, 255, 154 } }, - std::pair{ L"palegreen2"sv, til::color{ 144, 238, 144 } }, - std::pair{ L"palegreen3"sv, til::color{ 124, 205, 124 } }, - std::pair{ L"palegreen4"sv, til::color{ 84, 139, 84 } }, - std::pair{ L"paleturquoise"sv, til::color{ 175, 238, 238 } }, - std::pair{ L"paleturquoise1"sv, til::color{ 187, 255, 255 } }, - std::pair{ L"paleturquoise2"sv, til::color{ 174, 238, 238 } }, - std::pair{ L"paleturquoise3"sv, til::color{ 150, 205, 205 } }, - std::pair{ L"paleturquoise4"sv, til::color{ 102, 139, 139 } }, - std::pair{ L"palevioletred"sv, til::color{ 219, 112, 147 } }, - std::pair{ L"palevioletred1"sv, til::color{ 255, 130, 171 } }, - std::pair{ L"palevioletred2"sv, til::color{ 238, 121, 159 } }, - std::pair{ L"palevioletred3"sv, til::color{ 205, 104, 137 } }, - std::pair{ L"palevioletred4"sv, til::color{ 139, 71, 93 } }, - std::pair{ L"papayawhip"sv, til::color{ 255, 239, 213 } }, - std::pair{ L"peachpuff"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"peachpuff1"sv, til::color{ 255, 218, 185 } }, - std::pair{ L"peachpuff2"sv, til::color{ 238, 203, 173 } }, - std::pair{ L"peachpuff3"sv, til::color{ 205, 175, 149 } }, - std::pair{ L"peachpuff4"sv, til::color{ 139, 119, 101 } }, - std::pair{ L"peru"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"pink"sv, til::color{ 255, 192, 203 } }, - std::pair{ L"pink1"sv, til::color{ 255, 181, 197 } }, - std::pair{ L"pink2"sv, til::color{ 238, 169, 184 } }, - std::pair{ L"pink3"sv, til::color{ 205, 145, 158 } }, - std::pair{ L"pink4"sv, til::color{ 139, 99, 108 } }, - std::pair{ L"plum"sv, til::color{ 221, 160, 221 } }, - std::pair{ L"plum1"sv, til::color{ 255, 187, 255 } }, - std::pair{ L"plum2"sv, til::color{ 238, 174, 238 } }, - std::pair{ L"plum3"sv, til::color{ 205, 150, 205 } }, - std::pair{ L"plum4"sv, til::color{ 139, 102, 139 } }, - std::pair{ L"powderblue"sv, til::color{ 176, 224, 230 } }, - std::pair{ L"purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"purple1"sv, til::color{ 155, 48, 255 } }, - std::pair{ L"purple2"sv, til::color{ 145, 44, 238 } }, - std::pair{ L"purple3"sv, til::color{ 125, 38, 205 } }, - std::pair{ L"purple4"sv, til::color{ 85, 26, 139 } }, - std::pair{ L"rebeccapurple"sv, til::color{ 102, 51, 153 } }, - std::pair{ L"red"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"red1"sv, til::color{ 255, 0, 0 } }, - std::pair{ L"red2"sv, til::color{ 238, 0, 0 } }, - std::pair{ L"red3"sv, til::color{ 205, 0, 0 } }, - std::pair{ L"red4"sv, til::color{ 139, 0, 0 } }, - std::pair{ L"rosybrown"sv, til::color{ 188, 143, 143 } }, - std::pair{ L"rosybrown1"sv, til::color{ 255, 193, 193 } }, - std::pair{ L"rosybrown2"sv, til::color{ 238, 180, 180 } }, - std::pair{ L"rosybrown3"sv, til::color{ 205, 155, 155 } }, - std::pair{ L"rosybrown4"sv, til::color{ 139, 105, 105 } }, - std::pair{ L"royalblue"sv, til::color{ 65, 105, 225 } }, - std::pair{ L"royalblue1"sv, til::color{ 72, 118, 255 } }, - std::pair{ L"royalblue2"sv, til::color{ 67, 110, 238 } }, - std::pair{ L"royalblue3"sv, til::color{ 58, 95, 205 } }, - std::pair{ L"royalblue4"sv, til::color{ 39, 64, 139 } }, - std::pair{ L"saddlebrown"sv, til::color{ 139, 69, 19 } }, - std::pair{ L"salmon"sv, til::color{ 250, 128, 114 } }, - std::pair{ L"salmon1"sv, til::color{ 255, 140, 105 } }, - std::pair{ L"salmon2"sv, til::color{ 238, 130, 98 } }, - std::pair{ L"salmon3"sv, til::color{ 205, 112, 84 } }, - std::pair{ L"salmon4"sv, til::color{ 139, 76, 57 } }, - std::pair{ L"sandybrown"sv, til::color{ 244, 164, 96 } }, - std::pair{ L"seagreen"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"seagreen1"sv, til::color{ 84, 255, 159 } }, - std::pair{ L"seagreen2"sv, til::color{ 78, 238, 148 } }, - std::pair{ L"seagreen3"sv, til::color{ 67, 205, 128 } }, - std::pair{ L"seagreen4"sv, til::color{ 46, 139, 87 } }, - std::pair{ L"seashell"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"seashell1"sv, til::color{ 255, 245, 238 } }, - std::pair{ L"seashell2"sv, til::color{ 238, 229, 222 } }, - std::pair{ L"seashell3"sv, til::color{ 205, 197, 191 } }, - std::pair{ L"seashell4"sv, til::color{ 139, 134, 130 } }, - std::pair{ L"sienna"sv, til::color{ 160, 82, 45 } }, - std::pair{ L"sienna1"sv, til::color{ 255, 130, 71 } }, - std::pair{ L"sienna2"sv, til::color{ 238, 121, 66 } }, - std::pair{ L"sienna3"sv, til::color{ 205, 104, 57 } }, - std::pair{ L"sienna4"sv, til::color{ 139, 71, 38 } }, - std::pair{ L"silver"sv, til::color{ 192, 192, 192 } }, - std::pair{ L"skyblue"sv, til::color{ 135, 206, 235 } }, - std::pair{ L"skyblue1"sv, til::color{ 135, 206, 255 } }, - std::pair{ L"skyblue2"sv, til::color{ 126, 192, 238 } }, - std::pair{ L"skyblue3"sv, til::color{ 108, 166, 205 } }, - std::pair{ L"skyblue4"sv, til::color{ 74, 112, 139 } }, - std::pair{ L"slateblue"sv, til::color{ 106, 90, 205 } }, - std::pair{ L"slateblue1"sv, til::color{ 131, 111, 255 } }, - std::pair{ L"slateblue2"sv, til::color{ 122, 103, 238 } }, - std::pair{ L"slateblue3"sv, til::color{ 105, 89, 205 } }, - std::pair{ L"slateblue4"sv, til::color{ 71, 60, 139 } }, - std::pair{ L"slategray"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"slategray1"sv, til::color{ 198, 226, 255 } }, - std::pair{ L"slategray2"sv, til::color{ 185, 211, 238 } }, - std::pair{ L"slategray3"sv, til::color{ 159, 182, 205 } }, - std::pair{ L"slategray4"sv, til::color{ 108, 123, 139 } }, - std::pair{ L"slategrey"sv, til::color{ 112, 128, 144 } }, - std::pair{ L"snow"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"snow1"sv, til::color{ 255, 250, 250 } }, - std::pair{ L"snow2"sv, til::color{ 238, 233, 233 } }, - std::pair{ L"snow3"sv, til::color{ 205, 201, 201 } }, - std::pair{ L"snow4"sv, til::color{ 139, 137, 137 } }, - std::pair{ L"springgreen"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"springgreen1"sv, til::color{ 0, 255, 127 } }, - std::pair{ L"springgreen2"sv, til::color{ 0, 238, 118 } }, - std::pair{ L"springgreen3"sv, til::color{ 0, 205, 102 } }, - std::pair{ L"springgreen4"sv, til::color{ 0, 139, 69 } }, - std::pair{ L"steelblue"sv, til::color{ 70, 130, 180 } }, - std::pair{ L"steelblue1"sv, til::color{ 99, 184, 255 } }, - std::pair{ L"steelblue2"sv, til::color{ 92, 172, 238 } }, - std::pair{ L"steelblue3"sv, til::color{ 79, 148, 205 } }, - std::pair{ L"steelblue4"sv, til::color{ 54, 100, 139 } }, - std::pair{ L"tan"sv, til::color{ 210, 180, 140 } }, - std::pair{ L"tan1"sv, til::color{ 255, 165, 79 } }, - std::pair{ L"tan2"sv, til::color{ 238, 154, 73 } }, - std::pair{ L"tan3"sv, til::color{ 205, 133, 63 } }, - std::pair{ L"tan4"sv, til::color{ 139, 90, 43 } }, - std::pair{ L"teal"sv, til::color{ 0, 128, 128 } }, - std::pair{ L"thistle"sv, til::color{ 216, 191, 216 } }, - std::pair{ L"thistle1"sv, til::color{ 255, 225, 255 } }, - std::pair{ L"thistle2"sv, til::color{ 238, 210, 238 } }, - std::pair{ L"thistle3"sv, til::color{ 205, 181, 205 } }, - std::pair{ L"thistle4"sv, til::color{ 139, 123, 139 } }, - std::pair{ L"tomato"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"tomato1"sv, til::color{ 255, 99, 71 } }, - std::pair{ L"tomato2"sv, til::color{ 238, 92, 66 } }, - std::pair{ L"tomato3"sv, til::color{ 205, 79, 57 } }, - std::pair{ L"tomato4"sv, til::color{ 139, 54, 38 } }, - std::pair{ L"turquoise"sv, til::color{ 64, 224, 208 } }, - std::pair{ L"turquoise1"sv, til::color{ 0, 245, 255 } }, - std::pair{ L"turquoise2"sv, til::color{ 0, 229, 238 } }, - std::pair{ L"turquoise3"sv, til::color{ 0, 197, 205 } }, - std::pair{ L"turquoise4"sv, til::color{ 0, 134, 139 } }, - std::pair{ L"violet"sv, til::color{ 238, 130, 238 } }, - std::pair{ L"violetred"sv, til::color{ 208, 32, 144 } }, - std::pair{ L"violetred1"sv, til::color{ 255, 62, 150 } }, - std::pair{ L"violetred2"sv, til::color{ 238, 58, 140 } }, - std::pair{ L"violetred3"sv, til::color{ 205, 50, 120 } }, - std::pair{ L"violetred4"sv, til::color{ 139, 34, 82 } }, - std::pair{ L"webgray"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"webgreen"sv, til::color{ 0, 128, 0 } }, - std::pair{ L"webgrey"sv, til::color{ 128, 128, 128 } }, - std::pair{ L"webmaroon"sv, til::color{ 128, 0, 0 } }, - std::pair{ L"webpurple"sv, til::color{ 128, 0, 128 } }, - std::pair{ L"wheat"sv, til::color{ 245, 222, 179 } }, - std::pair{ L"wheat1"sv, til::color{ 255, 231, 186 } }, - std::pair{ L"wheat2"sv, til::color{ 238, 216, 174 } }, - std::pair{ L"wheat3"sv, til::color{ 205, 186, 150 } }, - std::pair{ L"wheat4"sv, til::color{ 139, 126, 102 } }, - std::pair{ L"white"sv, til::color{ 255, 255, 255 } }, - std::pair{ L"whitesmoke"sv, til::color{ 245, 245, 245 } }, - std::pair{ L"x11gray"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11green"sv, til::color{ 0, 255, 0 } }, - std::pair{ L"x11grey"sv, til::color{ 190, 190, 190 } }, - std::pair{ L"x11maroon"sv, til::color{ 176, 48, 96 } }, - std::pair{ L"x11purple"sv, til::color{ 160, 32, 240 } }, - std::pair{ L"yellow"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"yellow1"sv, til::color{ 255, 255, 0 } }, - std::pair{ L"yellow2"sv, til::color{ 238, 238, 0 } }, - std::pair{ L"yellow3"sv, til::color{ 205, 205, 0 } }, - std::pair{ L"yellow4"sv, til::color{ 139, 139, 0 } }, - std::pair{ L"yellowgreen"sv, til::color{ 154, 205, 50 } } +static constexpr til::presorted_static_map xorgAppColorTable{ + std::pair{ "aliceblue"sv, til::color{ 240, 248, 255 } }, + std::pair{ "antiquewhite"sv, til::color{ 250, 235, 215 } }, + std::pair{ "antiquewhite1"sv, til::color{ 255, 239, 219 } }, + std::pair{ "antiquewhite2"sv, til::color{ 238, 223, 204 } }, + std::pair{ "antiquewhite3"sv, til::color{ 205, 192, 176 } }, + std::pair{ "antiquewhite4"sv, til::color{ 139, 131, 120 } }, + std::pair{ "aqua"sv, til::color{ 0, 255, 255 } }, + std::pair{ "aquamarine"sv, til::color{ 127, 255, 212 } }, + std::pair{ "aquamarine1"sv, til::color{ 127, 255, 212 } }, + std::pair{ "aquamarine2"sv, til::color{ 118, 238, 198 } }, + std::pair{ "aquamarine3"sv, til::color{ 102, 205, 170 } }, + std::pair{ "aquamarine4"sv, til::color{ 69, 139, 116 } }, + std::pair{ "azure"sv, til::color{ 240, 255, 255 } }, + std::pair{ "azure1"sv, til::color{ 240, 255, 255 } }, + std::pair{ "azure2"sv, til::color{ 224, 238, 238 } }, + std::pair{ "azure3"sv, til::color{ 193, 205, 205 } }, + std::pair{ "azure4"sv, til::color{ 131, 139, 139 } }, + std::pair{ "beige"sv, til::color{ 245, 245, 220 } }, + std::pair{ "bisque"sv, til::color{ 255, 228, 196 } }, + std::pair{ "bisque1"sv, til::color{ 255, 228, 196 } }, + std::pair{ "bisque2"sv, til::color{ 238, 213, 183 } }, + std::pair{ "bisque3"sv, til::color{ 205, 183, 158 } }, + std::pair{ "bisque4"sv, til::color{ 139, 125, 107 } }, + std::pair{ "black"sv, til::color{ 0, 0, 0 } }, + std::pair{ "blanchedalmond"sv, til::color{ 255, 235, 205 } }, + std::pair{ "blue"sv, til::color{ 0, 0, 255 } }, + std::pair{ "blue1"sv, til::color{ 0, 0, 255 } }, + std::pair{ "blue2"sv, til::color{ 0, 0, 238 } }, + std::pair{ "blue3"sv, til::color{ 0, 0, 205 } }, + std::pair{ "blue4"sv, til::color{ 0, 0, 139 } }, + std::pair{ "blueviolet"sv, til::color{ 138, 43, 226 } }, + std::pair{ "brown"sv, til::color{ 165, 42, 42 } }, + std::pair{ "brown1"sv, til::color{ 255, 64, 64 } }, + std::pair{ "brown2"sv, til::color{ 238, 59, 59 } }, + std::pair{ "brown3"sv, til::color{ 205, 51, 51 } }, + std::pair{ "brown4"sv, til::color{ 139, 35, 35 } }, + std::pair{ "burlywood"sv, til::color{ 222, 184, 135 } }, + std::pair{ "burlywood1"sv, til::color{ 255, 211, 155 } }, + std::pair{ "burlywood2"sv, til::color{ 238, 197, 145 } }, + std::pair{ "burlywood3"sv, til::color{ 205, 170, 125 } }, + std::pair{ "burlywood4"sv, til::color{ 139, 115, 85 } }, + std::pair{ "cadetblue"sv, til::color{ 95, 158, 160 } }, + std::pair{ "cadetblue1"sv, til::color{ 152, 245, 255 } }, + std::pair{ "cadetblue2"sv, til::color{ 142, 229, 238 } }, + std::pair{ "cadetblue3"sv, til::color{ 122, 197, 205 } }, + std::pair{ "cadetblue4"sv, til::color{ 83, 134, 139 } }, + std::pair{ "chartreuse"sv, til::color{ 127, 255, 0 } }, + std::pair{ "chartreuse1"sv, til::color{ 127, 255, 0 } }, + std::pair{ "chartreuse2"sv, til::color{ 118, 238, 0 } }, + std::pair{ "chartreuse3"sv, til::color{ 102, 205, 0 } }, + std::pair{ "chartreuse4"sv, til::color{ 69, 139, 0 } }, + std::pair{ "chocolate"sv, til::color{ 210, 105, 30 } }, + std::pair{ "chocolate1"sv, til::color{ 255, 127, 36 } }, + std::pair{ "chocolate2"sv, til::color{ 238, 118, 33 } }, + std::pair{ "chocolate3"sv, til::color{ 205, 102, 29 } }, + std::pair{ "chocolate4"sv, til::color{ 139, 69, 19 } }, + std::pair{ "cora"sv, til::color{ 255, 127, 80 } }, + std::pair{ "coral1"sv, til::color{ 255, 114, 86 } }, + std::pair{ "coral2"sv, til::color{ 238, 106, 80 } }, + std::pair{ "coral3"sv, til::color{ 205, 91, 69 } }, + std::pair{ "coral4"sv, til::color{ 139, 62, 47 } }, + std::pair{ "cornflowerblue"sv, til::color{ 100, 149, 237 } }, + std::pair{ "cornsilk"sv, til::color{ 255, 248, 220 } }, + std::pair{ "cornsilk1"sv, til::color{ 255, 248, 220 } }, + std::pair{ "cornsilk2"sv, til::color{ 238, 232, 205 } }, + std::pair{ "cornsilk3"sv, til::color{ 205, 200, 177 } }, + std::pair{ "cornsilk4"sv, til::color{ 139, 136, 120 } }, + std::pair{ "crimson"sv, til::color{ 220, 20, 60 } }, + std::pair{ "cyan"sv, til::color{ 0, 255, 255 } }, + std::pair{ "cyan1"sv, til::color{ 0, 255, 255 } }, + std::pair{ "cyan2"sv, til::color{ 0, 238, 238 } }, + std::pair{ "cyan3"sv, til::color{ 0, 205, 205 } }, + std::pair{ "cyan4"sv, til::color{ 0, 139, 139 } }, + std::pair{ "darkblue"sv, til::color{ 0, 0, 139 } }, + std::pair{ "darkcyan"sv, til::color{ 0, 139, 139 } }, + std::pair{ "darkgoldenrod"sv, til::color{ 184, 134, 11 } }, + std::pair{ "darkgoldenrod1"sv, til::color{ 255, 185, 15 } }, + std::pair{ "darkgoldenrod2"sv, til::color{ 238, 173, 14 } }, + std::pair{ "darkgoldenrod3"sv, til::color{ 205, 149, 12 } }, + std::pair{ "darkgoldenrod4"sv, til::color{ 139, 101, 8 } }, + std::pair{ "darkgray"sv, til::color{ 169, 169, 169 } }, + std::pair{ "darkgreen"sv, til::color{ 0, 100, 0 } }, + std::pair{ "darkgrey"sv, til::color{ 169, 169, 169 } }, + std::pair{ "darkkhaki"sv, til::color{ 189, 183, 107 } }, + std::pair{ "darkmagenta"sv, til::color{ 139, 0, 139 } }, + std::pair{ "darkolivegreen"sv, til::color{ 85, 107, 47 } }, + std::pair{ "darkolivegreen1"sv, til::color{ 202, 255, 112 } }, + std::pair{ "darkolivegreen2"sv, til::color{ 188, 238, 104 } }, + std::pair{ "darkolivegreen3"sv, til::color{ 162, 205, 90 } }, + std::pair{ "darkolivegreen4"sv, til::color{ 110, 139, 61 } }, + std::pair{ "darkorange"sv, til::color{ 255, 140, 0 } }, + std::pair{ "darkorange1"sv, til::color{ 255, 127, 0 } }, + std::pair{ "darkorange2"sv, til::color{ 238, 118, 0 } }, + std::pair{ "darkorange3"sv, til::color{ 205, 102, 0 } }, + std::pair{ "darkorange4"sv, til::color{ 139, 69, 0 } }, + std::pair{ "darkorchid"sv, til::color{ 153, 50, 204 } }, + std::pair{ "darkorchid1"sv, til::color{ 191, 62, 255 } }, + std::pair{ "darkorchid2"sv, til::color{ 178, 58, 238 } }, + std::pair{ "darkorchid3"sv, til::color{ 154, 50, 205 } }, + std::pair{ "darkorchid4"sv, til::color{ 104, 34, 139 } }, + std::pair{ "darkred"sv, til::color{ 139, 0, 0 } }, + std::pair{ "darksalmon"sv, til::color{ 233, 150, 122 } }, + std::pair{ "darkseagreen"sv, til::color{ 143, 188, 143 } }, + std::pair{ "darkseagreen1"sv, til::color{ 193, 255, 193 } }, + std::pair{ "darkseagreen2"sv, til::color{ 180, 238, 180 } }, + std::pair{ "darkseagreen3"sv, til::color{ 155, 205, 155 } }, + std::pair{ "darkseagreen4"sv, til::color{ 105, 139, 105 } }, + std::pair{ "darkslateblue"sv, til::color{ 72, 61, 139 } }, + std::pair{ "darkslategray"sv, til::color{ 47, 79, 79 } }, + std::pair{ "darkslategray1"sv, til::color{ 151, 255, 255 } }, + std::pair{ "darkslategray2"sv, til::color{ 141, 238, 238 } }, + std::pair{ "darkslategray3"sv, til::color{ 121, 205, 205 } }, + std::pair{ "darkslategray4"sv, til::color{ 82, 139, 139 } }, + std::pair{ "darkslategrey"sv, til::color{ 47, 79, 79 } }, + std::pair{ "darkturquoise"sv, til::color{ 0, 206, 209 } }, + std::pair{ "darkviolet"sv, til::color{ 148, 0, 211 } }, + std::pair{ "deeppink"sv, til::color{ 255, 20, 147 } }, + std::pair{ "deeppink1"sv, til::color{ 255, 20, 147 } }, + std::pair{ "deeppink2"sv, til::color{ 238, 18, 137 } }, + std::pair{ "deeppink3"sv, til::color{ 205, 16, 118 } }, + std::pair{ "deeppink4"sv, til::color{ 139, 10, 80 } }, + std::pair{ "deepskyblue"sv, til::color{ 0, 191, 255 } }, + std::pair{ "deepskyblue1"sv, til::color{ 0, 191, 255 } }, + std::pair{ "deepskyblue2"sv, til::color{ 0, 178, 238 } }, + std::pair{ "deepskyblue3"sv, til::color{ 0, 154, 205 } }, + std::pair{ "deepskyblue4"sv, til::color{ 0, 104, 139 } }, + std::pair{ "dimgray"sv, til::color{ 105, 105, 105 } }, + std::pair{ "dimgrey"sv, til::color{ 105, 105, 105 } }, + std::pair{ "dodgerblue"sv, til::color{ 30, 144, 255 } }, + std::pair{ "dodgerblue1"sv, til::color{ 30, 144, 255 } }, + std::pair{ "dodgerblue2"sv, til::color{ 28, 134, 238 } }, + std::pair{ "dodgerblue3"sv, til::color{ 24, 116, 205 } }, + std::pair{ "dodgerblue4"sv, til::color{ 16, 78, 139 } }, + std::pair{ "firebrick"sv, til::color{ 178, 34, 34 } }, + std::pair{ "firebrick1"sv, til::color{ 255, 48, 48 } }, + std::pair{ "firebrick2"sv, til::color{ 238, 44, 44 } }, + std::pair{ "firebrick3"sv, til::color{ 205, 38, 38 } }, + std::pair{ "firebrick4"sv, til::color{ 139, 26, 26 } }, + std::pair{ "floralwhite"sv, til::color{ 255, 250, 240 } }, + std::pair{ "forestgreen"sv, til::color{ 34, 139, 34 } }, + std::pair{ "fuchsia"sv, til::color{ 255, 0, 255 } }, + std::pair{ "gainsboro"sv, til::color{ 220, 220, 220 } }, + std::pair{ "ghostwhite"sv, til::color{ 248, 248, 255 } }, + std::pair{ "gold"sv, til::color{ 255, 215, 0 } }, + std::pair{ "gold1"sv, til::color{ 255, 215, 0 } }, + std::pair{ "gold2"sv, til::color{ 238, 201, 0 } }, + std::pair{ "gold3"sv, til::color{ 205, 173, 0 } }, + std::pair{ "gold4"sv, til::color{ 139, 117, 0 } }, + std::pair{ "goldenrod"sv, til::color{ 218, 165, 32 } }, + std::pair{ "goldenrod1"sv, til::color{ 255, 193, 37 } }, + std::pair{ "goldenrod2"sv, til::color{ 238, 180, 34 } }, + std::pair{ "goldenrod3"sv, til::color{ 205, 155, 29 } }, + std::pair{ "goldenrod4"sv, til::color{ 139, 105, 20 } }, + std::pair{ "gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ "gray0"sv, til::color{ 0, 0, 0 } }, + std::pair{ "gray1"sv, til::color{ 3, 3, 3 } }, + std::pair{ "gray10"sv, til::color{ 26, 26, 26 } }, + std::pair{ "gray100"sv, til::color{ 255, 255, 255 } }, + std::pair{ "gray11"sv, til::color{ 28, 28, 28 } }, + std::pair{ "gray12"sv, til::color{ 31, 31, 31 } }, + std::pair{ "gray13"sv, til::color{ 33, 33, 33 } }, + std::pair{ "gray14"sv, til::color{ 36, 36, 36 } }, + std::pair{ "gray15"sv, til::color{ 38, 38, 38 } }, + std::pair{ "gray16"sv, til::color{ 41, 41, 41 } }, + std::pair{ "gray17"sv, til::color{ 43, 43, 43 } }, + std::pair{ "gray18"sv, til::color{ 46, 46, 46 } }, + std::pair{ "gray19"sv, til::color{ 48, 48, 48 } }, + std::pair{ "gray2"sv, til::color{ 5, 5, 5 } }, + std::pair{ "gray20"sv, til::color{ 51, 51, 51 } }, + std::pair{ "gray21"sv, til::color{ 54, 54, 54 } }, + std::pair{ "gray22"sv, til::color{ 56, 56, 56 } }, + std::pair{ "gray23"sv, til::color{ 59, 59, 59 } }, + std::pair{ "gray24"sv, til::color{ 61, 61, 61 } }, + std::pair{ "gray25"sv, til::color{ 64, 64, 64 } }, + std::pair{ "gray26"sv, til::color{ 66, 66, 66 } }, + std::pair{ "gray27"sv, til::color{ 69, 69, 69 } }, + std::pair{ "gray28"sv, til::color{ 71, 71, 71 } }, + std::pair{ "gray29"sv, til::color{ 74, 74, 74 } }, + std::pair{ "gray3"sv, til::color{ 8, 8, 8 } }, + std::pair{ "gray30"sv, til::color{ 77, 77, 77 } }, + std::pair{ "gray31"sv, til::color{ 79, 79, 79 } }, + std::pair{ "gray32"sv, til::color{ 82, 82, 82 } }, + std::pair{ "gray33"sv, til::color{ 84, 84, 84 } }, + std::pair{ "gray34"sv, til::color{ 87, 87, 87 } }, + std::pair{ "gray35"sv, til::color{ 89, 89, 89 } }, + std::pair{ "gray36"sv, til::color{ 92, 92, 92 } }, + std::pair{ "gray37"sv, til::color{ 94, 94, 94 } }, + std::pair{ "gray38"sv, til::color{ 97, 97, 97 } }, + std::pair{ "gray39"sv, til::color{ 99, 99, 99 } }, + std::pair{ "gray4"sv, til::color{ 10, 10, 10 } }, + std::pair{ "gray40"sv, til::color{ 102, 102, 102 } }, + std::pair{ "gray41"sv, til::color{ 105, 105, 105 } }, + std::pair{ "gray42"sv, til::color{ 107, 107, 107 } }, + std::pair{ "gray43"sv, til::color{ 110, 110, 110 } }, + std::pair{ "gray44"sv, til::color{ 112, 112, 112 } }, + std::pair{ "gray45"sv, til::color{ 115, 115, 115 } }, + std::pair{ "gray46"sv, til::color{ 117, 117, 117 } }, + std::pair{ "gray47"sv, til::color{ 120, 120, 120 } }, + std::pair{ "gray48"sv, til::color{ 122, 122, 122 } }, + std::pair{ "gray49"sv, til::color{ 125, 125, 125 } }, + std::pair{ "gray5"sv, til::color{ 13, 13, 13 } }, + std::pair{ "gray50"sv, til::color{ 127, 127, 127 } }, + std::pair{ "gray51"sv, til::color{ 130, 130, 130 } }, + std::pair{ "gray52"sv, til::color{ 133, 133, 133 } }, + std::pair{ "gray53"sv, til::color{ 135, 135, 135 } }, + std::pair{ "gray54"sv, til::color{ 138, 138, 138 } }, + std::pair{ "gray55"sv, til::color{ 140, 140, 140 } }, + std::pair{ "gray56"sv, til::color{ 143, 143, 143 } }, + std::pair{ "gray57"sv, til::color{ 145, 145, 145 } }, + std::pair{ "gray58"sv, til::color{ 148, 148, 148 } }, + std::pair{ "gray59"sv, til::color{ 150, 150, 150 } }, + std::pair{ "gray6"sv, til::color{ 15, 15, 15 } }, + std::pair{ "gray60"sv, til::color{ 153, 153, 153 } }, + std::pair{ "gray61"sv, til::color{ 156, 156, 156 } }, + std::pair{ "gray62"sv, til::color{ 158, 158, 158 } }, + std::pair{ "gray63"sv, til::color{ 161, 161, 161 } }, + std::pair{ "gray64"sv, til::color{ 163, 163, 163 } }, + std::pair{ "gray65"sv, til::color{ 166, 166, 166 } }, + std::pair{ "gray66"sv, til::color{ 168, 168, 168 } }, + std::pair{ "gray67"sv, til::color{ 171, 171, 171 } }, + std::pair{ "gray68"sv, til::color{ 173, 173, 173 } }, + std::pair{ "gray69"sv, til::color{ 176, 176, 176 } }, + std::pair{ "gray7"sv, til::color{ 18, 18, 18 } }, + std::pair{ "gray70"sv, til::color{ 179, 179, 179 } }, + std::pair{ "gray71"sv, til::color{ 181, 181, 181 } }, + std::pair{ "gray72"sv, til::color{ 184, 184, 184 } }, + std::pair{ "gray73"sv, til::color{ 186, 186, 186 } }, + std::pair{ "gray74"sv, til::color{ 189, 189, 189 } }, + std::pair{ "gray75"sv, til::color{ 191, 191, 191 } }, + std::pair{ "gray76"sv, til::color{ 194, 194, 194 } }, + std::pair{ "gray77"sv, til::color{ 196, 196, 196 } }, + std::pair{ "gray78"sv, til::color{ 199, 199, 199 } }, + std::pair{ "gray79"sv, til::color{ 201, 201, 201 } }, + std::pair{ "gray8"sv, til::color{ 20, 20, 20 } }, + std::pair{ "gray80"sv, til::color{ 204, 204, 204 } }, + std::pair{ "gray81"sv, til::color{ 207, 207, 207 } }, + std::pair{ "gray82"sv, til::color{ 209, 209, 209 } }, + std::pair{ "gray83"sv, til::color{ 212, 212, 212 } }, + std::pair{ "gray84"sv, til::color{ 214, 214, 214 } }, + std::pair{ "gray85"sv, til::color{ 217, 217, 217 } }, + std::pair{ "gray86"sv, til::color{ 219, 219, 219 } }, + std::pair{ "gray87"sv, til::color{ 222, 222, 222 } }, + std::pair{ "gray88"sv, til::color{ 224, 224, 224 } }, + std::pair{ "gray89"sv, til::color{ 227, 227, 227 } }, + std::pair{ "gray9"sv, til::color{ 23, 23, 23 } }, + std::pair{ "gray90"sv, til::color{ 229, 229, 229 } }, + std::pair{ "gray91"sv, til::color{ 232, 232, 232 } }, + std::pair{ "gray92"sv, til::color{ 235, 235, 235 } }, + std::pair{ "gray93"sv, til::color{ 237, 237, 237 } }, + std::pair{ "gray94"sv, til::color{ 240, 240, 240 } }, + std::pair{ "gray95"sv, til::color{ 242, 242, 242 } }, + std::pair{ "gray96"sv, til::color{ 245, 245, 245 } }, + std::pair{ "gray97"sv, til::color{ 247, 247, 247 } }, + std::pair{ "gray98"sv, til::color{ 250, 250, 250 } }, + std::pair{ "gray99"sv, til::color{ 252, 252, 252 } }, + std::pair{ "green"sv, til::color{ 0, 255, 0 } }, + std::pair{ "green1"sv, til::color{ 0, 255, 0 } }, + std::pair{ "green2"sv, til::color{ 0, 238, 0 } }, + std::pair{ "green3"sv, til::color{ 0, 205, 0 } }, + std::pair{ "green4"sv, til::color{ 0, 139, 0 } }, + std::pair{ "greenyellow"sv, til::color{ 173, 255, 47 } }, + std::pair{ "grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ "grey0"sv, til::color{ 0, 0, 0 } }, + std::pair{ "grey1"sv, til::color{ 3, 3, 3 } }, + std::pair{ "grey10"sv, til::color{ 26, 26, 26 } }, + std::pair{ "grey100"sv, til::color{ 255, 255, 255 } }, + std::pair{ "grey11"sv, til::color{ 28, 28, 28 } }, + std::pair{ "grey12"sv, til::color{ 31, 31, 31 } }, + std::pair{ "grey13"sv, til::color{ 33, 33, 33 } }, + std::pair{ "grey14"sv, til::color{ 36, 36, 36 } }, + std::pair{ "grey15"sv, til::color{ 38, 38, 38 } }, + std::pair{ "grey16"sv, til::color{ 41, 41, 41 } }, + std::pair{ "grey17"sv, til::color{ 43, 43, 43 } }, + std::pair{ "grey18"sv, til::color{ 46, 46, 46 } }, + std::pair{ "grey19"sv, til::color{ 48, 48, 48 } }, + std::pair{ "grey2"sv, til::color{ 5, 5, 5 } }, + std::pair{ "grey20"sv, til::color{ 51, 51, 51 } }, + std::pair{ "grey21"sv, til::color{ 54, 54, 54 } }, + std::pair{ "grey22"sv, til::color{ 56, 56, 56 } }, + std::pair{ "grey23"sv, til::color{ 59, 59, 59 } }, + std::pair{ "grey24"sv, til::color{ 61, 61, 61 } }, + std::pair{ "grey25"sv, til::color{ 64, 64, 64 } }, + std::pair{ "grey26"sv, til::color{ 66, 66, 66 } }, + std::pair{ "grey27"sv, til::color{ 69, 69, 69 } }, + std::pair{ "grey28"sv, til::color{ 71, 71, 71 } }, + std::pair{ "grey29"sv, til::color{ 74, 74, 74 } }, + std::pair{ "grey3"sv, til::color{ 8, 8, 8 } }, + std::pair{ "grey30"sv, til::color{ 77, 77, 77 } }, + std::pair{ "grey31"sv, til::color{ 79, 79, 79 } }, + std::pair{ "grey32"sv, til::color{ 82, 82, 82 } }, + std::pair{ "grey33"sv, til::color{ 84, 84, 84 } }, + std::pair{ "grey34"sv, til::color{ 87, 87, 87 } }, + std::pair{ "grey35"sv, til::color{ 89, 89, 89 } }, + std::pair{ "grey36"sv, til::color{ 92, 92, 92 } }, + std::pair{ "grey37"sv, til::color{ 94, 94, 94 } }, + std::pair{ "grey38"sv, til::color{ 97, 97, 97 } }, + std::pair{ "grey39"sv, til::color{ 99, 99, 99 } }, + std::pair{ "grey4"sv, til::color{ 10, 10, 10 } }, + std::pair{ "grey40"sv, til::color{ 102, 102, 102 } }, + std::pair{ "grey41"sv, til::color{ 105, 105, 105 } }, + std::pair{ "grey42"sv, til::color{ 107, 107, 107 } }, + std::pair{ "grey43"sv, til::color{ 110, 110, 110 } }, + std::pair{ "grey44"sv, til::color{ 112, 112, 112 } }, + std::pair{ "grey45"sv, til::color{ 115, 115, 115 } }, + std::pair{ "grey46"sv, til::color{ 117, 117, 117 } }, + std::pair{ "grey47"sv, til::color{ 120, 120, 120 } }, + std::pair{ "grey48"sv, til::color{ 122, 122, 122 } }, + std::pair{ "grey49"sv, til::color{ 125, 125, 125 } }, + std::pair{ "grey5"sv, til::color{ 13, 13, 13 } }, + std::pair{ "grey50"sv, til::color{ 127, 127, 127 } }, + std::pair{ "grey51"sv, til::color{ 130, 130, 130 } }, + std::pair{ "grey52"sv, til::color{ 133, 133, 133 } }, + std::pair{ "grey53"sv, til::color{ 135, 135, 135 } }, + std::pair{ "grey54"sv, til::color{ 138, 138, 138 } }, + std::pair{ "grey55"sv, til::color{ 140, 140, 140 } }, + std::pair{ "grey56"sv, til::color{ 143, 143, 143 } }, + std::pair{ "grey57"sv, til::color{ 145, 145, 145 } }, + std::pair{ "grey58"sv, til::color{ 148, 148, 148 } }, + std::pair{ "grey59"sv, til::color{ 150, 150, 150 } }, + std::pair{ "grey6"sv, til::color{ 15, 15, 15 } }, + std::pair{ "grey60"sv, til::color{ 153, 153, 153 } }, + std::pair{ "grey61"sv, til::color{ 156, 156, 156 } }, + std::pair{ "grey62"sv, til::color{ 158, 158, 158 } }, + std::pair{ "grey63"sv, til::color{ 161, 161, 161 } }, + std::pair{ "grey64"sv, til::color{ 163, 163, 163 } }, + std::pair{ "grey65"sv, til::color{ 166, 166, 166 } }, + std::pair{ "grey66"sv, til::color{ 168, 168, 168 } }, + std::pair{ "grey67"sv, til::color{ 171, 171, 171 } }, + std::pair{ "grey68"sv, til::color{ 173, 173, 173 } }, + std::pair{ "grey69"sv, til::color{ 176, 176, 176 } }, + std::pair{ "grey7"sv, til::color{ 18, 18, 18 } }, + std::pair{ "grey70"sv, til::color{ 179, 179, 179 } }, + std::pair{ "grey71"sv, til::color{ 181, 181, 181 } }, + std::pair{ "grey72"sv, til::color{ 184, 184, 184 } }, + std::pair{ "grey73"sv, til::color{ 186, 186, 186 } }, + std::pair{ "grey74"sv, til::color{ 189, 189, 189 } }, + std::pair{ "grey75"sv, til::color{ 191, 191, 191 } }, + std::pair{ "grey76"sv, til::color{ 194, 194, 194 } }, + std::pair{ "grey77"sv, til::color{ 196, 196, 196 } }, + std::pair{ "grey78"sv, til::color{ 199, 199, 199 } }, + std::pair{ "grey79"sv, til::color{ 201, 201, 201 } }, + std::pair{ "grey8"sv, til::color{ 20, 20, 20 } }, + std::pair{ "grey80"sv, til::color{ 204, 204, 204 } }, + std::pair{ "grey81"sv, til::color{ 207, 207, 207 } }, + std::pair{ "grey82"sv, til::color{ 209, 209, 209 } }, + std::pair{ "grey83"sv, til::color{ 212, 212, 212 } }, + std::pair{ "grey84"sv, til::color{ 214, 214, 214 } }, + std::pair{ "grey85"sv, til::color{ 217, 217, 217 } }, + std::pair{ "grey86"sv, til::color{ 219, 219, 219 } }, + std::pair{ "grey87"sv, til::color{ 222, 222, 222 } }, + std::pair{ "grey88"sv, til::color{ 224, 224, 224 } }, + std::pair{ "grey89"sv, til::color{ 227, 227, 227 } }, + std::pair{ "grey9"sv, til::color{ 23, 23, 23 } }, + std::pair{ "grey90"sv, til::color{ 229, 229, 229 } }, + std::pair{ "grey91"sv, til::color{ 232, 232, 232 } }, + std::pair{ "grey92"sv, til::color{ 235, 235, 235 } }, + std::pair{ "grey93"sv, til::color{ 237, 237, 237 } }, + std::pair{ "grey94"sv, til::color{ 240, 240, 240 } }, + std::pair{ "grey95"sv, til::color{ 242, 242, 242 } }, + std::pair{ "grey96"sv, til::color{ 245, 245, 245 } }, + std::pair{ "grey97"sv, til::color{ 247, 247, 247 } }, + std::pair{ "grey98"sv, til::color{ 250, 250, 250 } }, + std::pair{ "grey99"sv, til::color{ 252, 252, 252 } }, + std::pair{ "honeydew"sv, til::color{ 240, 255, 240 } }, + std::pair{ "honeydew1"sv, til::color{ 240, 255, 240 } }, + std::pair{ "honeydew2"sv, til::color{ 224, 238, 224 } }, + std::pair{ "honeydew3"sv, til::color{ 193, 205, 193 } }, + std::pair{ "honeydew4"sv, til::color{ 131, 139, 131 } }, + std::pair{ "hotpink"sv, til::color{ 255, 105, 180 } }, + std::pair{ "hotpink1"sv, til::color{ 255, 110, 180 } }, + std::pair{ "hotpink2"sv, til::color{ 238, 106, 167 } }, + std::pair{ "hotpink3"sv, til::color{ 205, 96, 144 } }, + std::pair{ "hotpink4"sv, til::color{ 139, 58, 98 } }, + std::pair{ "indianred"sv, til::color{ 205, 92, 92 } }, + std::pair{ "indianred1"sv, til::color{ 255, 106, 106 } }, + std::pair{ "indianred2"sv, til::color{ 238, 99, 99 } }, + std::pair{ "indianred3"sv, til::color{ 205, 85, 85 } }, + std::pair{ "indianred4"sv, til::color{ 139, 58, 58 } }, + std::pair{ "indigo"sv, til::color{ 75, 0, 130 } }, + std::pair{ "ivory"sv, til::color{ 255, 255, 240 } }, + std::pair{ "ivory1"sv, til::color{ 255, 255, 240 } }, + std::pair{ "ivory2"sv, til::color{ 238, 238, 224 } }, + std::pair{ "ivory3"sv, til::color{ 205, 205, 193 } }, + std::pair{ "ivory4"sv, til::color{ 139, 139, 131 } }, + std::pair{ "khaki"sv, til::color{ 240, 230, 140 } }, + std::pair{ "khaki1"sv, til::color{ 255, 246, 143 } }, + std::pair{ "khaki2"sv, til::color{ 238, 230, 133 } }, + std::pair{ "khaki3"sv, til::color{ 205, 198, 115 } }, + std::pair{ "khaki4"sv, til::color{ 139, 134, 78 } }, + std::pair{ "lavender"sv, til::color{ 230, 230, 250 } }, + std::pair{ "lavenderblush"sv, til::color{ 255, 240, 245 } }, + std::pair{ "lavenderblush1"sv, til::color{ 255, 240, 245 } }, + std::pair{ "lavenderblush2"sv, til::color{ 238, 224, 229 } }, + std::pair{ "lavenderblush3"sv, til::color{ 205, 193, 197 } }, + std::pair{ "lavenderblush4"sv, til::color{ 139, 131, 134 } }, + std::pair{ "lawngreen"sv, til::color{ 124, 252, 0 } }, + std::pair{ "lemonchiffon"sv, til::color{ 255, 250, 205 } }, + std::pair{ "lemonchiffon1"sv, til::color{ 255, 250, 205 } }, + std::pair{ "lemonchiffon2"sv, til::color{ 238, 233, 191 } }, + std::pair{ "lemonchiffon3"sv, til::color{ 205, 201, 165 } }, + std::pair{ "lemonchiffon4"sv, til::color{ 139, 137, 112 } }, + std::pair{ "lightblue"sv, til::color{ 173, 216, 230 } }, + std::pair{ "lightblue1"sv, til::color{ 191, 239, 255 } }, + std::pair{ "lightblue2"sv, til::color{ 178, 223, 238 } }, + std::pair{ "lightblue3"sv, til::color{ 154, 192, 205 } }, + std::pair{ "lightblue4"sv, til::color{ 104, 131, 139 } }, + std::pair{ "lightcora"sv, til::color{ 240, 128, 128 } }, + std::pair{ "lightcyan"sv, til::color{ 224, 255, 255 } }, + std::pair{ "lightcyan1"sv, til::color{ 224, 255, 255 } }, + std::pair{ "lightcyan2"sv, til::color{ 209, 238, 238 } }, + std::pair{ "lightcyan3"sv, til::color{ 180, 205, 205 } }, + std::pair{ "lightcyan4"sv, til::color{ 122, 139, 139 } }, + std::pair{ "lightgoldenrod"sv, til::color{ 238, 221, 130 } }, + std::pair{ "lightgoldenrod1"sv, til::color{ 255, 236, 139 } }, + std::pair{ "lightgoldenrod2"sv, til::color{ 238, 220, 130 } }, + std::pair{ "lightgoldenrod3"sv, til::color{ 205, 190, 112 } }, + std::pair{ "lightgoldenrod4"sv, til::color{ 139, 129, 76 } }, + std::pair{ "lightgoldenrodyellow"sv, til::color{ 250, 250, 210 } }, + std::pair{ "lightgray"sv, til::color{ 211, 211, 211 } }, + std::pair{ "lightgreen"sv, til::color{ 144, 238, 144 } }, + std::pair{ "lightgrey"sv, til::color{ 211, 211, 211 } }, + std::pair{ "lightpink"sv, til::color{ 255, 182, 193 } }, + std::pair{ "lightpink1"sv, til::color{ 255, 174, 185 } }, + std::pair{ "lightpink2"sv, til::color{ 238, 162, 173 } }, + std::pair{ "lightpink3"sv, til::color{ 205, 140, 149 } }, + std::pair{ "lightpink4"sv, til::color{ 139, 95, 101 } }, + std::pair{ "lightsalmon"sv, til::color{ 255, 160, 122 } }, + std::pair{ "lightsalmon1"sv, til::color{ 255, 160, 122 } }, + std::pair{ "lightsalmon2"sv, til::color{ 238, 149, 114 } }, + std::pair{ "lightsalmon3"sv, til::color{ 205, 129, 98 } }, + std::pair{ "lightsalmon4"sv, til::color{ 139, 87, 66 } }, + std::pair{ "lightseagreen"sv, til::color{ 32, 178, 170 } }, + std::pair{ "lightskyblue"sv, til::color{ 135, 206, 250 } }, + std::pair{ "lightskyblue1"sv, til::color{ 176, 226, 255 } }, + std::pair{ "lightskyblue2"sv, til::color{ 164, 211, 238 } }, + std::pair{ "lightskyblue3"sv, til::color{ 141, 182, 205 } }, + std::pair{ "lightskyblue4"sv, til::color{ 96, 123, 139 } }, + std::pair{ "lightslateblue"sv, til::color{ 132, 112, 255 } }, + std::pair{ "lightslategray"sv, til::color{ 119, 136, 153 } }, + std::pair{ "lightslategrey"sv, til::color{ 119, 136, 153 } }, + std::pair{ "lightsteelblue"sv, til::color{ 176, 196, 222 } }, + std::pair{ "lightsteelblue1"sv, til::color{ 202, 225, 255 } }, + std::pair{ "lightsteelblue2"sv, til::color{ 188, 210, 238 } }, + std::pair{ "lightsteelblue3"sv, til::color{ 162, 181, 205 } }, + std::pair{ "lightsteelblue4"sv, til::color{ 110, 123, 139 } }, + std::pair{ "lightyellow"sv, til::color{ 255, 255, 224 } }, + std::pair{ "lightyellow1"sv, til::color{ 255, 255, 224 } }, + std::pair{ "lightyellow2"sv, til::color{ 238, 238, 209 } }, + std::pair{ "lightyellow3"sv, til::color{ 205, 205, 180 } }, + std::pair{ "lightyellow4"sv, til::color{ 139, 139, 122 } }, + std::pair{ "lime"sv, til::color{ 0, 255, 0 } }, + std::pair{ "limegreen"sv, til::color{ 50, 205, 50 } }, + std::pair{ "linen"sv, til::color{ 250, 240, 230 } }, + std::pair{ "magenta"sv, til::color{ 255, 0, 255 } }, + std::pair{ "magenta1"sv, til::color{ 255, 0, 255 } }, + std::pair{ "magenta2"sv, til::color{ 238, 0, 238 } }, + std::pair{ "magenta3"sv, til::color{ 205, 0, 205 } }, + std::pair{ "magenta4"sv, til::color{ 139, 0, 139 } }, + std::pair{ "maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ "maroon1"sv, til::color{ 255, 52, 179 } }, + std::pair{ "maroon2"sv, til::color{ 238, 48, 167 } }, + std::pair{ "maroon3"sv, til::color{ 205, 41, 144 } }, + std::pair{ "maroon4"sv, til::color{ 139, 28, 98 } }, + std::pair{ "mediumaquamarine"sv, til::color{ 102, 205, 170 } }, + std::pair{ "mediumblue"sv, til::color{ 0, 0, 205 } }, + std::pair{ "mediumorchid"sv, til::color{ 186, 85, 211 } }, + std::pair{ "mediumorchid1"sv, til::color{ 224, 102, 255 } }, + std::pair{ "mediumorchid2"sv, til::color{ 209, 95, 238 } }, + std::pair{ "mediumorchid3"sv, til::color{ 180, 82, 205 } }, + std::pair{ "mediumorchid4"sv, til::color{ 122, 55, 139 } }, + std::pair{ "mediumpurple"sv, til::color{ 147, 112, 219 } }, + std::pair{ "mediumpurple1"sv, til::color{ 171, 130, 255 } }, + std::pair{ "mediumpurple2"sv, til::color{ 159, 121, 238 } }, + std::pair{ "mediumpurple3"sv, til::color{ 137, 104, 205 } }, + std::pair{ "mediumpurple4"sv, til::color{ 93, 71, 139 } }, + std::pair{ "mediumseagreen"sv, til::color{ 60, 179, 113 } }, + std::pair{ "mediumslateblue"sv, til::color{ 123, 104, 238 } }, + std::pair{ "mediumspringgreen"sv, til::color{ 0, 250, 154 } }, + std::pair{ "mediumturquoise"sv, til::color{ 72, 209, 204 } }, + std::pair{ "mediumvioletred"sv, til::color{ 199, 21, 133 } }, + std::pair{ "midnightblue"sv, til::color{ 25, 25, 112 } }, + std::pair{ "mintcream"sv, til::color{ 245, 255, 250 } }, + std::pair{ "mistyrose"sv, til::color{ 255, 228, 225 } }, + std::pair{ "mistyrose1"sv, til::color{ 255, 228, 225 } }, + std::pair{ "mistyrose2"sv, til::color{ 238, 213, 210 } }, + std::pair{ "mistyrose3"sv, til::color{ 205, 183, 181 } }, + std::pair{ "mistyrose4"sv, til::color{ 139, 125, 123 } }, + std::pair{ "moccasin"sv, til::color{ 255, 228, 181 } }, + std::pair{ "navajowhite"sv, til::color{ 255, 222, 173 } }, + std::pair{ "navajowhite1"sv, til::color{ 255, 222, 173 } }, + std::pair{ "navajowhite2"sv, til::color{ 238, 207, 161 } }, + std::pair{ "navajowhite3"sv, til::color{ 205, 179, 139 } }, + std::pair{ "navajowhite4"sv, til::color{ 139, 121, 94 } }, + std::pair{ "navy"sv, til::color{ 0, 0, 128 } }, + std::pair{ "navyblue"sv, til::color{ 0, 0, 128 } }, + std::pair{ "oldlace"sv, til::color{ 253, 245, 230 } }, + std::pair{ "olive"sv, til::color{ 128, 128, 0 } }, + std::pair{ "olivedrab"sv, til::color{ 107, 142, 35 } }, + std::pair{ "olivedrab1"sv, til::color{ 192, 255, 62 } }, + std::pair{ "olivedrab2"sv, til::color{ 179, 238, 58 } }, + std::pair{ "olivedrab3"sv, til::color{ 154, 205, 50 } }, + std::pair{ "olivedrab4"sv, til::color{ 105, 139, 34 } }, + std::pair{ "orange"sv, til::color{ 255, 165, 0 } }, + std::pair{ "orange1"sv, til::color{ 255, 165, 0 } }, + std::pair{ "orange2"sv, til::color{ 238, 154, 0 } }, + std::pair{ "orange3"sv, til::color{ 205, 133, 0 } }, + std::pair{ "orange4"sv, til::color{ 139, 90, 0 } }, + std::pair{ "orangered"sv, til::color{ 255, 69, 0 } }, + std::pair{ "orangered1"sv, til::color{ 255, 69, 0 } }, + std::pair{ "orangered2"sv, til::color{ 238, 64, 0 } }, + std::pair{ "orangered3"sv, til::color{ 205, 55, 0 } }, + std::pair{ "orangered4"sv, til::color{ 139, 37, 0 } }, + std::pair{ "orchid"sv, til::color{ 218, 112, 214 } }, + std::pair{ "orchid1"sv, til::color{ 255, 131, 250 } }, + std::pair{ "orchid2"sv, til::color{ 238, 122, 233 } }, + std::pair{ "orchid3"sv, til::color{ 205, 105, 201 } }, + std::pair{ "orchid4"sv, til::color{ 139, 71, 137 } }, + std::pair{ "palegoldenrod"sv, til::color{ 238, 232, 170 } }, + std::pair{ "palegreen"sv, til::color{ 152, 251, 152 } }, + std::pair{ "palegreen1"sv, til::color{ 154, 255, 154 } }, + std::pair{ "palegreen2"sv, til::color{ 144, 238, 144 } }, + std::pair{ "palegreen3"sv, til::color{ 124, 205, 124 } }, + std::pair{ "palegreen4"sv, til::color{ 84, 139, 84 } }, + std::pair{ "paleturquoise"sv, til::color{ 175, 238, 238 } }, + std::pair{ "paleturquoise1"sv, til::color{ 187, 255, 255 } }, + std::pair{ "paleturquoise2"sv, til::color{ 174, 238, 238 } }, + std::pair{ "paleturquoise3"sv, til::color{ 150, 205, 205 } }, + std::pair{ "paleturquoise4"sv, til::color{ 102, 139, 139 } }, + std::pair{ "palevioletred"sv, til::color{ 219, 112, 147 } }, + std::pair{ "palevioletred1"sv, til::color{ 255, 130, 171 } }, + std::pair{ "palevioletred2"sv, til::color{ 238, 121, 159 } }, + std::pair{ "palevioletred3"sv, til::color{ 205, 104, 137 } }, + std::pair{ "palevioletred4"sv, til::color{ 139, 71, 93 } }, + std::pair{ "papayawhip"sv, til::color{ 255, 239, 213 } }, + std::pair{ "peachpuff"sv, til::color{ 255, 218, 185 } }, + std::pair{ "peachpuff1"sv, til::color{ 255, 218, 185 } }, + std::pair{ "peachpuff2"sv, til::color{ 238, 203, 173 } }, + std::pair{ "peachpuff3"sv, til::color{ 205, 175, 149 } }, + std::pair{ "peachpuff4"sv, til::color{ 139, 119, 101 } }, + std::pair{ "peru"sv, til::color{ 205, 133, 63 } }, + std::pair{ "pink"sv, til::color{ 255, 192, 203 } }, + std::pair{ "pink1"sv, til::color{ 255, 181, 197 } }, + std::pair{ "pink2"sv, til::color{ 238, 169, 184 } }, + std::pair{ "pink3"sv, til::color{ 205, 145, 158 } }, + std::pair{ "pink4"sv, til::color{ 139, 99, 108 } }, + std::pair{ "plum"sv, til::color{ 221, 160, 221 } }, + std::pair{ "plum1"sv, til::color{ 255, 187, 255 } }, + std::pair{ "plum2"sv, til::color{ 238, 174, 238 } }, + std::pair{ "plum3"sv, til::color{ 205, 150, 205 } }, + std::pair{ "plum4"sv, til::color{ 139, 102, 139 } }, + std::pair{ "powderblue"sv, til::color{ 176, 224, 230 } }, + std::pair{ "purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ "purple1"sv, til::color{ 155, 48, 255 } }, + std::pair{ "purple2"sv, til::color{ 145, 44, 238 } }, + std::pair{ "purple3"sv, til::color{ 125, 38, 205 } }, + std::pair{ "purple4"sv, til::color{ 85, 26, 139 } }, + std::pair{ "rebeccapurple"sv, til::color{ 102, 51, 153 } }, + std::pair{ "red"sv, til::color{ 255, 0, 0 } }, + std::pair{ "red1"sv, til::color{ 255, 0, 0 } }, + std::pair{ "red2"sv, til::color{ 238, 0, 0 } }, + std::pair{ "red3"sv, til::color{ 205, 0, 0 } }, + std::pair{ "red4"sv, til::color{ 139, 0, 0 } }, + std::pair{ "rosybrown"sv, til::color{ 188, 143, 143 } }, + std::pair{ "rosybrown1"sv, til::color{ 255, 193, 193 } }, + std::pair{ "rosybrown2"sv, til::color{ 238, 180, 180 } }, + std::pair{ "rosybrown3"sv, til::color{ 205, 155, 155 } }, + std::pair{ "rosybrown4"sv, til::color{ 139, 105, 105 } }, + std::pair{ "royalblue"sv, til::color{ 65, 105, 225 } }, + std::pair{ "royalblue1"sv, til::color{ 72, 118, 255 } }, + std::pair{ "royalblue2"sv, til::color{ 67, 110, 238 } }, + std::pair{ "royalblue3"sv, til::color{ 58, 95, 205 } }, + std::pair{ "royalblue4"sv, til::color{ 39, 64, 139 } }, + std::pair{ "saddlebrown"sv, til::color{ 139, 69, 19 } }, + std::pair{ "salmon"sv, til::color{ 250, 128, 114 } }, + std::pair{ "salmon1"sv, til::color{ 255, 140, 105 } }, + std::pair{ "salmon2"sv, til::color{ 238, 130, 98 } }, + std::pair{ "salmon3"sv, til::color{ 205, 112, 84 } }, + std::pair{ "salmon4"sv, til::color{ 139, 76, 57 } }, + std::pair{ "sandybrown"sv, til::color{ 244, 164, 96 } }, + std::pair{ "seagreen"sv, til::color{ 46, 139, 87 } }, + std::pair{ "seagreen1"sv, til::color{ 84, 255, 159 } }, + std::pair{ "seagreen2"sv, til::color{ 78, 238, 148 } }, + std::pair{ "seagreen3"sv, til::color{ 67, 205, 128 } }, + std::pair{ "seagreen4"sv, til::color{ 46, 139, 87 } }, + std::pair{ "seashel"sv, til::color{ 255, 245, 238 } }, + std::pair{ "seashell1"sv, til::color{ 255, 245, 238 } }, + std::pair{ "seashell2"sv, til::color{ 238, 229, 222 } }, + std::pair{ "seashell3"sv, til::color{ 205, 197, 191 } }, + std::pair{ "seashell4"sv, til::color{ 139, 134, 130 } }, + std::pair{ "sienna"sv, til::color{ 160, 82, 45 } }, + std::pair{ "sienna1"sv, til::color{ 255, 130, 71 } }, + std::pair{ "sienna2"sv, til::color{ 238, 121, 66 } }, + std::pair{ "sienna3"sv, til::color{ 205, 104, 57 } }, + std::pair{ "sienna4"sv, til::color{ 139, 71, 38 } }, + std::pair{ "silver"sv, til::color{ 192, 192, 192 } }, + std::pair{ "skyblue"sv, til::color{ 135, 206, 235 } }, + std::pair{ "skyblue1"sv, til::color{ 135, 206, 255 } }, + std::pair{ "skyblue2"sv, til::color{ 126, 192, 238 } }, + std::pair{ "skyblue3"sv, til::color{ 108, 166, 205 } }, + std::pair{ "skyblue4"sv, til::color{ 74, 112, 139 } }, + std::pair{ "slateblue"sv, til::color{ 106, 90, 205 } }, + std::pair{ "slateblue1"sv, til::color{ 131, 111, 255 } }, + std::pair{ "slateblue2"sv, til::color{ 122, 103, 238 } }, + std::pair{ "slateblue3"sv, til::color{ 105, 89, 205 } }, + std::pair{ "slateblue4"sv, til::color{ 71, 60, 139 } }, + std::pair{ "slategray"sv, til::color{ 112, 128, 144 } }, + std::pair{ "slategray1"sv, til::color{ 198, 226, 255 } }, + std::pair{ "slategray2"sv, til::color{ 185, 211, 238 } }, + std::pair{ "slategray3"sv, til::color{ 159, 182, 205 } }, + std::pair{ "slategray4"sv, til::color{ 108, 123, 139 } }, + std::pair{ "slategrey"sv, til::color{ 112, 128, 144 } }, + std::pair{ "snow"sv, til::color{ 255, 250, 250 } }, + std::pair{ "snow1"sv, til::color{ 255, 250, 250 } }, + std::pair{ "snow2"sv, til::color{ 238, 233, 233 } }, + std::pair{ "snow3"sv, til::color{ 205, 201, 201 } }, + std::pair{ "snow4"sv, til::color{ 139, 137, 137 } }, + std::pair{ "springgreen"sv, til::color{ 0, 255, 127 } }, + std::pair{ "springgreen1"sv, til::color{ 0, 255, 127 } }, + std::pair{ "springgreen2"sv, til::color{ 0, 238, 118 } }, + std::pair{ "springgreen3"sv, til::color{ 0, 205, 102 } }, + std::pair{ "springgreen4"sv, til::color{ 0, 139, 69 } }, + std::pair{ "steelblue"sv, til::color{ 70, 130, 180 } }, + std::pair{ "steelblue1"sv, til::color{ 99, 184, 255 } }, + std::pair{ "steelblue2"sv, til::color{ 92, 172, 238 } }, + std::pair{ "steelblue3"sv, til::color{ 79, 148, 205 } }, + std::pair{ "steelblue4"sv, til::color{ 54, 100, 139 } }, + std::pair{ "tan"sv, til::color{ 210, 180, 140 } }, + std::pair{ "tan1"sv, til::color{ 255, 165, 79 } }, + std::pair{ "tan2"sv, til::color{ 238, 154, 73 } }, + std::pair{ "tan3"sv, til::color{ 205, 133, 63 } }, + std::pair{ "tan4"sv, til::color{ 139, 90, 43 } }, + std::pair{ "tea"sv, til::color{ 0, 128, 128 } }, + std::pair{ "thistle"sv, til::color{ 216, 191, 216 } }, + std::pair{ "thistle1"sv, til::color{ 255, 225, 255 } }, + std::pair{ "thistle2"sv, til::color{ 238, 210, 238 } }, + std::pair{ "thistle3"sv, til::color{ 205, 181, 205 } }, + std::pair{ "thistle4"sv, til::color{ 139, 123, 139 } }, + std::pair{ "tomato"sv, til::color{ 255, 99, 71 } }, + std::pair{ "tomato1"sv, til::color{ 255, 99, 71 } }, + std::pair{ "tomato2"sv, til::color{ 238, 92, 66 } }, + std::pair{ "tomato3"sv, til::color{ 205, 79, 57 } }, + std::pair{ "tomato4"sv, til::color{ 139, 54, 38 } }, + std::pair{ "turquoise"sv, til::color{ 64, 224, 208 } }, + std::pair{ "turquoise1"sv, til::color{ 0, 245, 255 } }, + std::pair{ "turquoise2"sv, til::color{ 0, 229, 238 } }, + std::pair{ "turquoise3"sv, til::color{ 0, 197, 205 } }, + std::pair{ "turquoise4"sv, til::color{ 0, 134, 139 } }, + std::pair{ "violet"sv, til::color{ 238, 130, 238 } }, + std::pair{ "violetred"sv, til::color{ 208, 32, 144 } }, + std::pair{ "violetred1"sv, til::color{ 255, 62, 150 } }, + std::pair{ "violetred2"sv, til::color{ 238, 58, 140 } }, + std::pair{ "violetred3"sv, til::color{ 205, 50, 120 } }, + std::pair{ "violetred4"sv, til::color{ 139, 34, 82 } }, + std::pair{ "webgray"sv, til::color{ 128, 128, 128 } }, + std::pair{ "webgreen"sv, til::color{ 0, 128, 0 } }, + std::pair{ "webgrey"sv, til::color{ 128, 128, 128 } }, + std::pair{ "webmaroon"sv, til::color{ 128, 0, 0 } }, + std::pair{ "webpurple"sv, til::color{ 128, 0, 128 } }, + std::pair{ "wheat"sv, til::color{ 245, 222, 179 } }, + std::pair{ "wheat1"sv, til::color{ 255, 231, 186 } }, + std::pair{ "wheat2"sv, til::color{ 238, 216, 174 } }, + std::pair{ "wheat3"sv, til::color{ 205, 186, 150 } }, + std::pair{ "wheat4"sv, til::color{ 139, 126, 102 } }, + std::pair{ "white"sv, til::color{ 255, 255, 255 } }, + std::pair{ "whitesmoke"sv, til::color{ 245, 245, 245 } }, + std::pair{ "x11gray"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11green"sv, til::color{ 0, 255, 0 } }, + std::pair{ "x11grey"sv, til::color{ 190, 190, 190 } }, + std::pair{ "x11maroon"sv, til::color{ 176, 48, 96 } }, + std::pair{ "x11purple"sv, til::color{ 160, 32, 240 } }, + std::pair{ "yellow"sv, til::color{ 255, 255, 0 } }, + std::pair{ "yellow1"sv, til::color{ 255, 255, 0 } }, + std::pair{ "yellow2"sv, til::color{ 238, 238, 0 } }, + std::pair{ "yellow3"sv, til::color{ 205, 205, 0 } }, + std::pair{ "yellow4"sv, til::color{ 139, 139, 0 } }, + std::pair{ "yellowgreen"sv, til::color{ 154, 205, 50 } } }; // Function Description: @@ -1032,9 +1032,27 @@ std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_vi try { std::wstring key(wstr); - std::transform(key.begin(), key.end(), key.begin(), std::towlower); - key.erase(std::remove_if(key.begin(), key.end(), std::iswspace), key.end()); - const auto iter = xorgAppColorTable.find(key); + std::stringstream ss; + for (wchar_t c : key) + { + // X11 guarantees that characters are all Latin1. + // Return early if an invalid character is seen. + if (c > 127) + { + return std::nullopt; + } + + // Ignore spaces. + if (std::iswspace(c)) + { + continue; + } + + ss << static_cast(std::towlower(c)); + } + + std::string name(ss.str()); + const auto iter = xorgAppColorTable.find(name); if (iter == xorgAppColorTable.end()) { return std::nullopt; @@ -1042,4 +1060,8 @@ try return iter->second; } -CATCH_FAIL_FAST() +catch (...) +{ + LOG_CAUGHT_EXCEPTION(); + return std::nullopt; +} diff --git a/src/types/ut_types/UtilsTests.cpp b/src/types/ut_types/UtilsTests.cpp index 3898be919d5..fd4ad858250 100644 --- a/src/types/ut_types/UtilsTests.cpp +++ b/src/types/ut_types/UtilsTests.cpp @@ -205,6 +205,7 @@ void UtilsTests::TestColorFromXTermColor() _VerifyXTermColorInvalid(L"rgb:/1/1"); _VerifyXTermColorInvalid(L"rgb:1/1/1/"); _VerifyXTermColorInvalid(L"rgb:1/1/1/1"); + _VerifyXTermColorInvalid(L"rgb:111111111"); _VerifyXTermColorInvalid(L"rgb:this/is/invalid"); _VerifyXTermColorInvalid(L"rgba:1/1/1"); _VerifyXTermColorInvalid(L"rgbi:1/1/1"); diff --git a/src/types/utils.cpp b/src/types/utils.cpp index 1a7ebcfe7e6..bb189cbddaa 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -120,19 +120,14 @@ til::color Utils::ColorFromHexString(const std::string_view str) // - An optional color which contains value if a color was successfully parsed std::optional Utils::ColorFromXTermColor(const std::wstring_view string) noexcept { - std::optional color = ColorFromXParseColorSpec(string); - if (color.has_value()) + auto color = ColorFromXParseColorSpec(string); + if (!color.has_value()) { - return color.value(); + // Try again, but use the app color name parser + color = ColorFromXOrgAppColorName(string); } - color = ColorFromXOrgAppColorName(string); - if (color.has_value()) - { - return color.value(); - } - - return std::nullopt; + return color; } // Routine Description: @@ -314,7 +309,11 @@ try return std::nullopt; } -CATCH_FAIL_FAST() +catch (...) +{ + LOG_CAUGHT_EXCEPTION(); + return std::nullopt; +} // Routine Description: // - Converts a hex character to its equivalent integer value. From 33b401e55c5a49ce0b445848221ecf4a016859d8 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Thu, 8 Oct 2020 19:49:13 +0800 Subject: [PATCH 40/43] Auditing --- src/terminal/parser/OutputStateMachineEngine.cpp | 5 ----- src/types/colorTable.cpp | 14 ++++++++++---- src/types/utils.cpp | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 7f8dea91eff..4454f286ff2 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1361,11 +1361,6 @@ bool OutputStateMachineEngine::DispatchIntermediatesFromEscape() const noexcept return false; } -#pragma warning(push) -#pragma warning(disable : 26497) // We don't use any of these "constexprable" functions in that fashion - -#pragma warning(pop) - // Routine Description: // - OSC 4 ; c ; spec ST // c: the index of the ansi color table diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index d3d58d250ab..a48abec7fde 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -693,7 +693,7 @@ static constexpr til::presorted_static_map xorgAppColorTable{ std::pair{ "lightblue2"sv, til::color{ 178, 223, 238 } }, std::pair{ "lightblue3"sv, til::color{ 154, 192, 205 } }, std::pair{ "lightblue4"sv, til::color{ 104, 131, 139 } }, - std::pair{ "lightcora"sv, til::color{ 240, 128, 128 } }, + std::pair{ "lightcoral"sv, til::color{ 240, 128, 128 } }, std::pair{ "lightcyan"sv, til::color{ 224, 255, 255 } }, std::pair{ "lightcyan1"sv, til::color{ 224, 255, 255 } }, std::pair{ "lightcyan2"sv, til::color{ 209, 238, 238 } }, @@ -871,7 +871,7 @@ static constexpr til::presorted_static_map xorgAppColorTable{ std::pair{ "seagreen2"sv, til::color{ 78, 238, 148 } }, std::pair{ "seagreen3"sv, til::color{ 67, 205, 128 } }, std::pair{ "seagreen4"sv, til::color{ 46, 139, 87 } }, - std::pair{ "seashel"sv, til::color{ 255, 245, 238 } }, + std::pair{ "seashell"sv, til::color{ 255, 245, 238 } }, std::pair{ "seashell1"sv, til::color{ 255, 245, 238 } }, std::pair{ "seashell2"sv, til::color{ 238, 229, 222 } }, std::pair{ "seashell3"sv, til::color{ 205, 197, 191 } }, @@ -1022,6 +1022,9 @@ void Utils::Initialize256ColorTable(const gsl::span table) std::copy(standardXterm256ColorTable.begin(), standardXterm256ColorTable.end(), table.begin()); } +#pragma warning(push) +#pragma warning(disable : 26447) // This is a false positive. + // Function Description: // - Parses a color from a string based on the XOrg app color name table. // Arguments: @@ -1033,7 +1036,8 @@ try { std::wstring key(wstr); std::stringstream ss; - for (wchar_t c : key) + + for (const wchar_t c : key) { // X11 guarantees that characters are all Latin1. // Return early if an invalid character is seen. @@ -1048,7 +1052,7 @@ try continue; } - ss << static_cast(std::towlower(c)); + ss << gsl::narrow_cast(std::towlower(c)); } std::string name(ss.str()); @@ -1065,3 +1069,5 @@ catch (...) LOG_CAUGHT_EXCEPTION(); return std::nullopt; } + +#pragma warning(pop) diff --git a/src/types/utils.cpp b/src/types/utils.cpp index bb189cbddaa..7987654a552 100644 --- a/src/types/utils.cpp +++ b/src/types/utils.cpp @@ -302,9 +302,9 @@ try // Only if we find a valid colorspec can we pass it out successfully. if (foundValidColorSpec) { - return til::color(LOBYTE(colorValues.at(0)), - LOBYTE(colorValues.at(1)), - LOBYTE(colorValues.at(2))); + return til::color(LOBYTE(til::at(colorValues, 0)), + LOBYTE(til::at(colorValues, 1)), + LOBYTE(til::at(colorValues, 2))); } return std::nullopt; From f08ead539547eff3e78a6598fcc54988cb1299bf Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Fri, 9 Oct 2020 22:14:05 +0800 Subject: [PATCH 41/43] Rm unused mutable copy --- src/types/colorTable.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index a48abec7fde..a1008e8adaf 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -1034,10 +1034,8 @@ void Utils::Initialize256ColorTable(const gsl::span table) std::optional Utils::ColorFromXOrgAppColorName(const std::wstring_view wstr) noexcept try { - std::wstring key(wstr); std::stringstream ss; - - for (const wchar_t c : key) + for (const wchar_t c : wstr) { // X11 guarantees that characters are all Latin1. // Return early if an invalid character is seen. From cf69ae347f3de0ae8118977006a6114b31fea370 Mon Sep 17 00:00:00 2001 From: skyline75489 Date: Sat, 10 Oct 2020 23:02:18 +0800 Subject: [PATCH 42/43] Suppress C26445 inside til::at --- src/inc/til/at.h | 1 + src/terminal/parser/OutputStateMachineEngine.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/inc/til/at.h b/src/inc/til/at.h index f08f7bb08bb..592129634ae 100644 --- a/src/inc/til/at.h +++ b/src/inc/til/at.h @@ -39,6 +39,7 @@ namespace til { #pragma warning(suppress : 26482) // Suppress bounds.2 check for indexing with constant expressions #pragma warning(suppress : 26446) // Suppress bounds.4 check for subscript operator. +#pragma warning(suppress : 26445) // Suppress lifetime check for a reference to gsl::span or std::string_view return cont[i]; } diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 4454f286ff2..8c8984cd9aa 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -1391,8 +1391,8 @@ try for (size_t i = 0, j = 1; j < parts.size(); i += 2, j += 2) { unsigned int tableIndex = 0; - const bool indexSuccess = Utils::StringToUint(parts.at(i), tableIndex); - const auto colorOptional = Utils::ColorFromXTermColor(parts.at(j)); + const bool indexSuccess = Utils::StringToUint(til::at(parts, i), tableIndex); + const auto colorOptional = Utils::ColorFromXTermColor(til::at(parts, j)); if (indexSuccess && colorOptional.has_value()) { newTableIndexes.push_back(tableIndex); @@ -1475,7 +1475,7 @@ try std::vector newRgbs; for (size_t i = 0; i < parts.size(); i++) { - const auto colorOptional = Utils::ColorFromXTermColor(parts.at(i)); + const auto colorOptional = Utils::ColorFromXTermColor(til::at(parts, i)); if (colorOptional.has_value()) { newRgbs.push_back(colorOptional.value()); From d4f61ad5fbe174825ade21a7d7e68df08f618a53 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Wed, 14 Oct 2020 17:21:59 -0700 Subject: [PATCH 43/43] Repair damaged color names --- src/types/colorTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/colorTable.cpp b/src/types/colorTable.cpp index a1008e8adaf..6fbd24cb0f2 100644 --- a/src/types/colorTable.cpp +++ b/src/types/colorTable.cpp @@ -343,7 +343,7 @@ static constexpr til::presorted_static_map xorgAppColorTable{ std::pair{ "chocolate2"sv, til::color{ 238, 118, 33 } }, std::pair{ "chocolate3"sv, til::color{ 205, 102, 29 } }, std::pair{ "chocolate4"sv, til::color{ 139, 69, 19 } }, - std::pair{ "cora"sv, til::color{ 255, 127, 80 } }, + std::pair{ "coral"sv, til::color{ 255, 127, 80 } }, std::pair{ "coral1"sv, til::color{ 255, 114, 86 } }, std::pair{ "coral2"sv, til::color{ 238, 106, 80 } }, std::pair{ "coral3"sv, til::color{ 205, 91, 69 } }, @@ -918,7 +918,7 @@ static constexpr til::presorted_static_map xorgAppColorTable{ std::pair{ "tan2"sv, til::color{ 238, 154, 73 } }, std::pair{ "tan3"sv, til::color{ 205, 133, 63 } }, std::pair{ "tan4"sv, til::color{ 139, 90, 43 } }, - std::pair{ "tea"sv, til::color{ 0, 128, 128 } }, + std::pair{ "teal"sv, til::color{ 0, 128, 128 } }, std::pair{ "thistle"sv, til::color{ 216, 191, 216 } }, std::pair{ "thistle1"sv, til::color{ 255, 225, 255 } }, std::pair{ "thistle2"sv, til::color{ 238, 210, 238 } },