Skip to content

dsmagic12/randPrttyClrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

randPrttyClrs

JavaScript library to generate random, pretty colors

Limits the random colors in both their saturation and luminance values to avoid overly bright, or overly dull/gray colors

Color picker showing aproximate constraints on saturation and luminance, plus picker control explanations

Use Cases

  1. Generate a pair of colors, one darker and one lighter, for the same hue

    This code will generate a pair of CSS HSL color values for a random hue. The first color element in the returned array is for the darker shade, and the second element is for the lighter shade.

    var cPair = rpc.getRandomPrettyColorPair("HSL");
    $("DIV").each(function(){
      $(this).css({"background-color":cPair[0],"color":cPair[1]});
    });

About

JavaScript library to generate random, pretty colors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published