Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -1
index.html
CHANGED
@@ -517,7 +517,8 @@
|
|
517 |
}
|
518 |
|
519 |
function adjustBrightness(color, percent) {
|
520 |
-
const num = parseInt(color.replace('#', ''),
|
|
|
521 |
const R = (num >> 16) + amt;
|
522 |
const G = (num >> 8 & 0x00FF) + amt;
|
523 |
const B = (num & 0x0000FF) + amt;
|
|
|
517 |
}
|
518 |
|
519 |
function adjustBrightness(color, percent) {
|
520 |
+
const num = parseInt(color.replace('#', ''), 16);
|
521 |
+
const amt = Math.round(2.55 * percent);
|
522 |
const R = (num >> 16) + amt;
|
523 |
const G = (num >> 8 & 0x00FF) + amt;
|
524 |
const B = (num & 0x0000FF) + amt;
|