Skip to content

Instantly share code, notes, and snippets.

@rahulpandey
Created November 14, 2016 11:16
Show Gist options
  • Save rahulpandey/6195752e90bf4449cdb8f2ef6e5bc8d7 to your computer and use it in GitHub Desktop.
Save rahulpandey/6195752e90bf4449cdb8f2ef6e5bc8d7 to your computer and use it in GitHub Desktop.
String hexColor = String.format("#%06X", (0xFFFFFF & -16776961));
Integer intColor = -16895234;
String hexColor = "#" + Integer.toHexString(intColor).substring(2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment