A simple package to convert hex colors to ANSI256.
go get github.com/aboxofsox/iris
package main
import (
"fmt"
"github.com/aboxofsox/iris"
)
func main() {
text := iris.SetColor("hello world", "#010101", "#FF0000")
fmt.Println(text)
} package main
import (
"fmt"
"github.com/aboxofsox/iris"
)
func main() {
text := iris.SetFgColor("hello world", "#FF000")
fmt.Println(text)
}package main
import (
"fmt"
"github.com/aboxofsox/iris"
)
func main() {
text := iris.SetBgColor("hello world" "#FF0000")
}package main
import (
"fmt"
"github.com/aboxofsox/iris"
)
func main() {
text := iris.SetHex("hello world", "#FF0000")
stripped := iris.Strip(text)
fmt.Println(text, stripped)
}