1 | {"version":3,"file":"_rgbaOrHexString.js","sourceRoot":"../src/","sources":["utilities/color/_rgbaOrHexString.ts"],"names":[],"mappings":";;;AAAA,mCAA2C;AAE3C;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAqB,EAAE,GAAW;IAClG,OAAO,CAAC,KAAK,wBAAe,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAI,GAAK,CAAC,CAAC,CAAC,UAAQ,CAAC,UAAK,CAAC,UAAK,CAAC,UAAK,CAAC,GAAG,wBAAe,MAAG,CAAC;AACvH,CAAC;AAFD,4CAEC","sourcesContent":["import { MAX_COLOR_ALPHA } from './consts';\n\n/**\n * @internal\n * Get a CSS color string from some color components.\n * If `a` is specified and not 100, returns an `rgba()` string.\n * Otherwise returns `hex` prefixed with #.\n */\nexport function _rgbaOrHexString(r: number, g: number, b: number, a: number | undefined, hex: string): string {\n return a === MAX_COLOR_ALPHA || typeof a !== 'number' ? `#${hex}` : `rgba(${r}, ${g}, ${b}, ${a / MAX_COLOR_ALPHA})`;\n}\n"]} |