Tutorial Lighten / Darken Color
The CSS preprocessors Sass and LESS can take any color and darken() or lighten() it by a specific value. But no such ability is built into J...
https://iskablogs.blogspot.com/2014/03/tutorial-lighten-darken-color.html
The CSS preprocessors Sass and LESS can take any color and darken() or lighten() it by a specific value. But no such ability is built into JavaScript. This function takes colors in hex format (i.e. #F06D06, with or without hash) and lightens or darkens them with a value.
function LightenDarkenColor(col, amt) {
var usePound = false;
if (col[0] == "#") {
col = col.slice(1
function LightenDarkenColor(col, amt) {
var usePound = false;
if (col[0] == "#") {
col = col.slice(1