翻譯于這篇文章
function randowRgb(x) {
let R = 0
let G = 0
let B = 0
while (R <= 30 || G <= 30 || B <= 30 || B >= 255) {
R = Math.floor(Math.random() * 255)
G = Math.floor(Math.random() * 255)
B = Math.floor((x * 100 - R * 30 - G * 59) / 11)
if (R > 30 && G > 30 && B > 30 && B < 255) {
return `rgb(${R}, ${G}, ${B})`
}
}
}