UNPKG

@vimeo/iris

Version:
16 lines (11 loc) 1.09 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var polished = require('polished'); function colorLog(_a) { var color = _a.color, grade = _a.grade, newColor = _a.newColor; console.log({ color: color, grade: grade, newColor: newColor }); console.log("%c ".concat(newColor, " "), "background: ".concat(newColor, "; color: ").concat(polished.readableColor(newColor))); console.log("%c H ".concat(polished.parseToHsl(newColor).hue.toFixed(2), " S ").concat(polished.parseToHsl(newColor).saturation.toFixed(2), " L ").concat(polished.parseToHsl(newColor).lightness.toFixed(2), " "), "background: ".concat(newColor, "; color: ").concat(polished.readableColor(newColor))); console.log("%c R ".concat(polished.parseToRgb(newColor).red.toFixed(2), " G ").concat(polished.parseToRgb(newColor).green.toFixed(2), " B ").concat(polished.parseToRgb(newColor).blue.toFixed(2), " "), "background: ".concat(newColor, "; color: ").concat(polished.readableColor(newColor))); } exports.colorLog = colorLog;