(colorHue)
| 585 | |
| 586 | // get The range of given hue when options.count!=0 |
| 587 | function getRealHueRange(colorHue) { |
| 588 | if (!isNaN(colorHue)) { |
| 589 | var number = parseInt(colorHue); |
| 590 | |
| 591 | if (number < 360 && number > 0) { |
| 592 | return getColorInfo(colorHue).hueRange; |
| 593 | } |
| 594 | } else if (typeof colorHue === "string") { |
| 595 | if (colorDictionary[colorHue]) { |
| 596 | var color = colorDictionary[colorHue]; |
| 597 | |
| 598 | if (color.hueRange) { |
| 599 | return color.hueRange; |
| 600 | } |
| 601 | } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { |
| 602 | var hue = HexToHSB(colorHue)[0]; |
| 603 | return getColorInfo(hue).hueRange; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | return [0, 360]; |
| 608 | } |
| 609 | return randomColor; |
| 610 | }); |
no test coverage detected