Colour in concourse web



Part of our pipeline uses Maven to build our Java SDK and run some tests on it. Maven is somehow able to colourise its output, like so;


I am trying to colourise the output of another task, but I am unable to get this to work (I tried to attach a screenshot, but apparently I can only attach one image).

Here’s what I’m trying:

platform: linux
    type: docker-image
      repository: alpine
    path: /bin/sh
      - -c
      - |
        echo '\033[0;31m'"Hello, world!"'\033[0m'

And many other variants of this. Does anyone have any idea how I might get this to work?



try using printf instead of echo:

printf "\e[31mHello, World!\e[0m\n"


Hi rob, thanks for your reply.

Unfortunately, printf doesn’t work either.

EDIT: I am mistaken. I could have been sure I’d tried printf previously, but I gave that a go, and it works. Next question is why it doesn’t work in dotnet…

Regardless, echoing out colour escape codes isn’t really where I’m seeing the problem (this only reproduces it) - the actual tool that should be colourising its output is a dotnet core program (and it does colourise as intended in a terminal).

I suspect the CLR is determining the terminal type and eliding the colour output…



Updated - it turns out I was being stupid.


Ok, I seem to have it working now.

All I had to do was to add

export TERM="xterm-256color"

before I ran my tool.