0 votes
by (120 points)
edited

Is it possible to have an negative color scheme. I am trying to set a white background, but other colors are gone when using Custom ColorScheme.

Thank

1 Answer

0 votes
by (147k points)
edited

You can define a custom palette that inverts the default colors, like this:

C#:

// declare a custom palette
var palette = new TerminalPalette();
for (int i = 0; i < 16; i++)
{
    Color c = palette.GetColor(i);
    c = Color.FromArgb(255 - c.R, 255 - c.G, 255 - c.B);
    palette.SetColor(i, c);
}

// assign the palette to TerminalControl object
terminalControl.Palette = palette;
...