MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 28: | Line 28: | ||
function getRandomBrightColor() { | function getRandomBrightColor() { | ||
const min = 200; // Minimum value for bright colors | const min = 200; // Minimum value for bright colors | ||
const | const h = Math.floor(Math.random() * 255); | ||
const | const s = Math.floor(Math.random() * (100 - min) + min); | ||
const | const l = Math.floor(Math.random() * (100 - min) + min); | ||
return ` | return `hsl(${h},${s}%,${l}%)`; | ||
} | } | ||