diff --git a/lib/format.js b/lib/format.js index a85c3ef7..e138831d 100644 --- a/lib/format.js +++ b/lib/format.js @@ -74,7 +74,7 @@ export function stringToColor(str) { let color = '#'; for (let i = 0; i < 3; i++) { let value = (hash >> (i * 8)) & 0xff; - color += ('00' + value.toString(16)).substring(-2); + color += ('00' + value.toString(16)).slice(-2); } return color; }