Generate Random Color distinguishable to Humans

前端 未结 9 926
旧时难觅i
旧时难觅i 2020-12-12 14:11

I am trying to randomly generate a color in hex in javascript.

However the colors generated are almost indistinguishable from eachother.
Is there a way to improv

9条回答
  •  臣服心动
    2020-12-12 15:12

    I wrote up a small script called SwitchColors.js which can be found here: https://github.com/akulmehta/SwitchColors.js

    The script produces more saturated colors and the brightness can be controlled. Although it may not produce visually distinguishable colors, it produces high saturation and bright colors which can also be attractive.

提交回复
热议问题