mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
return theme based var
This commit is contained in:
parent
4a38afb45a
commit
869aba745d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user