{"ast":null,"code":"import { ColorFactory } from './color';\nexport const customizePrefixCls = 'ant-color-picker';\nexport const generateColor = color => {\n  if (color instanceof ColorFactory) {\n    return color;\n  }\n  return new ColorFactory(color);\n};\nexport const getRoundNumber = value => Math.round(Number(value || 0));\nexport const getAlphaColor = color => getRoundNumber(color.toHsb().a * 100);\nexport const genAlphaColor = (color, alpha) => {\n  const hsba = color.toHsb();\n  hsba.a = alpha || 1;\n  return generateColor(hsba);\n};","map":{"version":3,"names":["ColorFactory","customizePrefixCls","generateColor","color","getRoundNumber","value","Math","round","Number","getAlphaColor","toHsb","a","genAlphaColor","alpha","hsba"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/antd/es/color-picker/util.js"],"sourcesContent":["import { ColorFactory } from './color';\nexport const customizePrefixCls = 'ant-color-picker';\nexport const generateColor = color => {\n  if (color instanceof ColorFactory) {\n    return color;\n  }\n  return new ColorFactory(color);\n};\nexport const getRoundNumber = value => Math.round(Number(value || 0));\nexport const getAlphaColor = color => getRoundNumber(color.toHsb().a * 100);\nexport const genAlphaColor = (color, alpha) => {\n  const hsba = color.toHsb();\n  hsba.a = alpha || 1;\n  return generateColor(hsba);\n};"],"mappings":"AAAA,SAASA,YAAY,QAAQ,SAAS;AACtC,OAAO,MAAMC,kBAAkB,GAAG,kBAAkB;AACpD,OAAO,MAAMC,aAAa,GAAGC,KAAK,IAAI;EACpC,IAAIA,KAAK,YAAYH,YAAY,EAAE;IACjC,OAAOG,KAAK;EACd;EACA,OAAO,IAAIH,YAAY,CAACG,KAAK,CAAC;AAChC,CAAC;AACD,OAAO,MAAMC,cAAc,GAAGC,KAAK,IAAIC,IAAI,CAACC,KAAK,CAACC,MAAM,CAACH,KAAK,IAAI,CAAC,CAAC,CAAC;AACrE,OAAO,MAAMI,aAAa,GAAGN,KAAK,IAAIC,cAAc,CAACD,KAAK,CAACO,KAAK,CAAC,CAAC,CAACC,CAAC,GAAG,GAAG,CAAC;AAC3E,OAAO,MAAMC,aAAa,GAAGA,CAACT,KAAK,EAAEU,KAAK,KAAK;EAC7C,MAAMC,IAAI,GAAGX,KAAK,CAACO,KAAK,CAAC,CAAC;EAC1BI,IAAI,CAACH,CAAC,GAAGE,KAAK,IAAI,CAAC;EACnB,OAAOX,aAAa,CAACY,IAAI,CAAC;AAC5B,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}