Changing Color Luminosity in JavaScript

This page uses a ColorLuminance() function programmatically generate darker or lighter hex colors in JavaScript. All code is contained in the source of this page.

For more information, please please refer to:
How to Calculate Lighter or Darker Hex Colors in JavaScript

This example code was developed by Craig Buckler of OptimalWorks.net for SitePoint.com.

It can be used without any restrictions but please don't expect 24/7 support! A link back to SitePoint.com is appreciated.