Skip to content

Commit

Permalink
feat: add color fade example (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
floaust committed Oct 11, 2020
1 parent d2e1df0 commit cd26981
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions _examples/print-color-fade/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import (
"github.com/pterm/pterm"
)

func main() {
from := pterm.NewRGB(255, 0, 0)
to := pterm.NewRGB(0, 255, 0)
for i := 0; i < pterm.GetTerminalHeight(); i++ {
from.Fade(0, float32(pterm.GetTerminalHeight()), float32(i), to).Println("Hello, World!")
}
}

0 comments on commit cd26981

Please sign in to comment.