ziggy42 / kolor

A library to print colored strings, with Kotlin.
Apache License 2.0
78 stars 7 forks source link
ansi-colors kotlin kotlin-library

kolor

Java CI Download
A library to print colored strings, with Kotlin.

Screenshot

Example

Foreground:

println("We all live in a yellow submarine".yellow())
// Or
println(Kolor.foreground("We all live in a yellow submarine", Color.YELLOW))

Background:

println("I'm blue da ba dee da ba daa".blueBackground())
// Or
println(Kolor.background("I'm blue da ba dee da ba daa", Color.BLUE))

Usage

Add jcenter:

repositories {
    jcenter()
}

Add dependency:

dependencies {
    implementation "com.andreapivetta.kolor:kolor:1.0.0"
}