Created
September 22, 2013 14:25
-
-
Save omatt/6660399 to your computer and use it in GitHub Desktop.
Set colors in Java using hex color codes. Generate hex color codes in here - http://hexcolorgenerator.com/
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
Color colorA = new Color(0xFF0096); // Use the hex number syntax | |
Color bColor = Color.decode("0xFF0096"); // or with the use of decode | |
object.setColor(Color.white); | |
setBackground(Color.white); | |
/** Alternatively using hex color codes to expand the color library **/ | |
object.setColor(new Color(0xFF0096)); | |
object.setColor(Color.decode("0xFF0096")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment