├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── MaterialColorPicker.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── manifest-merger-release-report.txt
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── anjithsasindran
│ │ └── materialcolorpicker
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── anjithsasindran
│ │ └── materialcolorpicker
│ │ └── ColorPickerActivity.java
│ └── res
│ ├── drawable-hdpi
│ ├── blue_thumb_default.png
│ ├── blue_thumb_pressed.png
│ ├── green_thumb_default.png
│ ├── green_thumb_pressed.png
│ ├── ic_launcher.png
│ ├── red_thumb_default.png
│ └── red_thumb_pressed.png
│ ├── drawable-mdpi
│ ├── blue_thumb_default.png
│ ├── blue_thumb_pressed.png
│ ├── green_thumb_default.png
│ ├── green_thumb_pressed.png
│ ├── ic_launcher.png
│ ├── red_thumb_default.png
│ └── red_thumb_pressed.png
│ ├── drawable-xhdpi
│ ├── blue_thumb_default.png
│ ├── blue_thumb_pressed.png
│ ├── green_thumb_default.png
│ ├── green_thumb_pressed.png
│ ├── ic_launcher.png
│ ├── red_thumb_default.png
│ └── red_thumb_pressed.png
│ ├── drawable-xxhdpi
│ ├── blue_thumb_default.png
│ ├── blue_thumb_pressed.png
│ ├── green_thumb_default.png
│ ├── green_thumb_pressed.png
│ ├── ic_launcher.png
│ ├── red_thumb_default.png
│ └── red_thumb_pressed.png
│ ├── drawable-xxxhdpi
│ └── ic_launcher.png
│ ├── drawable
│ ├── about_16.xml
│ ├── about_button.xml
│ ├── blue_progress.xml
│ ├── blue_thumb_drawable.xml
│ ├── color_button.xml
│ ├── color_button_16.xml
│ ├── green_progress.xml
│ ├── green_thumb_drawable.xml
│ ├── red_progress.xml
│ └── red_thumb_drawable.xml
│ ├── layout-land
│ ├── layout_16.xml
│ └── layout_color_picker.xml
│ ├── layout
│ ├── dialog.xml
│ ├── dialog_16.xml
│ ├── layout_16.xml
│ └── layout_color_picker.xml
│ ├── menu
│ └── menu_color_picker.xml
│ ├── values-v19
│ └── styles.xml
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
├── about.jpg
├── main.jpg
└── main_land.jpg
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | MaterialColorPicker
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | localhost
107 | 5050
108 |
109 |
110 |
111 |
112 |
113 |
114 | 1.8
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MaterialColorPicker.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Material Color Picker [](https://play.google.com/store/apps/details?id=com.anjithsasindran.materialcolorpicker)
2 | A simple, minimalistic and beautiful color picker for Android 4.1+ devices. App is intended for Web Designers and Developers, who works with colors.
3 |
4 | Features
5 | - Get Hex & RGB color codes
6 | - Set color using RGB values and get HEX codes
7 | - Uses Android Lollipop's setStatusBarColor() to set color of status bar (Notification bar) which changes with change in color palette
8 | - Separate UI for portrait and landscape devices
9 | - Support for pre-lollipop devices
10 |
11 | Download the app from playstore: [Material Color Picker](https://play.google.com/store/apps/details?id=com.anjithsasindran.materialcolorpicker)
12 |
13 | Design inspired from [Dribbble](https://dribbble.com/shots/1858968-Material-Design-colorpicker?list=following&offset=4) by [Lucas Bonomi](http://lucasbonomi.com/)
14 |
15 | Portrait
16 |
17 | 
18 |
19 | Landscape
20 |
21 | 
22 |
23 | #### Author
24 | **Anjith Sasindran**
25 | - https://twitter.com/anjithsasindran
26 | - https://instagram.com/anjithsasindran/
27 | - https://github.com/4k3R
28 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 21
5 | buildToolsVersion "21.1.2"
6 |
7 | defaultConfig {
8 | applicationId "com.anjithsasindran.materialcolorpicker"
9 | minSdkVersion 16
10 | targetSdkVersion 21
11 | versionCode 3
12 | versionName "1.5.1"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:21.0.3'
25 | compile 'com.afollestad:material-dialogs:0.6.2.3'
26 | compile 'com.wefika:flowlayout:0.3.0'
27 | compile "com.mixpanel.android:mixpanel-android:4.5.3"
28 | compile "com.google.android.gms:play-services:6.5.87"
29 | }
30 |
--------------------------------------------------------------------------------
/app/manifest-merger-release-report.txt:
--------------------------------------------------------------------------------
1 | -- Merging decision tree log ---
2 | manifest
3 | ADDED from AndroidManifest.xml:2:1
4 | package
5 | ADDED from AndroidManifest.xml:3:5
6 | INJECTED from AndroidManifest.xml:0:0
7 | INJECTED from AndroidManifest.xml:0:0
8 | android:versionName
9 | INJECTED from AndroidManifest.xml:0:0
10 | INJECTED from AndroidManifest.xml:0:0
11 | xmlns:android
12 | ADDED from AndroidManifest.xml:2:11
13 | android:versionCode
14 | INJECTED from AndroidManifest.xml:0:0
15 | INJECTED from AndroidManifest.xml:0:0
16 | uses-permission#android.permission.INTERNET
17 | ADDED from AndroidManifest.xml:9:9
18 | MERGED from com.mixpanel.android:mixpanel-android:4.5.3:17:5
19 | android:name
20 | ADDED from AndroidManifest.xml:10:13
21 | uses-permission#android.permission.ACCESS_NETWORK_STATE
22 | ADDED from AndroidManifest.xml:15:9
23 | android:name
24 | ADDED from AndroidManifest.xml:16:13
25 | application
26 | ADDED from AndroidManifest.xml:18:5
27 | MERGED from com.android.support:appcompat-v7:21.0.3:16:5
28 | MERGED from com.android.support:support-v4:21.0.3:16:5
29 | MERGED from com.afollestad:material-dialogs:0.6.2.3:12:5
30 | MERGED from com.android.support:appcompat-v7:21.0.3:16:5
31 | MERGED from com.android.support:support-v4:21.0.3:16:5
32 | MERGED from com.wefika:flowlayout:0.3.0:5:5
33 | MERGED from com.mixpanel.android:mixpanel-android:4.5.3:44:5
34 | MERGED from com.google.android.gms:play-services:6.5.87:20:5
35 | MERGED from com.android.support:support-v4:21.0.3:16:5
36 | android:label
37 | ADDED from AndroidManifest.xml:21:9
38 | tools:ignore
39 | ADDED from com.mixpanel.android:mixpanel-android:4.5.3:44:18
40 | android:allowBackup
41 | ADDED from AndroidManifest.xml:19:9
42 | android:icon
43 | ADDED from AndroidManifest.xml:20:9
44 | android:theme
45 | ADDED from AndroidManifest.xml:22:9
46 | activity#com.anjithsasindran.materialcolorpicker.ColorPickerActivity
47 | ADDED from AndroidManifest.xml:23:9
48 | android:label
49 | ADDED from AndroidManifest.xml:25:13
50 | android:name
51 | ADDED from AndroidManifest.xml:24:13
52 | intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
53 | ADDED from AndroidManifest.xml:26:13
54 | action#android.intent.action.MAIN
55 | ADDED from AndroidManifest.xml:27:17
56 | android:name
57 | ADDED from AndroidManifest.xml:27:25
58 | category#android.intent.category.LAUNCHER
59 | ADDED from AndroidManifest.xml:29:17
60 | android:name
61 | ADDED from AndroidManifest.xml:29:27
62 | uses-sdk
63 | INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested
64 | MERGED from com.android.support:appcompat-v7:21.0.3:15:5
65 | MERGED from com.android.support:support-v4:21.0.3:15:5
66 | MERGED from com.afollestad:material-dialogs:0.6.2.3:8:5
67 | MERGED from com.android.support:appcompat-v7:21.0.3:15:5
68 | MERGED from com.android.support:support-v4:21.0.3:15:5
69 | MERGED from com.wefika:flowlayout:0.3.0:3:5
70 | MERGED from com.mixpanel.android:mixpanel-android:4.5.3:11:5
71 | MERGED from com.google.android.gms:play-services:6.5.87:18:5
72 | MERGED from com.android.support:support-v4:21.0.3:15:5
73 | android:targetSdkVersion
74 | INJECTED from AndroidManifest.xml:0:0
75 | INJECTED from AndroidManifest.xml:0:0
76 | tools:ignore
77 | ADDED from com.mixpanel.android:mixpanel-android:4.5.3:14:9
78 | android:minSdkVersion
79 | INJECTED from AndroidManifest.xml:0:0
80 | INJECTED from AndroidManifest.xml:0:0
81 | meta-data#com.google.android.gms.version
82 | ADDED from com.google.android.gms:play-services:6.5.87:21:9
83 | android:value
84 | ADDED from com.google.android.gms:play-services:6.5.87:23:13
85 | android:name
86 | ADDED from com.google.android.gms:play-services:6.5.87:22:13
87 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\Anjith Sasindran\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/anjithsasindran/materialcolorpicker/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.anjithsasindran.materialcolorpicker;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
11 |
15 |
17 |
18 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/anjithsasindran/materialcolorpicker/ColorPickerActivity.java:
--------------------------------------------------------------------------------
1 | package com.anjithsasindran.materialcolorpicker;
2 |
3 | import android.app.Activity;
4 | import android.app.AlertDialog;
5 | import android.content.ClipData;
6 | import android.content.ClipboardManager;
7 | import android.content.Context;
8 | import android.content.DialogInterface;
9 | import android.content.Intent;
10 | import android.content.SharedPreferences;
11 | import android.content.pm.PackageManager;
12 | import android.content.pm.ResolveInfo;
13 | import android.graphics.Color;
14 | import android.graphics.Rect;
15 | import android.net.Uri;
16 | import android.os.Build;
17 | import android.os.Bundle;
18 | import android.view.Display;
19 | import android.view.Surface;
20 | import android.view.View;
21 | import android.view.Window;
22 | import android.view.WindowManager;
23 | import android.widget.Button;
24 | import android.widget.SeekBar;
25 | import android.widget.TextView;
26 | import android.widget.Toast;
27 |
28 | import com.afollestad.materialdialogs.MaterialDialog;
29 | import com.mixpanel.android.mpmetrics.MixpanelAPI;
30 |
31 | import org.json.JSONException;
32 | import org.json.JSONObject;
33 |
34 | import java.util.List;
35 |
36 | public class ColorPickerActivity extends Activity implements SeekBar.OnSeekBarChangeListener {
37 |
38 | public static final String MIXPANEL_TOKEN = "8df466c6bae9ae3c3117de78e1af819d";
39 |
40 | View colorView;
41 | SeekBar redSeekBar, greenSeekBar, blueSeekBar;
42 | TextView redToolTip, greenToolTip, blueToolTip;
43 | Button buttonSelector;
44 | ClipboardManager clipBoard;
45 | ClipData clip;
46 | Window window;
47 | Display display;
48 | int red, green, blue, seekBarLeft;
49 | Rect thumbRect;
50 | AlertDialog alertDialog;
51 | MixpanelAPI mixpanel;
52 | JSONObject props;
53 |
54 | @Override
55 | protected void onCreate(Bundle savedInstanceState) {
56 | super.onCreate(savedInstanceState);
57 |
58 | mixpanel = MixpanelAPI.getInstance(this, MIXPANEL_TOKEN);
59 | props = new JSONObject();
60 |
61 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
62 | setContentView(R.layout.layout_color_picker);
63 | } else {
64 | setContentView(R.layout.layout_16);
65 | }
66 |
67 | display = ((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
68 |
69 | SharedPreferences settings = getSharedPreferences("COLOR_SETTINGS", 0);
70 | red = settings.getInt("RED_COLOR", 0);
71 | green = settings.getInt("GREEN_COLOR", 0);
72 | blue = settings.getInt("BLUE_COLOR", 0);
73 |
74 | clipBoard = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
75 | colorView = findViewById(R.id.colorView);
76 | window = getWindow();
77 |
78 | redSeekBar = (SeekBar)findViewById(R.id.redSeekBar);
79 | greenSeekBar = (SeekBar)findViewById(R.id.greenSeekBar);
80 | blueSeekBar = (SeekBar)findViewById(R.id.blueSeekBar);
81 |
82 | seekBarLeft = redSeekBar.getPaddingLeft();
83 |
84 | redToolTip = (TextView)findViewById(R.id.redToolTip);
85 | greenToolTip = (TextView)findViewById(R.id.greenToolTip);
86 | blueToolTip = (TextView)findViewById(R.id.blueToolTip);
87 |
88 | buttonSelector = (Button)findViewById(R.id.buttonSelector);
89 |
90 | redSeekBar.setOnSeekBarChangeListener(this);
91 | greenSeekBar.setOnSeekBarChangeListener(this);
92 | blueSeekBar.setOnSeekBarChangeListener(this);
93 |
94 | redSeekBar.setProgress(red);
95 | greenSeekBar.setProgress(green);
96 | blueSeekBar.setProgress(blue);
97 |
98 | //Setting View, Status bar & button color & hex codes
99 |
100 | colorView.setBackgroundColor(Color.rgb(red, green, blue));
101 |
102 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
103 |
104 | if (display.getRotation() != Surface.ROTATION_90 && display.getRotation() != Surface.ROTATION_270)
105 | window.setStatusBarColor(Color.rgb(red, green, blue));
106 |
107 | }
108 |
109 | //Set's color hex on Button
110 | buttonSelector.setText(String.format("#%02x%02x%02x", red, green, blue));
111 |
112 | }
113 |
114 | @Override
115 | public void onWindowFocusChanged(boolean hasFocus) {
116 |
117 | thumbRect = redSeekBar.getThumb().getBounds();
118 |
119 | redToolTip.setX(seekBarLeft + thumbRect.left);
120 | if (red<10)
121 | redToolTip.setText(" "+red);
122 | else if (red<100)
123 | redToolTip.setText(" "+red);
124 | else
125 | redToolTip.setText(red+"");
126 |
127 | thumbRect = greenSeekBar.getThumb().getBounds();
128 |
129 | greenToolTip.setX(seekBarLeft + thumbRect.left);
130 | if (green<10)
131 | greenToolTip.setText(" "+green);
132 | else if (red<100)
133 | greenToolTip.setText(" "+green);
134 | else
135 | greenToolTip.setText(green+"");
136 |
137 | thumbRect = blueSeekBar.getThumb().getBounds();
138 |
139 | blueToolTip.setX(seekBarLeft + thumbRect.left);
140 | if (blue<10)
141 | blueToolTip.setText(" "+blue);
142 | else if (blue<100)
143 | blueToolTip.setText(" "+blue);
144 | else
145 | blueToolTip.setText(blue+"");
146 |
147 | }
148 |
149 | @Override
150 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
151 |
152 | if (seekBar.getId() == R.id.redSeekBar) {
153 |
154 | red = progress;
155 | thumbRect = seekBar.getThumb().getBounds();
156 |
157 | redToolTip.setX(seekBarLeft + thumbRect.left);
158 |
159 | if (progress<10)
160 | redToolTip.setText(" " + red);
161 | else if (progress<100)
162 | redToolTip.setText(" "+red);
163 | else
164 | redToolTip.setText(red+"");
165 |
166 | }
167 | else if (seekBar.getId() == R.id.greenSeekBar) {
168 |
169 | green = progress;
170 | thumbRect = seekBar.getThumb().getBounds();
171 |
172 | greenToolTip.setX(seekBar.getPaddingLeft()+thumbRect.left);
173 | if (progress<10)
174 | greenToolTip.setText(" "+green);
175 | else if (progress<100)
176 | greenToolTip.setText(" "+green);
177 | else
178 | greenToolTip.setText(green+"");
179 |
180 | }
181 | else if (seekBar.getId() == R.id.blueSeekBar) {
182 |
183 | blue = progress;
184 | thumbRect = seekBar.getThumb().getBounds();
185 |
186 | blueToolTip.setX(seekBarLeft + thumbRect.left);
187 | if (progress<10)
188 | blueToolTip.setText(" "+blue);
189 | else if (progress<100)
190 | blueToolTip.setText(" "+blue);
191 | else
192 | blueToolTip.setText(blue+"");
193 |
194 | }
195 |
196 | colorView.setBackgroundColor(Color.rgb(red, green, blue));
197 |
198 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
199 |
200 | if (display.getRotation() == Surface.ROTATION_0)
201 | window.setStatusBarColor(Color.rgb(red, green, blue));
202 |
203 | }
204 |
205 | //Setting the button hex color
206 | buttonSelector.setText(String.format("#%02x%02x%02x", red, green, blue));
207 |
208 | }
209 |
210 | @Override
211 | public void onStopTrackingTouch(SeekBar seekBar) {
212 |
213 | }
214 |
215 | @Override
216 | public void onStartTrackingTouch(SeekBar seekBar) {
217 |
218 | }
219 |
220 | public void colorSelect(View view) {
221 |
222 | //Copies color to Clipboard
223 | clip = ClipData.newPlainText("clip", buttonSelector.getText());
224 | clipBoard.setPrimaryClip(clip);
225 |
226 | //Mixpanel event tracker
227 | try {
228 | props.put("Color", buttonSelector.getText());
229 | }
230 | catch(JSONException e) {
231 | e.printStackTrace();
232 | }
233 | mixpanel.track("Color Selected", props);
234 |
235 | Toast.makeText(this, "Color " + buttonSelector.getText() + " copied to clipboard", Toast.LENGTH_SHORT).show();
236 |
237 | }
238 |
239 | public void showDetails(View view) {
240 |
241 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
242 |
243 | View dialogLayout = View.inflate(this, R.layout.dialog, null);
244 |
245 | alertDialog = new AlertDialog.Builder(this)
246 | .setTitle("Material Color Picker")
247 |
248 | .setView(dialogLayout)
249 | .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
250 | public void onClick(DialogInterface dialog, int which) {
251 |
252 | }
253 | })
254 | .show();
255 |
256 | alertDialog.findViewById(R.id.website).setOnClickListener(new View.OnClickListener(){
257 | public void onClick(View view) {
258 | startActivity(new Intent(Intent.ACTION_VIEW)
259 | .setData(Uri.parse("http://www.anjithsasindran.in")));
260 | }
261 | });
262 |
263 | alertDialog.findViewById(R.id.github).setOnClickListener(new View.OnClickListener(){
264 | public void onClick(View view) {
265 | startActivity(new Intent(Intent.ACTION_VIEW)
266 | .setData(Uri.parse("https://github.com/4k3R/material-color-picker")));
267 | }
268 | });
269 |
270 | alertDialog.findViewById(R.id.instagram).setOnClickListener(new View.OnClickListener(){
271 | public void onClick(View view) {
272 | Uri uri = Uri.parse("http://instagram.com/_u/anjithsasindran");
273 | Intent insta = new Intent(Intent.ACTION_VIEW, uri);
274 | insta.setPackage("com.instagram.android");
275 |
276 | PackageManager packageManager = getBaseContext().getPackageManager();
277 | List list = packageManager.queryIntentActivities(insta, PackageManager.MATCH_DEFAULT_ONLY);
278 |
279 | if (list.size()>0) {
280 | startActivity(insta);
281 | }
282 | else {
283 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://instagram.com/anjithsasindran")));
284 | }
285 |
286 | }
287 | });
288 |
289 | alertDialog.findViewById(R.id.dribbble).setOnClickListener(new View.OnClickListener(){
290 | public void onClick(View view) {
291 | startActivity(new Intent(Intent.ACTION_VIEW)
292 | .setData(Uri.parse("https://dribbble.com/shots/1858968-Material-Design-colorpicker?list=users&offset=2")));
293 | }
294 | });
295 |
296 | }
297 | else {
298 |
299 | MaterialDialog.Builder materialDialog = new MaterialDialog.Builder(this);
300 | View dialogLayout = View.inflate(this, R.layout.dialog_16, null);
301 |
302 |
303 | materialDialog.title(R.string.app_name);
304 | materialDialog.customView(dialogLayout, false);
305 | materialDialog.positiveText("OK");
306 | materialDialog.show();
307 |
308 | dialogLayout.findViewById(R.id.website).setOnClickListener(new View.OnClickListener() {
309 | public void onClick(View view) {
310 | startActivity(new Intent(Intent.ACTION_VIEW)
311 | .setData(Uri.parse("http://www.anjithsasindran.in")));
312 | }
313 | });
314 |
315 | dialogLayout.findViewById(R.id.github).setOnClickListener(new View.OnClickListener() {
316 | public void onClick(View view) {
317 | startActivity(new Intent(Intent.ACTION_VIEW)
318 | .setData(Uri.parse("https://github.com/4k3R/material-color-picker")));
319 | }
320 | });
321 |
322 | dialogLayout.findViewById(R.id.instagram).setOnClickListener(new View.OnClickListener() {
323 | public void onClick(View view) {
324 | Uri uri = Uri.parse("http://instagram.com/_u/anjithsasindran");
325 | Intent insta = new Intent(Intent.ACTION_VIEW, uri);
326 | insta.setPackage("com.instagram.android");
327 |
328 | PackageManager packageManager = getBaseContext().getPackageManager();
329 | List list = packageManager.queryIntentActivities(insta, PackageManager.MATCH_DEFAULT_ONLY);
330 |
331 | if (list.size() > 0) {
332 | startActivity(insta);
333 | } else {
334 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://instagram.com/anjithsasindran")));
335 | }
336 |
337 | }
338 | });
339 |
340 | dialogLayout.findViewById(R.id.dribbble).setOnClickListener(new View.OnClickListener() {
341 | public void onClick(View view) {
342 | startActivity(new Intent(Intent.ACTION_VIEW)
343 | .setData(Uri.parse("https://dribbble.com/shots/1858968-Material-Design-colorpicker?list=users&offset=2")));
344 | }
345 | });
346 |
347 | }
348 |
349 | }
350 |
351 | @Override
352 | protected void onDestroy() {
353 | super.onDestroy();
354 |
355 | //Manually flushing selected colors to mixpanel server
356 | mixpanel.flush();
357 |
358 | //Storing values of red, green & blue in SharedPreferences
359 | SharedPreferences settings = getSharedPreferences("COLOR_SETTINGS", 0);
360 | SharedPreferences.Editor editor = settings.edit();
361 | editor.putInt("RED_COLOR", redSeekBar.getProgress());
362 | editor.putInt("GREEN_COLOR", greenSeekBar.getProgress());
363 | editor.putInt("BLUE_COLOR", blueSeekBar.getProgress());
364 | editor.apply();
365 |
366 | //Properly dismissing dialog to prevent errors while changing orientation
367 | try {
368 | if (alertDialog.isShowing()) {
369 | alertDialog.dismiss();
370 | }
371 | }
372 | catch (NullPointerException e) {
373 | //do nothing
374 | }
375 |
376 | }
377 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/blue_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/blue_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/blue_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/blue_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/green_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/green_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/green_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/green_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/red_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/red_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/red_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-hdpi/red_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/blue_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/blue_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/blue_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/blue_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/green_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/green_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/green_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/green_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/red_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/red_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/red_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-mdpi/red_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/blue_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/blue_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/blue_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/blue_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/green_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/green_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/green_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/green_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/red_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/red_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/red_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xhdpi/red_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/blue_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/blue_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/blue_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/blue_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/green_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/green_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/green_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/green_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/red_thumb_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/red_thumb_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/red_thumb_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxhdpi/red_thumb_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
7 |
9 |
10 |
11 |
12 |
13 | -
14 |
15 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_button.xml:
--------------------------------------------------------------------------------
1 |
3 | -
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blue_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
9 |
10 |
11 |
12 | -
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blue_thumb_drawable.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/color_button.xml:
--------------------------------------------------------------------------------
1 |
3 | -
4 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/color_button_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/green_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
9 |
10 |
11 |
12 | -
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/green_thumb_drawable.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/red_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
9 |
10 |
11 |
12 | -
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/red_thumb_drawable.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-land/layout_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
16 |
22 |
23 |
31 |
32 |
41 |
42 |
52 |
53 |
63 |
64 |
74 |
75 |
85 |
86 |
96 |
97 |
108 |
109 |
110 |
111 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-land/layout_color_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
16 |
17 |
23 |
24 |
32 |
33 |
41 |
42 |
52 |
53 |
62 |
63 |
73 |
74 |
83 |
84 |
94 |
95 |
106 |
107 |
108 |
109 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
22 |
23 |
31 |
32 |
40 |
41 |
49 |
50 |
51 |
52 |
59 |
60 |
65 |
66 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
20 |
21 |
29 |
30 |
38 |
39 |
47 |
48 |
49 |
50 |
57 |
58 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
16 |
25 |
26 |
35 |
36 |
46 |
47 |
57 |
58 |
68 |
69 |
79 |
80 |
90 |
91 |
102 |
103 |
104 |
105 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_color_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
16 |
17 |
26 |
27 |
35 |
36 |
46 |
47 |
56 |
57 |
67 |
68 |
77 |
78 |
88 |
89 |
100 |
101 |
102 |
103 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_color_picker.xml:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v19/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #ffffff
5 | #f44336
6 | #4caf50
7 | #2196f3
8 | #b3b3b3
9 | #d9d9d9
10 | #ea4c89
11 | #c32361
12 | #000000
13 | #009688
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Material Color Picker
5 | Hello world!
6 | Settings
7 | Instagram
8 | Github
9 | Website
10 | About
11 | Dribbble
12 | Developed by Anjith Sasindran
13 | Design inspired from Lucas Bonomi
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.0.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/screenshots/about.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/screenshots/about.jpg
--------------------------------------------------------------------------------
/screenshots/main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/screenshots/main.jpg
--------------------------------------------------------------------------------
/screenshots/main_land.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/captswag/material-color-picker/a98e1f94e0a68150fdb61cada330b7a32c6f4ec5/screenshots/main_land.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------