delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/09/16/00:45:44

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:references:to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=i7QVrT468qMllfXf
gT72w6ZKFkLc9cSP34/VnzKr27b19cHR+wBLhxnwNrbKIA+m16AjqDpaqbqjISYT
GveBiCsXrEzzYmDVIrBd8GSH8+L+ybxz7a1kNPhdTIrd4IbqXafmaElYqxmQLWPD
EHzTAKt3aSH7tH7K53YjlC+7AUQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:references:to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=2dxFvvo01CA58LFBGHGukh
tDrNc=; b=nDYEKjmYMzYkJtbsGgUeRbxFasOz4fDeHcO/lJ5s9//m/r6bmosNQ7
fhnLrxHn7eTulDi6cjZG/63jN0fs26hhiwkfslqId8sTJ+oIHAr7QUgg7qqaBrHx
Mzd0wZwVtlpvWKTtmZtDkTxYceR+nuBKJyWSGRPgC1FZiITfRAKlc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*RU:64.59.134.13, Hx-spam-relays-external:64.59.134.13, purple, inglis
X-HELO: smtp-out-no.shaw.ca
X-Authority-Analysis: v=2.2 cv=Qb8khYTv c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=HiWkEfo4AAAA:8 a=b4eMD0GmHX_ZvWjD-W0A:9 a=QEXdDO2ut3YA:10 a=OGSpAv-gN5wA:10 a=_QplDg0m8TGAdENQf2wZ:22
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: mintty shows some text in other than foreground color
References: <CAA5t8VoO0AEJ1in1pf+iZc6yKyfDSdKZjt-gNYkMMKtjf9-6xA AT mail DOT gmail DOT com>
To: cygwin AT cygwin DOT com
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <d127e93e-5922-bc01-d3ec-043169f58cc3@SystematicSw.ab.ca>
Date: Thu, 15 Sep 2016 22:45:05 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CAA5t8VoO0AEJ1in1pf+iZc6yKyfDSdKZjt-gNYkMMKtjf9-6xA@mail.gmail.com>
X-CMAE-Envelope: MS4wfDoLaZuea1SJYY61ZnenfnbhSkxyHFtT6OtcasLKTpKfBuEaK/UZ8vcryLEY21PEyVnB6tncN7fCC3pL9GjoIQ0DozrsTsEqsaMFSS1cf6+tSuiZZ0bz /I9p4B2nELcQ2BfhYIUaBU9dySDMwP4+Jga3jlhGb941hzni6eNGDBwATD+5ypDbhlQ69mFrpIjPig==
X-IsSubscribed: yes

On 2016-09-15 14:47, David Karr wrote:
> When I run mintty, the background is white, and normal text is black.
> This is fine.  However, there are some applications that are
> displaying text in other colors, many of which are fine, but some apps
> display some text in yellow, which on a white background is almost
> unreadable.
>
> For instance, the display from Cassandra's "cqlsh" shows the results
> of queries in black, purple (probably not quite right), and yellow.
> The worst part is, it's using yellow for the column values.
>
> Is there any way to control this, in general (obviously, not just for
> cqlsh output)?

See
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Controls

Normal ANSI escapes start with CSI 0x9b or \e[, these start with OSC 0x9d or \e],
and end with ST 0x9c or \e\\, or BEL ctrl-G, 0x07 or \a.

See Ps = 4 ; c ; spec → Change colour c to colour spec, a standard xterm RGB
colour word or hex code; the ; c ; spec sequences may be repeated as many times
as required before the ST, e.g. for up to 256 colours.
See also Ps = 10 default foreground colour and 11 default background colour
if you need to temporarily invert the default background and foreground colours,
e.g to display curl wttr.in[/CityName] in a normally white window background:

#!/bin/bash
# wttr.sh - ANSI colour text weather forecast for IP address or city
echo -ne '\e]10;white\e\\'
echo -ne '\e]11;black\e\\'
curl wttr.in
sleep 5
echo -ne '\e]10;black\e\\'
echo -ne '\e]11;white\e\\'

as the colours just don't work without the black background.
N.B. The OSC sequences do not appear to be supported by man or less.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019