|
|
@@ -138,10 +138,11 @@ export class AppService {
|
|
|
/**
|
|
|
* https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
|
|
|
* @private
|
|
|
+ * @description Only generates random colors if the current palette does not provide enough colors for all the clusters
|
|
|
* @param {number} colorCount Number of colors to randomly generate
|
|
|
* @returns {Array<Array<Number>>} Array of RGB colors
|
|
|
*/
|
|
|
- private generateRandomColorPalette(colorCount) {
|
|
|
+ private generateRandomColorPalette(colorCount: number) {
|
|
|
const palette = this.colorPalette;
|
|
|
const goldenRatioConjugate = 0.618033988749895;
|
|
|
let i = palette.length;
|