Skip to content

Commit

Permalink
feat: use fallback color in BigTextPrinter when RGB is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Mar 18, 2022
1 parent 6e950d6 commit 0c60941
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bigtext_printer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package pterm

import (
"github.com/gookit/color"
"strings"

"github.com/mattn/go-runewidth"
Expand Down Expand Up @@ -141,7 +142,7 @@ func (p BigTextPrinter) Srender() (string, error) {
letterLine += strings.Repeat(" ", maxLetterWidth-letterLineLength)
}

if letter.RGB != (RGB{}) {
if letter.RGB != (RGB{}) && color.IsSupportRGBColor() {
ret += letter.RGB.Sprint(letterLine)
} else {
ret += letter.Style.Sprint(letterLine)
Expand Down

0 comments on commit 0c60941

Please sign in to comment.