( startColor: string, endColor: string, numColors: number )
| 471 | } |
| 472 | |
| 473 | export function generateGradientColors( |
| 474 | startColor: string, |
| 475 | endColor: string, |
| 476 | numColors: number |
| 477 | ): string[] { |
| 478 | const colors = []; |
| 479 | for (let i = 0; i < numColors; i++) { |
| 480 | const factor = i / (numColors - 1); |
| 481 | colors.push(interpolateColor(startColor, endColor, factor)); |
| 482 | } |
| 483 | return colors; |
| 484 | } |
no test coverage detected