Bump github.com/gookit/color from 1.6.0 to 1.6.1 (#5586)

Bumps [github.com/gookit/color](https://github.com/gookit/color) from
1.6.0 to 1.6.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gookit/color/releases">github.com/gookit/color's
releases</a>.</em></p>
<blockquote>
<h2>v1.6.1</h2>
<h2>Change Log</h2>
<h3>Fixed</h3>
<ul>
<li>fix: re-apply color after nested reset in RenderString (<a
href="https://redirect.github.com/gookit/color/issues/119">#119</a>) <a
href="https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b">https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b</a></li>
<li>fix(detect): should enable VTP on windows CMD,PWSH <a
href="https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992">https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992</a></li>
<li>fix(convert): incorrect conversion between integer types <a
href="https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e">https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e</a></li>
</ul>
<h3>Other</h3>
<ul>
<li>build(deps): bump github/codeql-action from 3 to 4 (<a
href="https://redirect.github.com/gookit/color/issues/113">#113</a>) <a
href="https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8">https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8</a></li>
<li>build(deps): bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/gookit/color/issues/115">#115</a>) <a
href="https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd">https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd</a></li>
<li>Add 'stable' to Go version matrix and update action <a
href="https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc">https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc</a></li>
<li>ci(release): remove Go version matrix and simplify build steps in
release action <a
href="https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae">https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae"><code>d232e11</code></a>
ci(release): remove Go version matrix and simplify build steps in
release action</li>
<li><a
href="https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e"><code>1245572</code></a>
fix(convert): incorrect conversion between integer types</li>
<li><a
href="https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992"><code>2bb27a5</code></a>
fix(detect): should enable VTP on windows CMD,PWSH</li>
<li><a
href="https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b"><code>e58a899</code></a>
fix: re-apply color after nested reset in RenderString (<a
href="https://redirect.github.com/gookit/color/issues/119">#119</a>)</li>
<li><a
href="https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc"><code>de1e243</code></a>
Add 'stable' to Go version matrix and update action</li>
<li><a
href="https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd"><code>ed1b9cc</code></a>
build(deps): bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/gookit/color/issues/115">#115</a>)</li>
<li><a
href="https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8"><code>2e18426</code></a>
build(deps): bump github/codeql-action from 3 to 4 (<a
href="https://redirect.github.com/gookit/color/issues/113">#113</a>)</li>
<li>See full diff in <a
href="https://github.com/gookit/color/compare/v1.6.0...v1.6.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gookit/color&package-manager=go_modules&previous-version=1.6.0&new-version=1.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
This commit is contained in:
Stefan Haller
2026-05-26 09:42:13 +02:00
committed by GitHub
7 changed files with 18 additions and 15 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ require (
github.com/creack/pty v1.1.24
github.com/gdamore/tcell/v3 v3.3.0
github.com/go-errors/errors v1.5.1
github.com/gookit/color v1.6.0
github.com/gookit/color v1.6.1
github.com/integrii/flaggy v1.8.0
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
+2 -2
View File
@@ -44,8 +44,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/gookit/assert v0.1.1 h1:lh3GcawXe/p+cU7ESTZ5Ui3Sm/x8JWpIis4/1aF0mY0=
github.com/gookit/assert v0.1.1/go.mod h1:jS5bmIVQZTIwk42uXl4lyj4iaaxx32tqH16CFj0VX2E=
github.com/gookit/color v1.6.0 h1:JjJXBTk1ETNyqyilJhkTXJYYigHG24TM9Xa2M1xAhRA=
github.com/gookit/color v1.6.0/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs=
github.com/gookit/color v1.6.1 h1:KoTnDxJPRgrL0SoX0f8rCFg2zI0t4E3GZZBMo2nN8LU=
github.com/gookit/color v1.6.1/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/integrii/flaggy v1.8.0 h1:tC1qWwg4fhF2Qdaj+MpPK04cxlOSq0+HoMZqAW6Arao=
+1
View File
@@ -19,3 +19,4 @@
.DS_Store
app
demo
.xenv.toml
+7 -2
View File
@@ -227,8 +227,13 @@ func RenderString(code string, str string) string {
return ClearCode(str)
}
// return fmt.Sprintf(FullColorTpl, code, str)
return StartSet + code + "m" + str + ResetSet
open := StartSet + code + "m"
// If the string contains reset sequences, re-apply our color after each
// reset so that nested colored args don't break the outer color.
if strings.Contains(str, ResetSet) {
str = strings.ReplaceAll(str, ResetSet, ResetSet+open)
}
return open + str + ResetSet
}
// ClearCode clear color codes.
+3 -3
View File
@@ -767,15 +767,15 @@ func RgbStrToHsl(rgbStr string) []float64 {
}
r, e1 := strconv.ParseInt(strings.TrimSpace(rgbVals[0]), 10, 0)
if e1 != nil {
if e1 != nil || r < 0 || r > 255 {
return nil
}
g, e2 := strconv.ParseInt(strings.TrimSpace(rgbVals[1]), 10, 0)
if e2 != nil {
if e2 != nil || g < 0 || g > 255 {
return nil
}
b, e3 := strconv.ParseInt(strings.TrimSpace(rgbVals[2]), 10, 0)
if e3 != nil {
if e3 != nil || b < 0 || b > 255 {
return nil
}
return RgbToHsl(uint8(r), uint8(g), uint8(b))
+3 -6
View File
@@ -30,11 +30,8 @@ var (
)
func init() {
// if support color 16+, don't need to enable VTP
if colorLevel > Level16 {
return
}
if !Enable { // disable color
// needVTP=false OR Enable=false: Don't need to enable virtual process
if !needVTP || !Enable {
return
}
@@ -146,7 +143,7 @@ func detectSpecialTermColor(termVal string) (tl Level, needVTP bool) {
}
// Windows 10 build 14931 is the first release that supports 16m/TrueColor
debugf("support True Color on windows version is >= build 14931")
debugf("support True Color on windows version >= 14931, needVTP=true")
return LevelRgb, true
}
+1 -1
View File
@@ -63,7 +63,7 @@ github.com/go-errors/errors
github.com/go-logfmt/logfmt
# github.com/google/go-cmp v0.7.0
## explicit; go 1.21
# github.com/gookit/color v1.6.0
# github.com/gookit/color v1.6.1
## explicit; go 1.18
github.com/gookit/color
# github.com/hpcloud/tail v1.0.0