shell/color.go

30 lines
757 B
Go

package shell
import (
"fmt"
)
func get_terminal_color_palette() string {
// var runes rune
// color1 := "\x1b[0;29m  \x1b[0m"
// runes = []rune(color1)
// view.WriteRunes(runes)
color1 := "\x1b[0;29m  \x1b[0m"
color2 := "\x1b[0;31m  \x1b[0m"
color3 := "\x1b[0;32m  \x1b[0m"
color4 := "\x1b[0;33m  \x1b[0m"
color5 := "\x1b[0;34m  \x1b[0m"
color6 := "\x1b[0;35m  \x1b[0m"
color7 := "\x1b[0;36m  \x1b[0m"
color8 := "\x1b[0;37m  \x1b[0m"
return color1 + " " + color2 + " " + color3 + " " + color4 + " " + color5 + " " + color6 + " " + color7 + " " + color8
}
// what genius figured this out?
// originally from github.com/dimasma0305/GoFetch
func TestTerminalColor() {
fmt.Println(get_terminal_color_palette())
}