Last active
February 24, 2021 21:09
-
-
Save ivarvong/7fd06f509519e77d77f37555677a7220 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this into the console | |
var colors = [...document.querySelectorAll("*")].flatMap((el) => { | |
const style = getComputedStyle(el); | |
return [ | |
style.getPropertyValue("color"), | |
style.getPropertyValue("background-color"), | |
]; | |
}); | |
[...new Set(colors)].forEach((color) => { | |
console.log( | |
`%c.%c${color}`, | |
`padding: 0 30px; background: ${color}; color: transparent;`, | |
`padding-left: 15px; background: transparent; color: unset;` | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment