File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT
14
14
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 /go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s =
15
15
github.com/client9/misspell v0.3.4 /go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw =
16
16
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d /go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4 =
17
- github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
18
17
github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
19
18
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
20
19
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
@@ -98,7 +97,6 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYED
98
97
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133 /go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw =
99
98
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d /go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE =
100
99
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e /go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA =
101
- github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4 =
102
100
github.com/stretchr/objx v0.1.0 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
103
101
github.com/stretchr/testify v1.2.2 /go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs =
104
102
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0 =
Original file line number Diff line number Diff line change @@ -140,13 +140,13 @@ func (c *RGB) NearestNamed() *Named {
140
140
return potential
141
141
}
142
142
distance := c .Distance (potential .RGB )
143
+ if distance == 0 {
144
+ return potential // same color
145
+ }
143
146
if distance < matchedDistance {
144
147
match = potential
145
148
matchedDistance = distance
146
149
}
147
- if distance == 0 {
148
- break // same color
149
- }
150
150
}
151
151
return match
152
152
}
You can’t perform that action at this time.
0 commit comments