Fix color contrast, fixes #3091, fixes #3104

This commit is contained in:
SpectralFlame 2022-10-08 02:31:52 -05:00 committed by cyip92
parent 72e0f5115d
commit 660d8ac219
3 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ html {
--color-bad: #b84b5f;
--color-gh-purple: #8957e5;
--color-notification: red;
--color-overlay: rgba(30, 30, 50, 90%);
--color-overlay: rgba(30, 30, 50, 70%);
--color-antimatter: #2196f3;
--color-infinity: #b67f33;
@ -5784,7 +5784,7 @@ properly on certain themes. */
.c-modal-IAP__warning {
font-size: 1.6rem;
font-weight: bold;
color: #ff6666;
color: var(--color-notification);
}
/* #endregion c-modal-import */

View File

@ -37,7 +37,7 @@ export default {
},
suggestionText() {
const goodStyle = `style="color: var(--color-good)"`;
const badStyle = `style="color: var(--color-bad)"`;
const badStyle = `style="color: var(--color-infinity)"`;
const suggestions = ["Saving to the Cloud "];
const cloudProg = this.conflict.cloud.compositeProgress, localProg = this.conflict.local.compositeProgress;

View File

@ -124,7 +124,7 @@ export default {
// Style it appropriately
if (isBetter === 0) return `${layerName} ${layerValue}`;
const parseColor = color => getComputedStyle(document.body).getPropertyValue(`--color-${color}`).split("#")[1];
const colorTag = `<span style="color:#${parseColor(isBetter === 1 ? "good" : "bad")}">`;
const colorTag = `<span style="color:#${parseColor(isBetter === 1 ? "good" : "infinity")}">`;
return isSameLayer
? `${layerName} ${colorTag}${layerValue}</span>`
: `${colorTag}${layerName} ${layerValue}</span>`;