UNPKG

766 BSource Map (JSON)View Raw
1{"version":3,"file":"getFullColorString.js","sourceRoot":"../src/","sources":["utilities/color/getFullColorString.ts"],"names":[],"mappings":";;;AAAA,mCAAiE;AACjE,qCAAoC;AAGpC;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,KAAa;IAC9C,OAAO,MAAI,iBAAO,CAAC,KAAK,CAAC,CAAC,EAAE,6BAAoB,EAAE,wBAAe,CAAG,CAAC;AACvE,CAAC;AAFD,gDAEC","sourcesContent":["import { MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts';\nimport { hsv2hex } from './hsv2hex';\nimport type { IColor } from './interfaces';\n\n/**\n * Converts a color hue to an HTML color string (with # prefix).\n * This implementation ignores all components of `color` except hue.\n */\nexport function getFullColorString(color: IColor): string {\n return `#${hsv2hex(color.h, MAX_COLOR_SATURATION, MAX_COLOR_VALUE)}`;\n}\n"]}
\No newline at end of file