Skip to content

Commit 2e9d908

Browse files
author
Arman Badalyan
committed
geophystech#305 Damage level colors.
1 parent 8f8e271 commit 2e9d908

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/helpers/color.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export function colorHexToRGB(hex, alpha)
4747
let b = parseInt(hex.slice(4, 6), 16)
4848

4949
if (alpha) {
50-
return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'
51-
} else {
52-
return 'rgb(' + r + ', ' + g + ', ' + b + ')'
50+
return `rgba(${r}, ${g}, ${b}, ${alpha})`
5351
}
52+
53+
return `rgb(${r}, ${g}, ${b})`
5454
}

0 commit comments

Comments
 (0)