Skip to content

Instantly share code, notes, and snippets.

@oscarmorrison
Created April 27, 2015 20:17
Show Gist options
  • Save oscarmorrison/0513198d0a305ddb0c98 to your computer and use it in GitHub Desktop.
Save oscarmorrison/0513198d0a305ddb0c98 to your computer and use it in GitHub Desktop.
Change color shade (using Blue value)
change_color = function(color){
var color = "#03ffc5"
var num = parseInt(color,16)
var num = parseInt(color.slice(color.length-2,color.length),16);
num = num + 50;
if(num>255){num = num-255;}
return color.slice(0,color.length-2)+num.toString(16)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment