bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 438 forks source link

v2: rename legacyRandom to trueRandom, and move it into random.ts #182

Closed bgrins closed 6 years ago

bgrins commented 6 years ago

The new random function generates attractive random colors. legacyRandom generates actual random colors - so I think trueRandom or something like that would be a better name for it. Alternatively, we could expose it as an option to the random function.

It also seems like it'd be a better fit for the random module and not fromRatio.

scttcper commented 6 years ago

the new random has a full random, but the renaming and moving makes sense.

in the docs as

random({
  luminosity: 'random',
  hue: 'random',
});
bgrins commented 6 years ago

If the new method supports truly random as an option, I think we should just drop legacyRandom / trueRandom altogether.