Android Color Generator

Android Color Generator is the initiative of to help Android community, is one of the top tutorial sites which writes tutorials on technologies like Android, jQuery, AJAX, JSON and more.

What is Android Color Generator?

It is a free online tool which helps you to create colors.xml. A color name and value are defined in colors.xml which will be used in Android applications to apply colors to Views.

With the help of this tool, you can generate colors.xml with upto 50 colors at a time.

Generate colors.xml in just three steps:

Step 1: Pick colors from Android Swatch, HTML Color chart or Color Picker.

Step 2: Review and update color name of the selected colors.

Step 3: Generate colors.xml and download it.

How to use colors.xml in Andriod applications?

Here is the sample colors.xml which has two colors defined.

Sample Color XML

<?xml version="1.0" encoding="utf-8"?>
    <color name="full_red">#f00</color>
    <color name="half_red">#80ff0000</color>

Where to place colors.xml?

Just place the file under res/values/ folder.

How to use colors defined in colors.xml in Android applications?

Application code retrieves the color resource:

Resources res = getResources();
int color = res.getColor(R.color.full_red);

Layout XML applies the color to an attribute:

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="@color/half_red" android:text="Hello"/>

No of Color XML generated so far:


Steps in generating Android Color XML are:

Step 1: Pick your favorite Colors

Select your favorite colors (Maximum of 50) by clicking on the color cells. Selected colors will be added to the list.

Step 2: Review Selected Colors and update auto generated Color names:

You can now update the auto generated Color names and also unselect the Colors(if needed) from below table. Leave them unchanged if you don't want to update Color names.

Step 3: Generate Android Colors XML and download it:

You are in the final step of generating colors.xml, just click the below button to generate XML.

Share your experience of using this tool right from below. (here)

comments powered by Disqus
Color added to the list