UNPKG

850 BSource Map (JSON)View Raw
1{"version":3,"file":"correctHSV.js","sourceRoot":"../src/","sources":["utilities/color/correctHSV.ts"],"names":[],"mappings":";;;AAAA,mCAAgF;AAChF,iCAAgC;AAGhC,4DAA4D;AAC5D,SAAgB,UAAU,CAAC,KAAW;IACpC,OAAO;QACL,CAAC,EAAE,aAAK,CAAC,KAAK,CAAC,CAAC,EAAE,sBAAa,CAAC;QAChC,CAAC,EAAE,aAAK,CAAC,KAAK,CAAC,CAAC,EAAE,6BAAoB,CAAC;QACvC,CAAC,EAAE,aAAK,CAAC,KAAK,CAAC,CAAC,EAAE,wBAAe,CAAC;KACnC,CAAC;AACJ,CAAC;AAND,gCAMC","sourcesContent":["import { MAX_COLOR_HUE, MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts';\nimport { clamp } from './clamp';\nimport type { IHSV } from './interfaces';\n\n/** Corrects an HSV color to fall within the valid range. */\nexport function correctHSV(color: IHSV): IHSV {\n return {\n h: clamp(color.h, MAX_COLOR_HUE),\n s: clamp(color.s, MAX_COLOR_SATURATION),\n v: clamp(color.v, MAX_COLOR_VALUE),\n };\n}\n"]}
\No newline at end of file