"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/iostreams/color.go" between
gh-cli-1.12.1.tar.gz and gh-cli-1.13.1.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

color.go  (gh-cli-1.12.1):color.go  (gh-cli-1.13.1)
package iostreams package iostreams
import ( import (
"fmt" "fmt"
"os" "os"
"strconv"
"strings" "strings"
"github.com/mgutz/ansi" "github.com/mgutz/ansi"
) )
var ( var (
magenta = ansi.ColorFunc("magenta") magenta = ansi.ColorFunc("magenta")
cyan = ansi.ColorFunc("cyan") cyan = ansi.ColorFunc("cyan")
red = ansi.ColorFunc("red") red = ansi.ColorFunc("red")
yellow = ansi.ColorFunc("yellow") yellow = ansi.ColorFunc("yellow")
skipping to change at line 205 skipping to change at line 206
case "blue": case "blue":
fn = c.Blue fn = c.Blue
default: default:
fn = func(s string) string { fn = func(s string) string {
return s return s
} }
} }
return fn return fn
} }
func (c *ColorScheme) HexToRGB(hex string, x string) string {
if !c.enabled || !c.is256enabled {
return x
}
r, _ := strconv.ParseInt(hex[0:2], 16, 64)
g, _ := strconv.ParseInt(hex[2:4], 16, 64)
b, _ := strconv.ParseInt(hex[4:6], 16, 64)
return fmt.Sprintf("\033[38;2;%d;%d;%dm%s\033[0m", r, g, b, x)
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)