Ben's Sandbox
  • Projects
  • Tags

jQuery Color Plugin - Highlight Colors


View Blog   View Source  
A simple example of using the jQuery Color plugin to dynamically find a highlight color to use on the border of a div based on the background color. This demo used the jQuery ColorPicker (github.com/vanderlee/colorpicker) to select the main color and then find a suitable complemtary highlight color using the lightness() extension available in the Color plugin. Click the main color swatch to change the color and see the results.
Main
Highlight
This is a box with the select color as the background and the calculated highlight as the border.

© Ben Olson 2012 with help from Jekyll Bootstrap and Twitter Bootstrap