From: Ingo Molnar Date: Thu, 5 Mar 2015 10:32:13 +0000 (+0100) Subject: perf tui: Change default selection background color to yellow X-Git-Tag: v4.14-rc1~4090^2~23^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d7d377c2bea16afa6b600a4517615a9eebb259b;p=platform%2Fkernel%2Flinux-rpi.git perf tui: Change default selection background color to yellow 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 --- diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index e9703c0..d372021 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,