()
| 66 | } |
| 67 | |
| 68 | function getRandomColorName() { |
| 69 | const existingColorNames = getAllColorNames(); |
| 70 | const predefinedColorNames = Object.keys(colorNames); |
| 71 | let colorNameOptions = predefinedColorNames.filter((item) => !existingColorNames.includes(item)); |
| 72 | return capitalizeFirstLetter(colorNameOptions[Math.floor(Math.random() * colorNameOptions.length)]); |
| 73 | } |
| 74 | |
| 75 | export {predefinedColorNames, getClosestColorName, getRandomColorName}; |
no test coverage detected