Last active
February 8, 2022 22:51
-
-
Save jtsternberg/6fd7e567d35da410898974ff4b0bf561 to your computer and use it in GitHub Desktop.
Log colors to console (and show colors) in a group
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
var colors = ['#EC0089','#0C1127','#00cfed']; | |
console.group('colors', {colors}); | |
colors.forEach(c => console.log(`%c `, | |
` | |
display: block; | |
background: ${c}; | |
width: 5px; | |
height: 5px; | |
padding: 5px 5px; | |
` | |
) ); | |
console.groupEnd('colors'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment