return theme based var

This commit is contained in:
SrGooglo 2024-09-11 01:14:49 +00:00
parent 4a38afb45a
commit 869aba745d

View File

@ -16,7 +16,7 @@ export default class ContrastYIQ {
const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000
return (yiq >= 128) ? "black" : "white"
return (yiq >= 128) ? "var(--text-color-black)" : "var(--text-color-white)"
}
static async fromUrl(url) {