b9cc5a60eb5ae589cb9fc434f2e9fe56.json
16.4 KB
{"ast":null,"code":"import { TinyColor } from '@ctrl/tinycolor';\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = new TinyColor(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = pColor.toHsv();\n var colorString = new TinyColor({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }).toHexString();\n patterns.push(colorString);\n }\n\n patterns.push(pColor.toHexString());\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = pColor.toHsv();\n\n var _colorString = new TinyColor({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }).toHexString();\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref) {\n var index = _ref.index,\n opacity = _ref.opacity;\n var darkColorString = new TinyColor(opts.backgroundColor || '#141414').mix(patterns[index], opacity * 100).toHexString();\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\nexport { blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow };","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/colors/dist/index.esm.js"],"names":["TinyColor","hueStep","saturationStep","saturationStep2","brightnessStep1","brightnessStep2","lightColorCount","darkColorCount","darkColorMap","index","opacity","getHue","hsv","i","light","hue","Math","round","h","getSaturation","s","saturation","Number","toFixed","getValue","value","v","generate","color","opts","arguments","length","undefined","patterns","pColor","toHsv","colorString","toHexString","push","_i","_hsv","_colorString","theme","map","_ref","darkColorString","backgroundColor","mix","presetPrimaryColors","red","volcano","orange","gold","yellow","lime","green","cyan","blue","geekblue","purple","magenta","grey","presetPalettes","presetDarkPalettes","Object","keys","forEach","key","primary"],"mappings":"AAAA,SAASA,SAAT,QAA0B,iBAA1B;AAEA,IAAIC,OAAO,GAAG,CAAd,C,CAAiB;;AAEjB,IAAIC,cAAc,GAAG,IAArB,C,CAA2B;;AAE3B,IAAIC,eAAe,GAAG,IAAtB,C,CAA4B;;AAE5B,IAAIC,eAAe,GAAG,IAAtB,C,CAA4B;;AAE5B,IAAIC,eAAe,GAAG,IAAtB,C,CAA4B;;AAE5B,IAAIC,eAAe,GAAG,CAAtB,C,CAAyB;;AAEzB,IAAIC,cAAc,GAAG,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U,cAAc,CAACV,IAA1B;AACA,IAAID,MAAM,GAAGW,cAAc,CAACX,MAA5B;AACA,IAAIE,MAAM,GAAGS,cAAc,CAACT,MAA5B;AACA,IAAIC,IAAI,GAAGQ,cAAc,CAACR,IAA1B;AACA,IAAIC,KAAK,GAAGO,cAAc,CAACP,KAA3B;AACA,IAAIC,IAAI,GAAGM,cAAc,CAACN,IAA1B;AACA,IAAIC,IAAI,GAAGK,cAAc,CAACL,IAA1B;AACA,IAAIC,QAAQ,GAAGI,cAAc,CAACJ,QAA9B;AACA,IAAIC,MAAM,GAAGG,cAAc,CAACH,MAA5B;AACA,IAAIC,OAAO,GAAGE,cAAc,CAACF,OAA7B;AACA,IAAIC,IAAI,GAAGC,cAAc,CAACD,IAA1B;AAEA,SAASJ,IAAT,EAAeD,IAAf,EAAqBE,QAArB,EAA+B/B,QAA/B,EAAyCyB,IAAzC,EAA+CG,KAA/C,EAAsDM,IAAtD,EAA4DP,IAA5D,EAAkEM,OAAlE,EAA2ET,MAA3E,EAAmFY,kBAAnF,EAAuGD,cAAvG,EAAuHd,mBAAvH,EAA4IW,MAA5I,EAAoJV,GAApJ,EAAyJC,OAAzJ,EAAkKG,MAAlK","sourcesContent":["import { TinyColor } from '@ctrl/tinycolor';\n\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = new TinyColor(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = pColor.toHsv();\n var colorString = new TinyColor({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }).toHexString();\n patterns.push(colorString);\n }\n\n patterns.push(pColor.toHexString());\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = pColor.toHsv();\n\n var _colorString = new TinyColor({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }).toHexString();\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref) {\n var index = _ref.index,\n opacity = _ref.opacity;\n var darkColorString = new TinyColor(opts.backgroundColor || '#141414').mix(patterns[index], opacity * 100).toHexString();\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\n\nexport { blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow };\n"]},"metadata":{},"sourceType":"module"}