-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved
NewLettersFromStringWithRGB
to putils
- Loading branch information
1 parent
c29360d
commit d107216
Showing
4 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
package main | ||
|
||
import "github.com/pterm/pterm" | ||
import ( | ||
"github.com/pterm/pterm" | ||
"github.com/pterm/pterm/putils" | ||
) | ||
|
||
func main() { | ||
// Print a large text with the LetterStyle from the standard theme. | ||
// Useful for title screens. | ||
pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString("PTerm")).Render() | ||
pterm.DefaultBigText.WithLetters(putils.NewLettersFromString("PTerm")).Render() | ||
|
||
// Print a large text with differently colored letters. | ||
pterm.DefaultBigText.WithLetters( | ||
pterm.NewLettersFromStringWithStyle("P", pterm.NewStyle(pterm.FgCyan)), | ||
pterm.NewLettersFromStringWithStyle("Term", pterm.NewStyle(pterm.FgLightMagenta))). | ||
putils.NewLettersFromStringWithStyle("P", pterm.NewStyle(pterm.FgCyan)), | ||
putils.NewLettersFromStringWithStyle("Term", pterm.NewStyle(pterm.FgLightMagenta))). | ||
Render() | ||
|
||
// NewLettersFromStringWithRGB can be used to create a large text with a specific RGB color. | ||
pterm.DefaultBigText.WithLetters( | ||
pterm.NewLettersFromStringWithRGB("PTerm", pterm.NewRGB(255, 215, 0))). | ||
putils.NewLettersFromStringWithRGB("PTerm", pterm.NewRGB(255, 215, 0))). | ||
Render() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters