Skip to content

abiriadev/iris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRIS: a low-level ANSI color manipulation library

Principles

  1. Do NOT implement rare standards (such as fraktur and blink support).
  2. Favor explicit over convenient naming, e.g., use RedFg instead of Red.
  3. Do NOT predefine every possible color or famous color sets (like CSS, Xterm). Assume only dynamic color usage.
  4. Trust the developers. Provide unsafe methods which might cause unexpected behavior if not used with proper guarantees.
  5. Allow partial styling without auto-reset. Allow developers to decide when to close styling.

Demo

Try these examples in your terminal!

$ git clone https://github.com/abiriadev/iris && cd iris

Gradient

$ go run ./examples/gradient

XOR fractal

$ go run ./examples/xor

IRIScat

lolcat implementation with IRIS.

$ figlet 'IRIScat: like lolcat but with IRIS' | cowsay -n | go run ./examples/iriscat

Releases

No releases published

Packages

No packages published

Languages