We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8a8317 commit 38e4f05Copy full SHA for 38e4f05
lib_src/misc/colors.ts
@@ -20,12 +20,12 @@ export function getColors(selectors) {
20
// wait till rendered?
21
for (const style in selectors) {
22
try {
23
- color[style] = rgb2hex(window.getComputedStyle(styled[style])['color'])
+ color[style] = rgb2hex(window.getComputedStyle(styled[style]).color)
24
} catch (e) {
25
console.error(e)
26
}
27
28
- color['background'] = rgb2hex(window.getComputedStyle(div)['backgroundColor'])
+ color.background = rgb2hex(window.getComputedStyle(div).backgroundColor)
29
document.body.removeChild(div)
30
31
return color
0 commit comments