We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3793e2 commit 77646c4Copy full SHA for 77646c4
colors.go
@@ -161,13 +161,13 @@ func Lighter(c color.Color, percent float64) color.Color {
161
col, _ := colorful.MakeColor(c)
162
h, cv, l := col.Hcl()
163
164
- return colorful.Hcl(h, cv, l+(l*percent))
+ return colorful.Hcl(h, cv, l+(l*percent)).Clamped()
165
}
166
167
// Darker returns a darker version of the specified color
168
func Darker(c color.Color, percent float64) color.Color {
169
170
171
172
- return colorful.Hcl(h, cv, l-(l*percent))
+ return colorful.Hcl(h, cv, l-(l*percent)).Clamped()
173
0 commit comments