Skip to content

Instantly share code, notes, and snippets.

@march213
Last active August 30, 2018 15:05
Show Gist options
  • Save march213/4f495daee9cea6c1fe2a14de9f1adc05 to your computer and use it in GitHub Desktop.
Save march213/4f495daee9cea6c1fe2a14de9f1adc05 to your computer and use it in GitHub Desktop.
// navy
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #001F3F; color: white; padding: 7px 10px;', )
// olive
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #3D9970; color: white; padding: 7px 10px;', )
// black
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #111111; color: white; padding: 7px 10px;', )
// red
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #FF4136; color: white; padding: 7px 10px;', )
// purple
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #B10DC9; color: white; padding: 7px 10px;', )
// maroon
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #85144b; color: white; padding: 7px 10px;', )
// yellow
console.log('%c ', 'font-size: 14px; font-weight: bold; background: #FFDC00; color: black; padding: 7px 10px;', )
const logs = (value, props, kind) => {
switch(kind) {
case 'navy':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #001F3F; color: white; padding: 7px 10px;', props)
case 'olive':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #3D9970; color: white; padding: 7px 10px;', props)
case 'red':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #FF4136; color: white; padding: 7px 10px;', props)
case 'purple':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #B10DC9; color: white; padding: 7px 10px;', props)
case 'black':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #111111; color: white; padding: 7px 10px;', props)
case 'maroon':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #85144b; color: white; padding: 7px 10px;', props)
case 'yellow':
return console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #FFDC00; color: white; padding: 7px 10px;', props)
default:
console.log(`%c ${value}`, 'font-size: 14px; font-weight: bold; background: #111111; color: white; padding: 7px 10px;', props)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment