# Allowed color patterns.
color "#0F0" "Line in \"lime\" color."
color "#dc143c" "Line in \"crimson\" color."
# Not allowed.
color "#dc14" "Not allowed pattern."
color "Text only."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Main constants and functions | |
const val RC = "\u001b[0m" // Reset foreground and background colors. --> $RC | |
const val R = "\u001b[7m" // Invert foreground to background. --> $R | |
const val U = "\u001b[4m" // Underline. --> $U | |
const val B = "\u001b[1m" // Bold. --> $B | |
const val I = "\u001b[3m" // Italic. --> $I | |
const val S = "\u001b[9m" // Strikethrough the text. --> $S | |
// 256 Colors | |
fun fg(n:Int) = "\u001b[38;5;${n}m" // Set a foreground color. --> ${fg(40)} //Sets a green color. |