orewaee / krayon

A small library to help you work with console colors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

krayon

A small library written in Kotlin to help you with console colors.

Installation

The library uses the JitPack repository. By clicking on the link, you can choose the most convenient installation option.

Examples

// Direct color indication

println("Standard color".color(Color.GREEN))
println("Black on white background".color(Color.BLACK).color(Color.WHITE, Type.BG))

println("RGB supported".rgb(RGB(157, 78, 221)))

println("Hex is here too".hex("FFAC33"))
// String formatting

println(BOLD + "Bold")
println(ITALIC + "Italic")
println(UNDERLINE + "Underline")
// Get an ASCII color code as a string

val color = Krayon.code(Color.GREEN)
val hex = Krayon.code("FFAC33")
val rgb = Krayon.code(RGB(157, 78, 221))

About

A small library to help you work with console colors

License:MIT License


Languages

Language:Kotlin 100.0%