Skip to content
mozhi.gyy edited this page Aug 21, 2015 · 6 revisions

Random.color()

  • Random.color()

随机生成一个有吸引力的颜色,格式为 '#RRGGBB'。

Random.color()
// => "#3538B2"

Random.hex()

  • Random.hex()

随机生成一个有吸引力的颜色,格式为 '#RRGGBB'。

Random.hex()
// => "#3538B2"

Random.rgb()

  • Random.rgb()

随机生成一个有吸引力的颜色,格式为 'rgb(r, g, b)'。

Random.rgb()
// => "rgb(242, 198, 121)"

Random.rgba()

  • Random.rgba()

随机生成一个有吸引力的颜色,格式为 'rgba(r, g, b, a)'。

Random.rgba()
// => "rgba(242, 198, 121, 0.13)"

Random.hsl()

  • Random.hsl()

随机生成一个有吸引力的颜色,格式为 'hsl(h, s, l)'。

Random.hsl()
// => "hsl(345, 82, 71)"