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

asked 30 Dec '11, 14:23

zuse's gravatar image

zuse
251
accept rate: 0%


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;
link

answered 30 Dec '11, 14:47

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

edited 30 Dec '11, 14:47

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×6

Asked: 30 Dec '11, 14:23

Seen: 138 times

Last updated: 30 Dec '11, 14:47