From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756028AbbCEOTh (ORCPT ); Thu, 5 Mar 2015 09:19:37 -0500 Received: from casper.infradead.org ([85.118.1.10]:39093 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752197AbbCEOTf (ORCPT ); Thu, 5 Mar 2015 09:19:35 -0500 Date: Thu, 5 Mar 2015 11:19:29 -0300 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Borislav Petkov , Jiri Olsa , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf/tui: Change default selection background color to yellow Message-ID: <20150305141929.GS5187@kernel.org> References: <20150305103213.GA23046@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305103213.GA23046@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Mar 05, 2015 at 11:32:13AM +0100, Ingo Molnar escreveu: > Boris reported that 'perf top' is unusable on his default 'black on > white' terminal, which uses (eye friendly) light-grey as a background > color. > > The reason is that the TUI cursor for the current selection line uses > HE_COLORSET_SELECTED, and that has a default background color of > 'lightgrey' - which is a common terminal background choice and thus > the colors conflict. > > Use yellow as the background color instead: that should be an uncommon > terminal background, yet it's still ergonomic on both black and > white/grey terminals. > > [ It would be a better solution to straight out detect color > collisions and resolve them reasonably by converting them to RGB and > calculating color space distances, but I was unable to find > proper documentation for SLtt_get_color_object() to recover the > current color scheme so I gave up ... Yellow works well enough. ] Thanks, applying. BTW, I started with newt, thinking it would give me good widgets, only to, after having reached its limitations write my own, this time just on, like newt, top of slang's tui libraries, eventually I think I'll move to ncurses or even just use the kernel tty interface directly ;-) - Arnaldo