private void ApplyColorChanges(NativeMethods.CONSOLE_SCREEN_BUFFER_INFO_EX csbe) { // strange, needs to be done because window is shrunken somehow ++csbe.srWindow.Bottom; ++csbe.srWindow.Right; bool brc = NativeMethods.SetConsoleScreenBufferInfoEx(HConsoleOutput, ref csbe); if (!brc) { throw new SystemException("SetConsoleScreenBufferInfoEx->WinError: #" + Marshal.GetLastWin32Error()); } // TODO: build scheme this._closeColorFinder = new ColorBalancer(ColorScheme.FromDefinition("from system", this.GetCurrentColorset()), new GruchenDefaultColorHeuristic()); }