We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c60e3dc commit 1380017Copy full SHA for 1380017
badge-maker/lib/color.js
@@ -49,7 +49,7 @@ function normalizeColor(color) {
49
} else if (color in aliases) {
50
return aliases[color]
51
} else if (isHexColor(color)) {
52
- return `#${color.toLowerCase()}`
+ return `#${color.toString().toLowerCase()}`
53
} else if (isCSSColor(color)) {
54
return color.toLowerCase()
55
} else {
badge-maker/lib/color.spec.js
@@ -27,6 +27,8 @@ test(normalizeColor, () => {
27
given('blue').expect('blue')
28
given('4c1').expect('#4c1')
29
given('f00f00').expect('#f00f00')
30
+ given('111111').expect('#111111')
31
+ given(111111).expect('#111111')
32
given('ABC123').expect('#abc123')
33
given('#ccc').expect('#ccc')
34
given('#fffe').expect('#fffe')
0 commit comments