Docs Home

sb.colors.rand

@File: /surebert/colors/rand.js

@Author: Paul Visco

@Description: Returns a random color string that can be used to set an elements style properties


@Param: Boolean grey If set to one, it returns only greyscale colors meaning r,g, and b values are the same
@Returns: Array An rgb color string rgb(234,34,156);
@Example:

var colorArray = sb.colors.rand();
colorArray = rgb(234,34,156);//<-one possible return value

var colorArray = sb.colors.rand(1);
colorArray = rgb(34,34,34);//<-one possible return value
//both return [255,255,255]