android_color_generator_classiblogger_image

Colors have always been an indispensable component of every mobile app design. Thanks to the easy availability of amazingly effective tools, it has become feasible for app designers to come up with innovative designs for their mobile applications. One such app designing tool that has worked wonders for a huge population of mobile app designers is Android Color Generator.

An initiative by programmerguru.com, Android Color Generator has become a major necessity for every Android app designer. Keep on reading this post to learn more about the usage of Android Color Generator.

Android Color Generator- What is it exactly?

Android Color Generator is basically an online tool that is used by almost every Android App Development Company for generating Colors.xml for different types of Android applications. With Android Color Generator, you can easily pick your favorite colors and opt for including them in your Android applications. While using Android Color Generator, all you need to do is simply define a color name and value in the colors.xml file which would then be used in Android applications for applying the created colors to Views.

A look at generating colors.xml using Android Color Generator

Here’s the three step process that is being used for generating colors using Android Color Generator:

Step 1- Choose colors from any of the below mentioned sources available with the Android Color Generator:

  • Android Colors(Swatches)
  • HTML Colors
  • Color Picker

Step 2- Review all the chosen colors

In this step, all you need to do is simply review the chosen colors and update the same with auto-generated color names. If required, you can also choose to un-select the chosen colors and edit the auto-generated names for these colors.

Step 3- Generate Android Colors XML and download the same

As the last and final step, you simply need to click on the ‘Generate Colors XML’ button for generating the colors/xml file for the colors that you’ve chosen using the resources that have already been mentioned within the step 1 above.

Also Read: What Gadgets do students like most?

A brief on using Colors.xml in Android applications

Here’s an example of colors.xml where two colors have been defined:

<?xml version=”1.0″ encoding=”utf-8″?>
<resources>

 

</resources>

You simply need to place the aforementioned colors.xml under res/values/folder. The application code that is being utilized for retrieving the color source is shown below:

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

Also, the Layout XML will apply the color to an attribute as explained in the below code snippet:

<TextView android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:textColor= android:text=”Hello”/>

Also Read: Oppo Mobiles Chinese Market Changer

A glimpse at generating colors.xml

Here’s an explanation of some of the most crucial aspects related to creation of colors.xml:

* Colors– While building a colors.xml, a color value is being specified with an RGB value and an alpha channel. Moreover, you can even opt for using the color resource at a location that easily accepts a hexadecimal color value. There’s also an option for using a color resource when the drawable resource is expected to be available in XML. Each of the color value begins with a pound(#) characters, followed by Alpha-Red-Green-Blue information. For example, #RGB, #RRGGBB, #ARGB and #AARRGGBB.

Dimension– Defined in XML, dimension is being specified using a number that’s followed by a unit of measure. For example, 10px, 5sp, 2in etc. Here’s a list of units of measure that are being supported by Android.

sp– An abbreviation for Scale-independent Pixels, sp is just like the dp unit with only one exception that it can be easily scaled in accordance to the user’s font size preference. I would recommend you to use the sp unit while specifying the font sizes, enabling the adjustment for both screen density/resolution as well as the client’s unique preference.

px– An abbreviation for Pixels, px represents the actual pixels on the screen. The reason why designers prefer avoiding px unit is that its representation can easily vary across devices, with only a fewer number of pixels available on the screen.

Also Read: Good Things May Come in Small Package

Wrapping Up

So that was a compilation regarding Android Color Generator. Here’s hoping the details covered above would prove beneficial for you during your Android app designing initiatives. So, go ahead and make a note of all the above mentioned aspects to come up with an Android app that’s capable of standing out from the crowd and impressing one and all.

Recommended: Most Desired Smartphones in India

Author Bio:

Juana Steves is a technical writer for Xicom Ltd – one of the leading Android App Development Companies in India. She can be contacted anytime, in case you are willing to avail Android App Developers for Hire. You will get the best assistance.

Subscribe Here to Get Free Latest Updates

Follow Me

Nirmal Anandh

CEO at RAAM IT Solutions
Hi, this is M Nirmal Anandh from the "Temple City", Madurai. I am the Founder of this blog.My profession is, as a CEO in RAAM IT Solutions. It's about E-Publishing, Data Conversion and Data Entry Projects. you can connect with me @, Google+, Facebook, and LinkedIn.
Nirmal Anandh
Follow Me