Thanks to visit codestin.com Credit goes to github.com
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 1566b6b commit b16aeeaCopy full SHA for b16aeea
src/utils/index.js
@@ -1,3 +1,8 @@
1
+/*
2
+ * Code inspired by Chris Coyier's vanilla css lighten/darken color solution
3
+ * https://css-tricks.com/snippets/javascript/lighten-darken-color/
4
+ */
5
+
6
const hexToRGB = (color) => {
7
const num = parseInt(color.replace('#', ''), 16)
8
const r = (num >> 16) - 30 // eslint-disable-line
0 commit comments