Merge branch 'master' into back-and-forground-index-export
This commit is contained in:
commit
c1e1f5124c
|
@ -76,7 +76,27 @@ namespace ColorTool
|
|||
var node = children.OfType<XmlNode>().Where(n => n.Name == name).Single();
|
||||
colorTable[i] = ParseColor(node.InnerText);
|
||||
}
|
||||
return new ColorScheme { colorTable = colorTable };
|
||||
|
||||
uint? screenForeground = null;
|
||||
uint? screenBackground = null;
|
||||
|
||||
var screenNode = children.OfType<XmlNode>().Where(n => n.Name == "screen_colors").SingleOrDefault();
|
||||
if (screenNode != null)
|
||||
{
|
||||
var parts = screenNode.InnerText.Split(',');
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
var foregroundIndex = (CONCFG_COLOR_NAMES as IList<string>).IndexOf(parts[0]);
|
||||
var backgroundIndex = (CONCFG_COLOR_NAMES as IList<string>).IndexOf(parts[1]);
|
||||
if (foregroundIndex != -1 && backgroundIndex != -1)
|
||||
{
|
||||
screenForeground = colorTable[foregroundIndex];
|
||||
screenBackground = colorTable[backgroundIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new ColorScheme { colorTable = colorTable, background = screenBackground, foreground = screenForeground };
|
||||
}
|
||||
catch (Exception /*e*/)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ Options:
|
|||
|
||||
## Adding Schemes
|
||||
|
||||
You can also add color schemes to the colortool easily. Take any existing scheme in `.itermcolors` format, and paste it in the `schemes/` directory.
|
||||
You can also add color schemes to the colortool easily. Take any existing scheme in `.itermcolors` format, and paste it in the `schemes/` directory. Or just cd into a directory containing `*.itermcolors` files before running the colortool.
|
||||
|
||||
I recommend the excellent [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) repo, which has TONS of schemes to choose from, and previews.
|
||||
|
||||
|
|
Loading…
Reference in a new issue