mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-12 00:07:24 -06:00
Colortool: improve color table. (#12089)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - add suport for light backgrounds - make color tool use 90-97 and 100-107 sequences for fg/bg - fix loops stop condition <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments additional improvements that I've seen while working on #12087 <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
This commit is contained in:
parent
d5b177dc33
commit
95a79c2262
1
.github/actions/spelling/allow/allow.txt
vendored
1
.github/actions/spelling/allow/allow.txt
vendored
@ -82,3 +82,4 @@ We'd
|
|||||||
wildcards
|
wildcards
|
||||||
yeru
|
yeru
|
||||||
zhe
|
zhe
|
||||||
|
allcolors
|
||||||
|
|||||||
@ -31,9 +31,8 @@ namespace ColorTool
|
|||||||
private const int BrightWhite = 15;
|
private const int BrightWhite = 15;
|
||||||
|
|
||||||
// This is the order of colors when output by the table.
|
// This is the order of colors when output by the table.
|
||||||
private static readonly IReadOnlyList<int> Foregrounds = new[]
|
private static readonly IReadOnlyList<int> TableColors = new[]
|
||||||
{
|
{
|
||||||
BrightWhite,
|
|
||||||
DarkBlack,
|
DarkBlack,
|
||||||
BrightBlack,
|
BrightBlack,
|
||||||
DarkRed,
|
DarkRed,
|
||||||
@ -52,88 +51,91 @@ namespace ColorTool
|
|||||||
BrightWhite
|
BrightWhite
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly IReadOnlyList<int> Backgrounds = new[]
|
|
||||||
{
|
|
||||||
DarkBlack,
|
|
||||||
DarkRed,
|
|
||||||
DarkGreen,
|
|
||||||
DarkYellow,
|
|
||||||
DarkBlue,
|
|
||||||
DarkMagenta,
|
|
||||||
DarkCyan,
|
|
||||||
DarkWhite
|
|
||||||
};
|
|
||||||
|
|
||||||
private const string TestText = " gYw ";
|
|
||||||
|
|
||||||
private static readonly IReadOnlyList<string> AnsiForegroundSequences = new[]
|
private static readonly IReadOnlyList<string> AnsiForegroundSequences = new[]
|
||||||
{
|
{
|
||||||
"m",
|
|
||||||
"1m",
|
|
||||||
"30m",
|
"30m",
|
||||||
"1;30m",
|
"90m",
|
||||||
"31m",
|
"31m",
|
||||||
"1;31m",
|
"91m",
|
||||||
"32m",
|
"32m",
|
||||||
"1;32m",
|
"92m",
|
||||||
"33m",
|
"33m",
|
||||||
"1;33m",
|
"93m",
|
||||||
"34m",
|
"34m",
|
||||||
"1;34m",
|
"94m",
|
||||||
"35m",
|
"35m",
|
||||||
"1;35m",
|
"95m",
|
||||||
"36m",
|
"36m",
|
||||||
"1;36m",
|
"96m",
|
||||||
"37m",
|
"37m",
|
||||||
"1;37m"
|
"97m"
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly IReadOnlyList<string> AnsiBackgroundSequences = new[]
|
private static readonly IReadOnlyList<string> AnsiBackgroundSequences = new[]
|
||||||
{
|
{
|
||||||
"m",
|
|
||||||
"40m",
|
"40m",
|
||||||
|
"100m",
|
||||||
"41m",
|
"41m",
|
||||||
|
"101m",
|
||||||
"42m",
|
"42m",
|
||||||
|
"102m",
|
||||||
"43m",
|
"43m",
|
||||||
|
"103m",
|
||||||
"44m",
|
"44m",
|
||||||
|
"104m",
|
||||||
"45m",
|
"45m",
|
||||||
|
"105m",
|
||||||
"46m",
|
"46m",
|
||||||
"47m"
|
"106m",
|
||||||
|
"47m",
|
||||||
|
"107m"
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void PrintTable()
|
private const string AnsiDefaultFg = "39m";
|
||||||
|
private const string AnsiDefaultBg = "49m";
|
||||||
|
|
||||||
|
public static void PrintTable(bool compact)
|
||||||
{
|
{
|
||||||
|
string TestText = compact ? " gYw " : " gYw ";
|
||||||
ConsoleColor[] colors = (ConsoleColor[])ConsoleColor.GetValues(typeof(ConsoleColor));
|
ConsoleColor[] colors = (ConsoleColor[])ConsoleColor.GetValues(typeof(ConsoleColor));
|
||||||
// Save the current background and foreground colors.
|
// Save the current background and foreground colors.
|
||||||
ConsoleColor currentBackground = Console.BackgroundColor;
|
ConsoleColor currentBackground = Console.BackgroundColor;
|
||||||
ConsoleColor currentForeground = Console.ForegroundColor;
|
ConsoleColor currentForeground = Console.ForegroundColor;
|
||||||
|
|
||||||
Console.Write("\t");
|
// first column
|
||||||
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg++)
|
Console.Write("\t ");
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(AnsiDefaultBg);
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(" ");
|
||||||
|
|
||||||
|
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg += 1 + Convert.ToUInt16(compact))
|
||||||
{
|
{
|
||||||
if (bg > 0) Console.Write(" ");
|
|
||||||
Console.Write(" ");
|
|
||||||
Console.Write(bg == 0 ? " " : AnsiBackgroundSequences[bg]);
|
|
||||||
Console.Write(" ");
|
Console.Write(" ");
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(AnsiBackgroundSequences[bg]);
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
if (AnsiBackgroundSequences[bg].Length == 3) Console.Write(" ");
|
||||||
}
|
}
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
|
|
||||||
for (int fg = 0; fg < AnsiForegroundSequences.Count; fg++)
|
for (int fg = 0; fg <= TableColors.Count && fg <= AnsiForegroundSequences.Count; fg++)
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = currentForeground;
|
Console.ForegroundColor = currentForeground;
|
||||||
Console.BackgroundColor = currentBackground;
|
Console.BackgroundColor = currentBackground;
|
||||||
|
|
||||||
if (fg >= 0) Console.Write(AnsiForegroundSequences[fg] + "\t");
|
Console.Write(fg == 0 ? AnsiDefaultFg : AnsiForegroundSequences[fg - 1]);
|
||||||
|
Console.Write("\t");
|
||||||
|
|
||||||
if (fg == 0) Console.ForegroundColor = currentForeground;
|
if (fg == 0) Console.ForegroundColor = currentForeground;
|
||||||
else Console.ForegroundColor = colors[Foregrounds[fg - 1]];
|
else Console.ForegroundColor = colors[TableColors[fg - 1]];
|
||||||
|
|
||||||
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg++)
|
for (int bg = 0; bg <= TableColors.Count; bg += 1 + Convert.ToUInt16(compact))
|
||||||
{
|
{
|
||||||
if (bg > 0) Console.Write(" ");
|
if (bg > 0) Console.Write(" ");
|
||||||
if (bg == 0)
|
if (bg == 0)
|
||||||
Console.BackgroundColor = currentBackground;
|
Console.BackgroundColor = currentBackground;
|
||||||
else Console.BackgroundColor = colors[Backgrounds[bg - 1]];
|
else Console.BackgroundColor = colors[TableColors[bg - (1 + Convert.ToUInt16(compact))]];
|
||||||
Console.Write(TestText);
|
Console.Write(TestText);
|
||||||
Console.BackgroundColor = currentBackground;
|
Console.BackgroundColor = currentBackground;
|
||||||
}
|
}
|
||||||
@ -146,50 +148,41 @@ namespace ColorTool
|
|||||||
Console.BackgroundColor = currentBackground;
|
Console.BackgroundColor = currentBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintTableWithVt()
|
public static void PrintTableWithVt(bool compact)
|
||||||
{
|
{
|
||||||
Console.Write("\t");
|
string TestText = compact ? " gYw " : " gYw ";
|
||||||
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg++)
|
// first column
|
||||||
|
Console.Write("\t ");
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(AnsiDefaultBg);
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(" ");
|
||||||
|
|
||||||
|
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg += 1 + Convert.ToUInt16(compact))
|
||||||
{
|
{
|
||||||
if (bg > 0) Console.Write(" ");
|
|
||||||
Console.Write(" ");
|
|
||||||
Console.Write(bg == 0 ? " " : AnsiBackgroundSequences[bg]);
|
|
||||||
Console.Write(" ");
|
Console.Write(" ");
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
Console.Write(AnsiBackgroundSequences[bg]);
|
||||||
|
if (compact) Console.Write(" ");
|
||||||
|
if (AnsiBackgroundSequences[bg].Length == 3) Console.Write(" ");
|
||||||
}
|
}
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
|
|
||||||
for (int fg = 0; fg < AnsiForegroundSequences.Count; fg++)
|
for (int fg = 0; fg <= AnsiForegroundSequences.Count; fg++)
|
||||||
{
|
{
|
||||||
Console.Write("\x1b[m");
|
Console.Write("\x1b[m");
|
||||||
|
|
||||||
if (fg >= 0)
|
Console.Write(fg == 0 ? AnsiDefaultFg : AnsiForegroundSequences[fg - 1]);
|
||||||
{
|
Console.Write("\t");
|
||||||
Console.Write(AnsiForegroundSequences[fg] + "\t");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fg == 0)
|
if (fg == 0) Console.Write("\x1b[" + AnsiDefaultFg);
|
||||||
{
|
else Console.Write("\x1b[" + AnsiForegroundSequences[fg - 1]);
|
||||||
Console.Write("\x1b[39m");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.Write("\x1b[" + AnsiForegroundSequences[fg]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int bg = 0; bg < AnsiBackgroundSequences.Count; bg++)
|
for (int bg = 0; bg <= AnsiBackgroundSequences.Count; bg += 1 + Convert.ToUInt16(compact))
|
||||||
{
|
{
|
||||||
if (bg > 0)
|
if (bg != 0) Console.Write(" ");
|
||||||
{
|
if (bg == 0) Console.Write("\x1b[" + AnsiDefaultBg);
|
||||||
Console.Write(" ");
|
else Console.Write("\x1b[" + AnsiBackgroundSequences[bg - (1 + Convert.ToUInt16(compact))]);
|
||||||
}
|
|
||||||
if (bg == 0)
|
|
||||||
{
|
|
||||||
Console.Write("\x1b[49m");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.Write("\x1b[" + AnsiBackgroundSequences[bg]);
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.Write(TestText);
|
Console.Write(TestText);
|
||||||
Console.Write("\x1b[49m");
|
Console.Write("\x1b[49m");
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class CurrentConsoleTarget : IConsoleTarget
|
class CurrentConsoleTarget : IConsoleTarget
|
||||||
{
|
{
|
||||||
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
|
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode, bool compactColortable)
|
||||||
{
|
{
|
||||||
CONSOLE_SCREEN_BUFFER_INFO_EX csbiex = CONSOLE_SCREEN_BUFFER_INFO_EX.Create();
|
CONSOLE_SCREEN_BUFFER_INFO_EX csbiex = CONSOLE_SCREEN_BUFFER_INFO_EX.Create();
|
||||||
IntPtr hOut = GetStdOutputHandle();
|
IntPtr hOut = GetStdOutputHandle();
|
||||||
@ -40,7 +40,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
|
|
||||||
if (!quietMode)
|
if (!quietMode)
|
||||||
{
|
{
|
||||||
ColorTable.PrintTable();
|
ColorTable.PrintTable(compactColortable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class DefaultConsoleTarget : IConsoleTarget
|
class DefaultConsoleTarget : IConsoleTarget
|
||||||
{
|
{
|
||||||
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
|
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode, bool compactColortable)
|
||||||
{
|
{
|
||||||
RegistryKey consoleKey = Registry.CurrentUser.OpenSubKey("Console", true);
|
RegistryKey consoleKey = Registry.CurrentUser.OpenSubKey("Console", true);
|
||||||
for (int i = 0; i < colorScheme.ColorTable.Length; i++)
|
for (int i = 0; i < colorScheme.ColorTable.Length; i++)
|
||||||
|
|||||||
@ -10,6 +10,6 @@ namespace ColorTool.ConsoleTargets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
interface IConsoleTarget
|
interface IConsoleTarget
|
||||||
{
|
{
|
||||||
void ApplyColorScheme(ColorScheme colorScheme, bool quietMode);
|
void ApplyColorScheme(ColorScheme colorScheme, bool quietMode, bool compactColortable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
{
|
{
|
||||||
class TerminalSchemeConsoleTarget : IConsoleTarget
|
class TerminalSchemeConsoleTarget : IConsoleTarget
|
||||||
{
|
{
|
||||||
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
|
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode, bool compactColortable)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Copy and paste the following text into the schemes array of your Windows Terminal settings.json file to add this color scheme. (Don't forget to add a comma separator after the previous scheme.)");
|
Console.WriteLine("Copy and paste the following text into the schemes array of your Windows Terminal settings.json file to add this color scheme. (Don't forget to add a comma separator after the previous scheme.)");
|
||||||
Console.WriteLine("{");
|
Console.WriteLine("{");
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
8+7, // Bright White
|
8+7, // Bright White
|
||||||
};
|
};
|
||||||
|
|
||||||
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
|
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode, bool compactColortable)
|
||||||
{
|
{
|
||||||
Program.DoInVTMode(() =>
|
Program.DoInVTMode(() =>
|
||||||
{
|
{
|
||||||
@ -58,7 +58,6 @@ namespace ColorTool.ConsoleTargets
|
|||||||
string s = $"\x1b]12;rgb:{color.R:X2}/{color.G:X2}/{color.B:X2}\x1b\\";
|
string s = $"\x1b]12;rgb:{color.R:X2}/{color.G:X2}/{color.B:X2}\x1b\\";
|
||||||
Console.Write(s);
|
Console.Write(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < colorScheme.ColorTable.Length; i++)
|
for (int i = 0; i < colorScheme.ColorTable.Length; i++)
|
||||||
{
|
{
|
||||||
int vtIndex = VirtualTerminalIndices[i];
|
int vtIndex = VirtualTerminalIndices[i];
|
||||||
@ -69,7 +68,7 @@ namespace ColorTool.ConsoleTargets
|
|||||||
|
|
||||||
if (!quietMode)
|
if (!quietMode)
|
||||||
{
|
{
|
||||||
ColorTable.PrintTableWithVt();
|
ColorTable.PrintTableWithVt(compactColortable);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using ColorTool.ConsoleTargets;
|
using ColorTool.ConsoleTargets;
|
||||||
using ColorTool.SchemeWriters;
|
|
||||||
using static ColorTool.ConsoleAPI;
|
using static ColorTool.ConsoleAPI;
|
||||||
|
using ColorTool.SchemeWriters;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -20,6 +20,8 @@ namespace ColorTool
|
|||||||
private static bool setProperties = true;
|
private static bool setProperties = true;
|
||||||
private static bool setUnixStyle = false;
|
private static bool setUnixStyle = false;
|
||||||
private static bool setTerminalStyle = false;
|
private static bool setTerminalStyle = false;
|
||||||
|
private static bool compactTableStyle = true;
|
||||||
|
private static bool printCurrent = false;
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
@ -39,8 +41,8 @@ namespace ColorTool
|
|||||||
return;
|
return;
|
||||||
case "-c":
|
case "-c":
|
||||||
case "--current":
|
case "--current":
|
||||||
ColorTable.PrintTable();
|
printCurrent = true;
|
||||||
return;
|
break;
|
||||||
case "-l":
|
case "-l":
|
||||||
case "--location":
|
case "--location":
|
||||||
SchemeManager.PrintSchemesDirectory();
|
SchemeManager.PrintSchemesDirectory();
|
||||||
@ -66,36 +68,46 @@ namespace ColorTool
|
|||||||
return;
|
return;
|
||||||
case "-e":
|
case "-e":
|
||||||
case "--errors":
|
case "--errors":
|
||||||
reportErrors = true;
|
reportErrors = true;
|
||||||
break;
|
break;
|
||||||
case "-q":
|
case "-q":
|
||||||
case "--quiet":
|
case "--quiet":
|
||||||
quietMode = true;
|
quietMode = true;
|
||||||
break;
|
break;
|
||||||
case "-d":
|
case "-d":
|
||||||
case "--defaults":
|
case "--defaults":
|
||||||
setDefaults = true;
|
setDefaults = true;
|
||||||
setProperties = false;
|
setProperties = false;
|
||||||
break;
|
break;
|
||||||
case "-b":
|
case "-b":
|
||||||
case "--both":
|
case "--both":
|
||||||
setDefaults = true;
|
setDefaults = true;
|
||||||
setProperties = true;
|
setProperties = true;
|
||||||
break;
|
break;
|
||||||
case "-x":
|
case "-x":
|
||||||
case "--xterm":
|
case "--xterm":
|
||||||
setUnixStyle = true;
|
setUnixStyle = true;
|
||||||
setProperties = true;
|
setProperties = true;
|
||||||
|
break;
|
||||||
|
case "-a":
|
||||||
|
case "--allcolors":
|
||||||
|
compactTableStyle = false;
|
||||||
break;
|
break;
|
||||||
case "-t":
|
case "-t":
|
||||||
case "--terminal":
|
case "--terminal":
|
||||||
setTerminalStyle = true;
|
setTerminalStyle = true;
|
||||||
setProperties = true;
|
setProperties = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (printCurrent)
|
||||||
|
{
|
||||||
|
if (setUnixStyle) DoInVTMode(() => ColorTable.PrintTableWithVt(compactTableStyle));
|
||||||
|
else ColorTable.PrintTable(compactTableStyle);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
string schemeName = args[args.Length - 1];
|
string schemeName = args[args.Length - 1];
|
||||||
|
|
||||||
@ -109,7 +121,7 @@ namespace ColorTool
|
|||||||
|
|
||||||
foreach (var target in GetConsoleTargets())
|
foreach (var target in GetConsoleTargets())
|
||||||
{
|
{
|
||||||
target.ApplyColorScheme(colorScheme, quietMode);
|
target.ApplyColorScheme(colorScheme, quietMode, compactTableStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
@ -121,8 +121,8 @@
|
|||||||
<value>Error loading ini file "{0}"</value>
|
<value>Error loading ini file "{0}"</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IniParseError" xml:space="preserve">
|
<data name="IniParseError" xml:space="preserve">
|
||||||
<value>Error loading ini file "{0}"
|
<value>Error loading ini file "{0}"
|
||||||
for key "{1}"
|
for key "{1}"
|
||||||
the value "{2}" is invalid</value>
|
the value "{2}" is invalid</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="InvalidColor" xml:space="preserve">
|
<data name="InvalidColor" xml:space="preserve">
|
||||||
@ -160,7 +160,7 @@ Parameters:
|
|||||||
Functions:
|
Functions:
|
||||||
You may specify only one of the following switches each time you invoke ColorTool. Any additional switches
|
You may specify only one of the following switches each time you invoke ColorTool. Any additional switches
|
||||||
before or after the first one of them will be ignored.
|
before or after the first one of them will be ignored.
|
||||||
|
|
||||||
-?, --help : Display this help message
|
-?, --help : Display this help message
|
||||||
-c, --current : Print the color table for the currently applied scheme
|
-c, --current : Print the color table for the currently applied scheme
|
||||||
-v, --version : Display the version number
|
-v, --version : Display the version number
|
||||||
@ -180,11 +180,11 @@ Options:
|
|||||||
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
||||||
Only works in Windows versions >= 17048.
|
Only works in Windows versions >= 17048.
|
||||||
-t, --terminal : Output the colors in JSON format for copying into a Windows Terminal settings file.
|
-t, --terminal : Output the colors in JSON format for copying into a Windows Terminal settings file.
|
||||||
|
-a, --allcolors: Output extended color table. best for >110 column terminals
|
||||||
Available importers:
|
Available importers:
|
||||||
{0}</value>
|
{0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WroteToDefaults" xml:space="preserve">
|
<data name="WroteToDefaults" xml:space="preserve">
|
||||||
<value>Wrote selected scheme to the defaults.</value>
|
<value>Wrote selected scheme to the defaults.</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@ -45,6 +45,7 @@ Options:
|
|||||||
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
||||||
Only works in Windows versions >= 17048.
|
Only works in Windows versions >= 17048.
|
||||||
-t, --terminal : Output the colors in JSON format for copying into a Windows Terminal settings file.
|
-t, --terminal : Output the colors in JSON format for copying into a Windows Terminal settings file.
|
||||||
|
-a, --allcolors: Output extended color table. best for >110 column terminals
|
||||||
```
|
```
|
||||||
|
|
||||||
## Included Schemes
|
## Included Schemes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user