Created
April 27, 2015 20:17
-
-
Save oscarmorrison/0513198d0a305ddb0c98 to your computer and use it in GitHub Desktop.
Change color shade (using Blue value)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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