package main
import (
"github.com/pterm/pterm"
)
func main() {
// Print info.
pterm.Info.Println("RGB colors only work in Terminals which support TrueColor.")
from := pterm.NewRGB(0, 255, 255) // This RGB value is used as the gradients start point.
to := pterm.NewRGB(255, 0, 255) // This RGB value is used as the gradients end point.
// For loop over the range of the terminal height.
for i := 0; i < pterm.GetTerminalHeight()-2; i++ {
// Print string which is colored with the faded RGB value.
from.Fade(0, float32(pterm.GetTerminalHeight()-2), float32(i), to).Println("Hello, World!")
}
}