How to print color in console using System.out.println?

后端 未结 13 2502
灰色年华
灰色年华 2020-11-22 05:22

How can I print color in console? I want to show data in colors when the processor sends data and in different colors when it receives data.

13条回答
  •  日久生厌
    2020-11-22 06:08

    I created a library called JColor that works on Linux, macOS, and Windows 10.

    It uses the ANSI codes mentioned by WhiteFang, but abstracts them using words instead of codes which is more intuitive. Recently I added support for 8 and 24 bit colors

提交回复
热议问题