Creating colors

This is fairly simple, and we have seen this in our previous chapter as well. Simply go to your colors.xml file located in the app/res/values/ folder. Here, you can observe multiple hex color code values. A hex color code represents a six-digit alphanumeric value, which is responsible for giving a color. The value starts from #000000 (black) to #ffffff (white). 

In our colors.xml, if you observe there are already predefined values as seen in the following screenshot:

Hex color code values

In this file, you can tweak in these values or simply add your own values as well. Let's say if you want to add the color red, then you simply ...

Get Learning Android Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.