Android Faux Photoshop Palette app (i) overview

Source: Internet
Author: User

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

In the previous series I have made a general overview of the principles and use of color rendering in Android. Now it's time to do a detailed analysis based on a more complex implementation, which is the palette app in Photoshop

Let's take a look at the final implementation:

Figure 1

It's much more powerful than the Colorpickerdialog in API demos, and it's perfectly comparable to the palette in Photoshop.

According to this example, you can get the color you want, not just a simple hue selection, but a HSV color and transparency selection.

Here's a look at the principle of color rendering, such as the HSV color space, which I would like to introduce before:

Android Color Rendering (b) The principle of color Region division and the realization Idea

It seems to be difficult to achieve, do not worry, here to introduce an open source project Attenzione, has been very good to achieve the effect of this PS palette

Given that the current GitHub often does not go to the situation, here I will debug a good project has been uploaded, the following is;

http://download.csdn.net/detail/t12x3456/6246509

First look at the project;

Figure 2

From the very beginning, I believe we all see this project is to provide color selection in the form of preference, if need to integrate, just add to the project in the form of library .

Of course, it is very convenient to make the appropriate changes and integrate into the project according to your own needs.

Application class Features:

Alphapatterndrawable: drawable based rewrite, provides transparency for drawing

Colorpickerdialog; Color selection dialog box

Colorpickerpanelview: Color generation and setting custom view

Colorpickerpreference: Color settings

Colorpickerview: color selection Custom View

Fig. 3 Fig. 4

Figure 3 is the implementation of the Colorpickerpreference

Figure 4 is the implementation of the Colorpickerdialog, the red box selected part of the Colorpickerview, the green box is implemented by Colorpickerpanelview, the left to display the real-time color generation results, the right side of the final color settings. Where the transparency selection area is drawn using the alphapatterndrawable

At present, the open source project is an overview, the specific implementation will be detailed analysis later.

Android Faux Photoshop Palette app (i) overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.