public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/tui: Change default selection background color to yellow
@ 2015-03-05 10:32 Ingo Molnar
  2015-03-05 10:47 ` Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ingo Molnar @ 2015-03-05 10:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Borislav Petkov, Jiri Olsa, Peter Zijlstra, linux-kernel


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-by: Borislav Petkov <bp@alien8.de>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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 6680fa5cb9dd..688acb94c01f 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -499,7 +499,7 @@ static struct ui_browser_colorset {
 		.colorset = HE_COLORSET_SELECTED,
 		.name	  = "selected",
 		.fg	  = "black",
-		.bg	  = "lightgray",
+		.bg	  = "yellow",
 	},
 	{
 		.colorset = HE_COLORSET_CODE,

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-10  8:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 10:32 [PATCH] perf/tui: Change default selection background color to yellow Ingo Molnar
2015-03-05 10:47 ` Borislav Petkov
2015-03-05 14:19 ` Arnaldo Carvalho de Melo
2015-03-05 19:18   ` Ingo Molnar
2015-12-10  8:15 ` [tip:perf/core] perf tui: " tip-bot for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox