MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 27: | Line 27: | ||
// Function to generate a random bright color | // Function to generate a random bright color | ||
function getRandomBrightColor() { | function getRandomBrightColor() { | ||
const min = | const min = 75; // Minimum value for bright colors | ||
const | const h = Math.floor(Math.random() * (220)); | ||
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}%)`; | ||
} | } | ||