Skip to content
0xf0xx0Public

About

fast ansi color tagging lib, inspired by blessed from node

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oigiki

Go Reference

fast ansi color tagging lib, inspired by blessed from node
extracted from axefetch and improved

features

  • NO_COLOR support
  • all 16 colors (normal + bright)
  • 256color (as index, 0-255)
  • truecolor (as rrrggbb hex)

usage

/// coloring will run until overridden
/// chaining works too uwu
oigiki.ProcessTags("{red}red{green}green{/green}red") /// "\x1b[31mred\x1b[32mgreen\x1b[31mred\x1b[0m"
/// unknown tags are ignored
oigiki.ProcessTags("{red}red {totallyrealcolor}still red") /// "\x1b[31mred {totallyrealcolor}still red\x1b[0m"

oigiki.TagString("this should be red", "red") /// "{red}this should be red"
oigiki.StripTags("{red}{bold}whos that {bg#f100f1}{underline}knockin{/underline} at my door?") /// whos that knockin at my door?

256color

"{bg0}{7}yin{bg7}{0}yang"

truecolor

/// hex must be the full rrggbb
"{#ff00ff}ff00ff"
/// bg is easy too
"{bg#ff00ff}{black}ff00ff"

About

fast ansi color tagging lib, inspired by blessed from node

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages