You could do this using ANSI escape sequences. I've actually put together this class in Java for anyone that would like a simple workaround for this. It allows for more than just color codes.
https://gist.github.com/nathan-fiscaletti/9dc252d30b51df7d710a
(Ported from: https://github.com/nathan-fiscaletti/ansi-util)
Example Use:
StringBuilder sb = new StringBuilder();
System.out.println(
sb.raw("Hello, ")
.underline("John Doe")
.resetUnderline()
.raw(". ")
.raw("This is ")
.color16(StringBuilder.Color16.FG_RED, "red")
.raw(".")
);