jQuery Plugin To Add Random Colors To Elements - youHue
File Size: | 7.56 KB |
---|---|
Views Total: | 540 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

youHue is a JQuery plug-in that allows its users to add random colors to elements they decide on their page that change every time the page is loaded.
It does this in two ways at this current point in time and these are:
- Using randomly generated numbers between 0 & 255 to go into an RGB code to bring back a completely random color.
- Using your own color palettes for a function to pick from randomly.
Basic Usage:
1. First you need to include the js file into your project.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="youHue.js"></script>
2. Once you have included the youHue.js file in your project directory you can get started with using the plugin. To do this you must call upon the plugin in your own script file i.e. script.js, it will look something like this:
$(".example").youHue({ // OPTIONS });
3. Options for random colors.
$(".example").youHue({ // randomize colors randomize: false, // enable random background color backgroundColor: false, // enable random foreground color foregroundColor: false, // an array of your own colors colors: '', // enable your own color palettes myForeground: false, myBackground: false, myRandom: false });
Change log:
2015-02-26
- update.
This awesome jQuery plugin is developed by lewisjwright. For more Advanced Usages, please check the demo page or visit the official website.