1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
### bigtext/demo

<details>
<summary>SHOW SOURCE</summary>
```go
package main
import (
"github.com/pterm/pterm"
"github.com/pterm/pterm/putils"
)
func main() {
// Create a large text with the LetterStyle from the standard theme.
// This is useful for creating title screens.
pterm.DefaultBigText.WithLetters(putils.LettersFromString("PTerm")).Render()
// Create a large text with differently colored letters.
// Here, the first letter 'P' is colored cyan and the rest 'Term' is colored light magenta.
// This can be used to highlight specific parts of the text.
pterm.DefaultBigText.WithLetters(
putils.LettersFromStringWithStyle("P", pterm.FgCyan.ToStyle()),
putils.LettersFromStringWithStyle("Term", pterm.FgLightMagenta.ToStyle()),
).Render()
// Create a large text with a specific RGB color.
// This can be used when you need a specific color that is not available in the standard colors.
// Here, the color is gold (RGB: 255, 215, 0).
pterm.DefaultBigText.WithLetters(
putils.LettersFromStringWithRGB("PTerm", pterm.NewRGB(255, 215, 0)),
).Render()
}
```
</details>
### bigtext/colored

<details>
<summary>SHOW SOURCE</summary>
```go
package main
import (
"github.com/pterm/pterm"
"github.com/pterm/pterm/putils"
)
func main() {
// Initialize a big text display with the letters "P" and "Term"
// "P" is displayed in cyan and "Term" is displayed in light magenta
pterm.DefaultBigText.WithLetters(
putils.LettersFromStringWithStyle("P", pterm.FgCyan.ToStyle()),
putils.LettersFromStringWithStyle("Term", pterm.FgLightMagenta.ToStyle())).
Render() // Render the big text to the terminal
}
```
</details>
### bigtext/default

<details>
<summary>SHOW SOURCE</summary>
```go
package main
import (
"github.com/pterm/pterm"
"github.com/pterm/pterm/putils"
)
func main() {
// Define the text to be rendered
var text = "PTerm"
// Convert the text into a format suitable for PTerm
var letters = putils.LettersFromString(text)
// Render the text using PTerm's default big text style
pterm.DefaultBigText.WithLetters(letters).Render()
}
```
</details>
|