Bold, graphic, intentional.
Deliberate color choices, edge-to-edge imagery, large-scale typography, and intentional white space create a bold and graphic interface that immerse the user in the experience. -- Google
Of course, no Material Design is complete without Material Colors. This library offers rich and vibrant color palettes for Android and Java Apps. Usage is straightforward and both hex and rgb codes are available.
Load a palette based on already defined themes. For example:
MaterialTheme theme = MaterialTheme.get(Theme.SAHARA);Retrieve the BLUE shade of this theme and set it to a View in your app:
ColorCode materialBlue = theme.getColor(MaterialColor.BLUE);
view.getBackground().setColorFilter(
Color.parseColor(materialBlue.hex),
PorterDuff.Mode.SRC
);Optionally, you can simply select the next shade of color in the current palette:
ColorCode materialColor = theme.getNextColor();Or, select the shade of color directly from color objects defined in material.color package:
import net.usrlib.material.color.Blue;
// Select Blue 500 hex value: #2196F3
String hexValue = Blue._500.hex;compile 'net.usrlib:material-color:0.2'<dependency>
<groupId>net.usrlib</groupId>
<artifactId>material-color</artifactId>
<version>0.2</version>
<type>pom</type>
</dependency><dependency org='net.usrlib' name='material-color' rev='0.2'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>0.2
Color codes are based on the Material Design Color Chart from HtmlColorCodes.com
[Apache 2.0] Apache