1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

chore: format js

This commit is contained in:
Ian Morland
2022-11-07 11:30:01 +00:00
parent 8fe09815f5
commit 06963df407

View File

@@ -6,7 +6,7 @@
*/
export default function isDark(hexcolor: String) {
let hexnumbers = hexcolor.replace("#", "");
let hexnumbers = hexcolor.replace('#', '');
if (hexnumbers.length == 3) {
hexnumbers += hexnumbers;
@@ -15,7 +15,7 @@ export default function isDark(hexcolor: String) {
const r = parseInt(hexnumbers.substr(0, 2), 16);
const g = parseInt(hexnumbers.substr(2, 2), 16);
const b = parseInt(hexnumbers.substr(4, 2), 16);
const yiq = ((r*299)+(g*587)+(b*114))/1000;
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
return (yiq >= 128) ? false : true;
return yiq >= 128 ? false : true;
}