|
| 1 | +package main |
| 2 | + |
| 3 | +import ( |
| 4 | + "fmt" |
| 5 | + |
| 6 | + "github.com/morikuni/aec" |
| 7 | +) |
| 8 | + |
| 9 | +func main() { |
| 10 | + fmt.Printf("%13s %s\n", "black", aec.BlackB.Apply(" ")) |
| 11 | + fmt.Printf("%13s %s\n", "red", aec.RedB.Apply(" ")) |
| 12 | + fmt.Printf("%13s %s\n", "green", aec.GreenB.Apply(" ")) |
| 13 | + fmt.Printf("%13s %s\n", "yellow", aec.YellowB.Apply(" ")) |
| 14 | + fmt.Printf("%13s %s\n", "blue", aec.BlueB.Apply(" ")) |
| 15 | + fmt.Printf("%13s %s\n", "magenta", aec.MagentaB.Apply(" ")) |
| 16 | + fmt.Printf("%13s %s\n", "cyan", aec.CyanB.Apply(" ")) |
| 17 | + fmt.Printf("%13s %s\n", "white", aec.WhiteB.Apply(" ")) |
| 18 | + fmt.Println() |
| 19 | + |
| 20 | + fmt.Printf("%13s %s\n", "light-black", aec.LightBlackB.Apply(" ")) |
| 21 | + fmt.Printf("%13s %s\n", "light-red", aec.LightRedB.Apply(" ")) |
| 22 | + fmt.Printf("%13s %s\n", "light-green", aec.LightGreenB.Apply(" ")) |
| 23 | + fmt.Printf("%13s %s\n", "light-yellow", aec.LightYellowB.Apply(" ")) |
| 24 | + fmt.Printf("%13s %s\n", "light-blue", aec.LightBlueB.Apply(" ")) |
| 25 | + fmt.Printf("%13s %s\n", "light-magenta", aec.LightMagentaB.Apply(" ")) |
| 26 | + fmt.Printf("%13s %s\n", "light-cyan", aec.LightCyanB.Apply(" ")) |
| 27 | + fmt.Printf("%13s %s\n", "light-white", aec.LightWhiteB.Apply(" ")) |
| 28 | + fmt.Println() |
| 29 | + |
| 30 | + for r := uint8(0); r < 6; r++ { |
| 31 | + for g := uint8(0); g < 6; g++ { |
| 32 | + for b := uint8(0); b < 6; b++ { |
| 33 | + ansi := aec.Color8BitB(aec.NewRGB8Bit(r*43, g*43, b*43)) |
| 34 | + fmt.Printf("%02x-%02x-%02x %s ", r*43, g*43, b*43, ansi.Apply(" ")) |
| 35 | + } |
| 36 | + fmt.Println() |
| 37 | + } |
| 38 | + fmt.Println() |
| 39 | + } |
| 40 | + |
| 41 | + fmt.Println(aec.Bold.Apply("bold")) |
| 42 | + fmt.Println(aec.Faint.Apply("faint")) |
| 43 | + fmt.Println(aec.Italic.Apply("italic")) |
| 44 | + fmt.Println(aec.Underline.Apply("underline")) |
| 45 | + fmt.Println(aec.BlinkSlow.Apply("blink-slow")) |
| 46 | + fmt.Println(aec.BlinkRapid.Apply("blink-rapid")) |
| 47 | + fmt.Println(aec.Inverse.Apply("inverse")) |
| 48 | + fmt.Println(aec.Conceal.Apply("conceal")) |
| 49 | + fmt.Println(aec.CrossOut.Apply("cross-out")) |
| 50 | + fmt.Println(aec.Frame.Apply("frame")) |
| 51 | + fmt.Println(aec.Encircle.Apply("encircle")) |
| 52 | + fmt.Println(aec.Overline.Apply("overline")) |
| 53 | +} |
0 commit comments