From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753216AbbLIQzm (ORCPT ); Wed, 9 Dec 2015 11:55:42 -0500 Received: from casper.infradead.org ([85.118.1.10]:51543 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752244AbbLIQwE (ORCPT ); Wed, 9 Dec 2015 11:52:04 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, David Binderman , Jiri Olsa , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 01/11] perf tui: Change default selection background color to yellow Date: Wed, 9 Dec 2015 13:51:46 -0300 Message-Id: <1449679916-25311-2-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449679916-25311-1-git-send-email-acme@kernel.org> References: <1449679916-25311-1-git-send-email-acme@kernel.org> 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 From: Ingo Molnar 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. ] Reported-and-Tested-by: Borislav Petkov Signed-off-by: Ingo Molnar Tested-by: Arnaldo Carvalho de Melo Cc: David Binderman Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150305103213.GA23046@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index e9703c0829f1..d37202121689 100644 --- a/tools/perf/ui/browser.c +++ b/tools/perf/ui/browser.c @@ -528,7 +528,7 @@ static struct ui_browser_colorset { .colorset = HE_COLORSET_SELECTED, .name = "selected", .fg = "black", - .bg = "lightgray", + .bg = "yellow", }, { .colorset = HE_COLORSET_CODE, -- 2.1.0