Fix tint function
This commit is contained in:
parent
14aa3365f3
commit
304b8425a3
1 changed files with 3 additions and 3 deletions
|
|
@ -108,9 +108,9 @@ function randomizeColor() {
|
||||||
|
|
||||||
function tintColor(value) {
|
function tintColor(value) {
|
||||||
let num = value.match(/\d+/g);
|
let num = value.match(/\d+/g);
|
||||||
r = +num[0] + (0.25 * +num[0]);
|
r = +num[0] + (0.25 * (255 - +num[0]));
|
||||||
g = +num[1] + (0.25 * +num[1]);
|
g = +num[1] + (0.25 * (255 - +num[1]));
|
||||||
b = +num[2] + (0.25 * +num[2]);
|
b = +num[2] + (0.25 * (255 - +num[2]));
|
||||||
|
|
||||||
return`rgb(${r},${g},${b})`;
|
return`rgb(${r},${g},${b})`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue