X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 23 Apr 2010 12:35:15 +0100 Received: by 10.239.191.206 with SMTP id c14mr1002141hbi.65.1272022515243; Fri, 23 Apr 2010 04:35:15 -0700 (PDT) Message-ID: Subject: Re: Is 256 colors possible with cmd.exe? From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Alex Leigh: > So my question is, is it possible to get 256 colors > with Cygwin running on top of cmd.exe? As Corinna already said: nope. Windows represents console colours with only four bits: red, green, blue, bright: http://msdn.microsoft.com/en-us/library/ms682013%28v=VS.85%29.aspx Only thing you can do is change the resulting 16 colours in the console properties. (A bit of pedantry: Cygwin programs don't run on top of cmd.exe; they run in console windows. On Windows 7 those are managed by conhost.exe. Cmd.exe is just another program that runs in a console window.) > If this is not possible, then does anyone have any advice on ways to > have compatibility with both Unix terminal features including 256 > color and Windows console programs within a single terminal app? The > only solution of this sort I've found is conin.exe from the developers > of mintty. It does provide half the solution in that it allows input > to be piped from mintty to Windows console programs, but unfortunately > it's not possible to see the output from those programs. Conin isn't quite that useless. It works ok for programs that only depend on stdin being a console, e.g. python, scala, and cmd.exe, although there are quirks. With others such as the mysql client, output does work, but you don't get a prompt because it checks whether both stdin and stdout are consoles to decide whether to enter interactive mode. Output will fail completely though when programs use console-specific output functions, in particular WriteConsole and WriteConsoleOutput. Which programs are the problem cases for you? Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple