Recent Posts

Site Creator

By

By

By

Getting Colour Code from Image in Android : Is it required ?

Posted on

Question : Getting Colour Codes in Android From a Image ? Is it required ?

 

Yes . Not only it is required but also very important for UI Designers to know about colour codes ,to build that stunning UX for the application. Even android studio team understand this so now in the design view of any xml layout you can see colour codes if you have used colours in layout.

 

Now the question arise why we want to do it. The way I see it ( you might have your own opinions)

 

I am a software engineer and always think about how can i make life easier by software programs. Actually I am bit lazy :).

 

So when for the first time i saw colour picker few years back when i was working with Graphics Designing software , that day I though some day i will come up with an app which can work on android device and give color codes taken from image.

 

So thats how i did it in android check below classes. I first picked an image from phone’s gallery. Link to blog Post http://www.relsellglobal.in/android-development/picking-image-from-gallery-gallery-intent-way/.

Then image gets displayed on screen. Then whenever i touched the image or any area inside image , i get a callback in onTouchEvent() callback for Activity. Inside onTouchEvent callback. Remember below is pseudo code.

 

 

A working code of application is available as Link

 

And also you can download an application doing the same from Google play store.







Disclaimer: The aforesaid writeup by Relsell Global writer is for the general understanding of the readers. It does not render any professional advice or opinion.

SHARE THIS PAGE!