How can I print a text on console with highlighted colour.
I found this link but this talks about printing text in colur and not highlighting it with another color.
Example:

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To switch on a yellow background (say), you need the escape sequence
Combine this with a black foreground to get what you want.
I’m getting the escape sequences from this Scala doc. Although it’s Scala doc it’s relevant and applicable in Java. The Jansi library should handle this. See the ‘background’ references in the
Ansiclass.