mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-26 23:42:11 -05:00
Lowered contrast threshold
This commit is contained in:
parent
5ad4485c64
commit
457097ade4
1 changed files with 1 additions and 1 deletions
|
@ -461,5 +461,5 @@ function getContrastingColour(hex: string) {
|
||||||
const g = parseInt(hex.substr(2, 2), 16);
|
const g = parseInt(hex.substr(2, 2), 16);
|
||||||
const b = parseInt(hex.substr(4, 2), 16);
|
const b = parseInt(hex.substr(4, 2), 16);
|
||||||
const cc = (r * 299 + g * 587 + b * 114) / 1000;
|
const cc = (r * 299 + g * 587 + b * 114) / 1000;
|
||||||
return cc >= 128 ? "black" : "white";
|
return cc >= 75 ? "black" : "white";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue