fix(chess.com): inverted piece colors on latte (#1625)

This commit is contained in:
Aimnos authored and GitHub committed 2025-02-09 17:58:59 -05:00
1 parent 05c4dc991f
commit cfd0bc134c
1 file changed
+5 -2
+5 -2
View File
@@ -635,6 +635,9 @@
Source: https://github.com/sharechess/sharechess/tree/4f2f54c1340df59556f0f1d67e7b788c3322229c/public/pieces/tatiana
*/
@white-piece-bg: if(@flavor = latte, @surface2, @text);
@black-piece-bg: if(@flavor = latte, @text, @surface2);
@bishop: '<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" width="50" height="50"><path d="M25.004 5.75c-1.683 0 -3.047 1.099 -3.047 2.453 0 0.503 0.194 0.993 0.554 1.405 -2.54 3.306 -8.781 9.8 -8.985 16.336 -0.087 3.375 3.933 8.723 4.107 9.26 0.174 0.535 1.333 0.933 3.268 1.176 -1.33 4.59 -10.098 -1.079 -14.147 3.37l1.842 4.5c5.573 -3.122 9.967 3.15 16.409 -3.422v0.001c6.44 6.57 10.835 0.299 16.407 3.421l1.842 -4.5c-4.05 -4.448 -12.817 1.22 -14.148 -3.37 1.936 -0.243 3.095 -0.64 3.269 -1.177 0.174 -0.536 4.193 -5.884 4.107 -9.26 -0.205 -6.535 -6.445 -13.028 -8.986 -16.335 0.36 -0.412 0.554 -0.902 0.554 -1.405 0 -1.354 -1.363 -2.452 -3.046 -2.453z" fill="%BG%" stroke="%BORDER%" stroke-linejoin="round" stroke-width="1.5"/><path class="st32" d="M25.004 21.106c-0.699 0 -1.02 0.342 -1.02 1.025v2.453h-2.388q-0.96 0 -0.96 0.931 0 0.932 0.96 0.932h2.389V28.9c0 0.683 0.35 1.025 1.019 1.025 0.67 0 1.02 -0.342 1.02 -1.025v-2.453h2.475c0.612 0 0.932 -0.31 0.932 -0.932 0 -0.62 -0.32 -0.931 -0.932 -0.931h-2.476V22.13c0 -0.683 -0.35 -1.025 -1.019 -1.025" opacity=".5"/><path d="M25.004 5.75c-0.827 0 -1.62 0.27 -2.194 0.75 3.937 0.194 4.045 2.262 3.072 3.475 1.102 2.394 2.82 4.2 4.161 6.431 0 0 11.604 21.888 -13.358 17.253 0 0 0.63 1.553 2.03 2.28 0.7 0.364 1.164 0.396 2.185 0.441 1.324 0.08 5.334 0.537 6.306 0.69 1.937 7.056 13.332 0.012 15.127 4.93l0.921 -2.249c-3.726 -4.452 -9.996 1.063 -14.057 -3.31 1.38 -0.214 2.392 -0.603 2.954 -0.898 0 -0.143 4.422 -6.065 4.331 -9.6 -0.204 -6.534 -6.443 -13.026 -8.985 -16.334 0.36 -0.412 0.554 -0.904 0.554 -1.407 0 -1.354 -1.364 -2.452 -3.047 -2.452" opacity=".4" style="opacity:.25;paint-order:normal"/><path d="M23.797 6.898c-0.714 0.32 -1.265 0.95 -1.001 1.779 0.084 0.32 0.314 0.507 0.465 0.79a0.9 0.9 0 0 1 -0.143 0.73c-1.576 1.946 -5.566 6.411 -7.414 10.599 -0.704 1.735 -1.565 3.746 -1.396 5.648 0.475 3.413 3.388 7.392 3.388 7.392s-2.053 -4.357 -2.246 -7.021c-0.032 -7.08 5.8 -12.424 8.301 -17.1 -0.379 -1.577 -1.172 -1.464 0.046 -2.817M9.01 43.191c0 -0.058 -1.345 -3.262 -1.345 -3.262 2.92 -2.56 8.37 -0.3 11.229 -0.952 -4.286 0.847 -7.639 -0.51 -10.069 1.09z" fill="#fff" opacity=".25"/></svg>';
@king: '<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" width="50" height="50"><g stroke-width="1.04"><path d="M3281.9 -2090.7c6.361 0 11.51 -0.56 11.51 -1.249l1.342 -6.525c11.336 -7.821 6.689 -19.658 -3.35 -19.615 -2.083 0.01 -4.893 0.53 -6.264 1.338l-0.876 -4.1h3.895c1.17 0.13 1.77 -1.6 1.77 -2.668 0 -1.067 -0.592 -2.667 -1.77 -2.667h-3.388v-3.092c0 -0.97 -1.804 -1.455 -2.89 -1.455s-2.892 0.485 -2.892 1.455v3.092h-3.388c-1.18 0 -1.77 1.6 -1.77 2.667 0 1.068 0.6 2.799 1.77 2.668h3.895l-0.876 4.1c-1.37 -0.807 -4.18 -1.328 -6.264 -1.338 -10.038 -0.043 -14.685 11.794 -3.35 19.615l1.342 6.525c0 0.689 5.15 1.246 11.51 1.249h0.023z" fill="%BG%" stroke="%BORDER%" stroke-width="1.559" transform="matrix(.96234 0 0 .9617 -3133.3 2054.9)"/><path d="M3287.7 -2126.4c-0.55 -0.01 -0.968 0.097 -0.986 0.185 0.738 0.752 3.757 4.344 -3.738 3.792 -0.902 0.506 0.15 7.329 0.891 9.249 0 0 1.22 -0.547 2.05 -0.977 14.764 -4.253 12.707 12.372 3.903 15.299 -5.255 0.795 -13.114 1.12 -18.294 0.35l0.413 2.538c6.744 0.603 6.596 0.464 15.112 0.59 4.2 2.842 -11.95 3.965 -16.7 3.396 0.092 0.263 23.03 1.225 23.058 0.036l1.342 -6.56c11.335 -7.821 6.69 -19.657 -3.348 -19.615 -0.876 0 -1.877 0.103 -2.849 0.271l-3.411 1.065 -0.876 -4.099h3.894c1.027 0.294 1.743 -1.58 1.77 -2.668 0.151 -2.251 -1.43 -2.704 -2.228 -2.852z" opacity=".4" style="opacity:.25" transform="matrix(.96234 0 0 .9617 -3133.3 2054.9)"/><path d="M3282.9 -2129.8c-0.942 -0.253 -2.572 -0.194 -3.17 0.55 -0.044 0.056 -0.034 0.215 -0.033 0.296l0.028 3.576h-3.453c-0.296 0 -0.787 -0.016 -0.97 0.088 -0.37 0.206 -0.717 0.94 -0.75 1.79 -0.027 0.689 0.5 1.896 0.877 1.93 0.237 0.02 0.576 -0.029 1.182 -0.01 -1.884 -0.7 -1.398 -3.503 -0.2 -3.451l3.63 -0.028 -0.046 -3.143c-0.014 -0.97 0.65 -1.471 1.737 -1.471 0.427 0 1.428 0.04 1.924 0.191 -0.519 -0.301 -0.757 -0.316 -0.757 -0.316zm-3 10.6 -0.77 3.661c-1.37 -0.807 -4.11 -1.766 -6.193 -1.775 -9.415 -0.753 -14.415 10.655 -3.24 18.389l1.349 6.62 0.108 0.015 -0.452 -6.716c-10.51 -7.743 -6.864 -17.498 3.174 -17.455 2.084 0.01 4.254 0.978 5.625 1.785l0.908 -6.87z" fill="#fff" opacity=".25" style="paint-order:normal" transform="matrix(.96234 0 0 .9617 -3133.3 2054.9)"/></g></svg>';
@knight: '<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" width="50" height="50"><path d="m22.803 5.768 -2.495 0.468 -0.995 3.425 -2.169 -1.423 -1.427 0.424 0.76 4.951 -9.702 14.98c-0.358 5.956 1.871 6.017 6.143 7.648 4.973 -7.02 10.689 -5.017 15.371 -10.324 0.563 6.622 -15.845 9.2 -13.646 18.275l27.09 0.058c3.811 -16.778 1.02 -27.75 -14.607 -33.796z" style="clip-rule:evenodd;fill-rule:evenodd;fill:%BG%;stroke-linejoin:round;stroke-width:1.5;stroke:%BORDER%"/><path d="M21.619 17.718c-0.45 -0.01 -0.835 0.285 -1.09 0.609 -0.414 0.533 -0.63 1.178 -0.748 1.82 -0.044 0.278 -0.094 0.558 -0.077 0.838 0.026 0.098 0.144 0.063 0.217 0.044 0.632 -0.118 1.29 -0.128 1.907 -0.316 0.447 -0.14 0.801 -0.464 1.034 -0.84 0.233 -0.36 0.333 -0.773 0.471 -1.168 0.061 -0.138 0.045 -0.315 -0.096 -0.407 -0.232 -0.16 -0.513 -0.242 -0.772 -0.356 -0.254 -0.097 -0.505 -0.23 -0.788 -0.224z" style="clip-rule:evenodd;fill-rule:evenodd;opacity:.5"/><path d="m22.803 5.768 -1.247 0.234 3.807 5.702c19.045 8.125 18.868 24.79 6.86 32.524l9.51 0.021c3.81 -16.778 1.023 -27.75 -14.604 -33.796z" style="clip-rule:evenodd;fill-rule:evenodd;opacity:.25;"/><path d="M16.586 9.211c0.146 1.706 0.874 4.43 0.571 4.836l-9.61 14.73c-0.323 3.61 1.066 4.888 1.342 4.832 -0.087 0.01 -1.418 -2.128 -0.53 -4.647l9.67 -14.883 -1.432 -4.858c-0.14 -0.132 0.159 0.072 -0.01 -0.01z" style="clip-rule:evenodd;fill-rule:evenodd;fill:#fff;opacity:.25;"/><path d="M27.442 25.617s2.02 -2.624 1.99 -3.823 1.065 5.553 -1.303 6.363c-0.098 -0.413 0.272 -1.709 0.198 -1.993 -0.32 -1.224 -0.884 -0.417 -0.885 -0.547z" style="clip-rule:evenodd;fill-rule:evenodd;opacity:.25;stroke-width:.26458px;stroke:#000"/><path d="M28.727 28.005c-2.834 6.232 -14.734 8.14 -13.325 15.542 -1.072 -6.537 13.176 -8.88 13.325 -15.542" style="fill:#fff;opacity:.25"/><path d="M10.763 28.109s-0.047 2.386 -1.561 2.185c0 0 -1.834 -1.016 1.561 -2.185" style="fill:#000;opacity:.5"/></svg>';
@@ -647,7 +650,7 @@
@type = "white",
replace(
replace(
replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @text),
replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @white-piece-bg),
"#fff",
@mantle
),
@@ -656,7 +659,7 @@
),
replace(
replace(
replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @surface2),
replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @black-piece-bg),
"#fff",
@text
),