request to change xterm colours for CI build trace for better readability and accentuation of BOLD
preface
For the runner trace, there is certainly some room for improvement in terms of colours, albeit per today only a few ansi colours are used for the trace and the script output has no support yet for ANSI-colours in the trace, but that doesn't mean there is no room for improvement or for other runners to use the ANSI basic colours.
One could argue to use custom colours, but as per #37843, there is no way to get a bold custom colour besides BOLD white.
Furthermore, the general public hasn't seen the the defined colours yet besides the basic 3 colours used by the runner today.
status per today:
-
For runner commands and actions : bold green is used -> css-class:
xterm-fg-l-green
. -
For success, the same bold green as above, that looks more yellow then green and that doesn't really reflect the feeling of
Success
for a build. -
For failure, bold red -> css-class:
xterm-fg-l-red
,a bit watered down red, that doesn't reflect failure. -
For script output, white -> css-class:
xterm-fg-white
.
The colours are defined in app/assets/stylesheets/pages/xterm.scss
and for the basic ansi colours it looks like this:
concerns
where these to be used more generally, I would have the following concerns:
- bold green looks more yellow then green, and would not really reflect a SUCCESS
- bold yellow looks more orange then yellow (certainly not fit to be used to show the commands and actions of a runner)
- blue is not readable on a black background and we have a black backgroud see remark in xterm SCSS
- bold blue is more grey
- red is badly readable on a black background
- bold red is to watered down to catch the eye as a major problem
- bold white is darker then white
Overall these colours are not really matching any colours used within gitlab nor do the bold colours reflect the basic colours.
Proposal
after carefully consideration and understanding that using the ANSI standard highlight colors are to bright to use for BOLD colours I would propose to change the ANSI basic colours:
concerned code
original app/assets/stylesheets/pages/xterm.scss
$red: #cd0000;
$blue: #00e; // according to wikipedia, this is the xterm standard
//$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile)
$cyan: #00cdcd;
$l-red: #c66;
$l-green: #b5bd68;
$l-yellow: #f0c674;
$l-blue: #81a2be;
$l-magenta: #b294bb;
$l-cyan: #8abeb7;
$l-white: $gray-darkest; // gray-darkest: #c4c4c4; ( per https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/stylesheets/framework/variables.scss )
Proposed code for changed colours:
$red: #f03737;
$blue: #1e90ff;
$cyan: #00c0c0;
$l-red: #ff4040;
$l-green: #20d020;
$l-yellow: #d0d030;
$l-blue: #2ea0ff;
$l-magenta: #b040b0;
$l-cyan: #40cdcd;
$l-white: #eaeaea;
Consequences of the change
The gitlab-runner trace for commands and actions that now look yellow will look green since ANSI Bold green is used to have it look yellow....
benifits
a base ANSI colour set for trace output that allows more use of it and forms the base for improvements for the runner colours.
example outputs
in progress