Created
December 30, 2016 00:18
-
-
Save marianomike/71442dca57a9dbb95ccfc4a02f83f7f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function rgbToHex(r, g, b) { | |
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); | |
} | |
function colorFromString(value) { | |
var immutable = MSImmutableColor.colorWithSVGString_(value); | |
return MSColor.alloc().initWithImmutableObject_(immutable); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment