* @param {Array. } arrColor like [12,33,44,0.4] * @param {string} type 'rgba', 'hsva', ... * @return {string} Result color. (If input illegal, return undefined).
(arrColor, type)
| 4081 | * @return {string} Result color. (If input illegal, return undefined). |
| 4082 | */ |
| 4083 | function stringify(arrColor, type) { |
| 4084 | if (!arrColor || !arrColor.length) { |
| 4085 | return; |
| 4086 | } |
| 4087 | var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2]; |
| 4088 | if (type === 'rgba' || type === 'hsva' || type === 'hsla') { |
| 4089 | colorStr += ',' + arrColor[3]; |
| 4090 | } |
| 4091 | return type + '(' + colorStr + ')'; |
| 4092 | } |
| 4093 | |
| 4094 | /** |
| 4095 | * @module echarts/animation/Animator |
no outgoing calls
no test coverage detected