(hue, options)
| 144 | } |
| 145 | |
| 146 | function pickSaturation(hue, options) { |
| 147 | if (options.hue === "monochrome") { |
| 148 | return 0; |
| 149 | } |
| 150 | |
| 151 | if (options.luminosity === "random") { |
| 152 | return randomWithin([0, 100]); |
| 153 | } |
| 154 | |
| 155 | var saturationRange = getSaturationRange(hue); |
| 156 | |
| 157 | var sMin = saturationRange[0], |
| 158 | sMax = saturationRange[1]; |
| 159 | |
| 160 | switch (options.luminosity) { |
| 161 | case "bright": |
| 162 | sMin = 55; |
| 163 | break; |
| 164 | |
| 165 | case "dark": |
| 166 | sMin = sMax - 10; |
| 167 | break; |
| 168 | |
| 169 | case "light": |
| 170 | sMax = 55; |
| 171 | break; |
| 172 | } |
| 173 | |
| 174 | return randomWithin([sMin, sMax]); |
| 175 | } |
| 176 | |
| 177 | function pickBrightness(H, S, options) { |
| 178 | var bMin = getMinimumBrightness(H, S), |
no test coverage detected
searching dependent graphs…