Ansi is an easy to use library for easier text formatting with ANSI Escape Sequences by providing the required methods, while keeping the API lightweight and logical. Its written in and for Java. Despite being in an early stage, it already saves a lot of work and implementation. If you want to help me improve this library further, feel free to open Issues, fork this Project for your own use or post questions as well as answers to already existing questions.
Do you have some questions about this library that are not covered by the wiki, or want to help improving it? Feel free to join us on our Discord Server.
is pretty straight forward. Just grab the jar file and add it to your projects dependencies, or use one of the following build tools.
add the following line to your dependencies:
implementation 'dev.thatsnasu:Ansi:1.1.1'
it would be:
<dependency>
<groupId>dev.thatsnasu</groupId>
<artifactId>Ansi</artifactId>
<version>1.1.1</version>
</dependency>
Visit maven central and pick the release you like to find the code you need.
- Predefined, ready to use Colors and Formats
- Combining Colors and Formats as you like
- Storing Color and Format-presets for reuse
Check out the Getting started section.
Writing several Java Programs, i noticed that i often reuse my own code from Project to Project, namely logging mechanisms and Colorization with ANSI Escape Sequences. Memorizing this Sequences is hard, using a library with an easy to use API for it isn't. Refurbishing Code will do once in a while, but on the long run its hard to maintain across multiple projects, so i started developing this library to have to change only one part of the code and on the same time give others the opportunity to use it aswell.
- netcode, for helping me on questions, problems, sorting my head, finding better solutions and overall helping me improving my code.
- the creator of name that color. I retrieved most of the color names with this tool.