Skip to content

Commit 2ace3e0

Browse files
authored
Merge pull request #186 from side-codes/develop
Update index.md
2 parents 220c7b0 + 5bc7a77 commit 2ace3e0

File tree

1 file changed

+27
-89
lines changed

1 file changed

+27
-89
lines changed

docs/index.md

Lines changed: 27 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# andColorPicker — Android color picker
1+
# andColorPicker — Color Picker library for Android
22

3-
*:avocado: Handy, :snake: flexible, and :zap: lightning-fast material Android color picker view components*
3+
:avocado: Handy, :snake: flexible, and :zap: lightning-fast Android color picker views and utilities.
44

55
![andColorPicker logo](https://github.com/side-codes/andColorPicker/raw/master/github/logo.png)
66

7-
:speech_balloon: Work-In-Progress
8-
97
## :pill: Features
108

119
- Clean, easy-to-use components and API
@@ -23,7 +21,7 @@
2321
Gradle dependency:
2422

2523
```gradle
26-
implementation "codes.side:andcolorpicker:0.3.0"
24+
implementation "codes.side:andcolorpicker:0.6.2"
2725
```
2826

2927
## :art: Picker types
@@ -39,7 +37,7 @@ implementation "codes.side:andcolorpicker:0.3.0"
3937
Basic HSL components:
4038
```xml
4139
<codes.side.andcolorpicker.hsl.HSLColorPickerSeekBar
42-
android:id="@+id/hueColorPickerSeekBar"
40+
android:id="@+id/hueSeekBar"
4341
android:layout_width="match_parent"
4442
android:layout_height="wrap_content"
4543
app:hslColoringMode="pure"
@@ -58,37 +56,37 @@ Supported `hslColoringMode` values:
5856
Alpha component:
5957
```xml
6058
<codes.side.andcolorpicker.alpha.HSLAlphaColorPickerSeekBar
61-
android:id="@+id/alphaColorPickerSeekBar"
59+
android:id="@+id/alphaSeekBar"
6260
android:layout_width="match_parent"
6361
android:layout_height="wrap_content" />
6462
```
6563

6664
#### Kotlin Snippet
6765
```kotlin
68-
// Configure picker color model programmatically
69-
hueColorPickerSeekBar.mode = Mode.MODE_HUE // Mode.MODE_SATURATION, Mode.MODE_LIGHTNESS
66+
// Configure color model programmatically
67+
hueSeekBar.mode = Mode.MODE_HUE // Mode.MODE_SATURATION, Mode.MODE_LIGHTNESS
7068

7169
// Configure coloring mode programmatically
72-
hueColorPickerSeekBar.coloringMode = ColoringMode.PURE_COLOR // ColoringMode.OUTPUT_COLOR
70+
hueSeekBar.coloringMode = ColoringMode.PURE_COLOR // ColoringMode.OUTPUT_COLOR
7371

7472
// Group pickers with PickerGroup to automatically synchronize color across them
75-
val pickerGroup = PickerGroup<IntegerHSLColor>().also {
73+
val group = PickerGroup<IntegerHSLColor>().also {
7674
it.registerPickers(
77-
hueColorPickerSeekBar,
78-
saturationColorPickerSeekBar,
79-
lightnessColorPickerSeekBar,
80-
alphaColorPickerSeekBar
75+
hueSeekBar,
76+
saturationSeekBar,
77+
lightnessSeekBar,
78+
alphaSeekBar
8179
)
8280
}
8381

8482
// Get current color immediately
8583
Log.d(
8684
TAG,
87-
"Current color is ${hueColorPickerSeekBar.pickedColor}"
85+
"Current color is ${hueSeekBar.pickedColor}"
8886
)
8987

9088
// Listen individual pickers or groups for changes
91-
pickerGroup.addListener(
89+
group.addListener(
9290
object : HSLColorPickerSeekBar.DefaultOnColorPickListener() {
9391
override fun onColorChanged(
9492
picker: ColorSeekBar<IntegerHSLColor>,
@@ -107,7 +105,7 @@ pickerGroup.addListener(
107105
)
108106

109107
// Set desired color programmatically
110-
pickerGroup.setColor(
108+
group.setColor(
111109
IntegerHSLColor().also {
112110
it.setFromColorInt(
113111
Color.rgb(
@@ -120,53 +118,36 @@ pickerGroup.setColor(
120118
)
121119

122120
// Set color components programmatically
123-
hueColorPickerSeekBar.progress = 50
121+
hueSeekBar.progress = 50
124122
```
125123

126124
### RGB (red, green, blue)
127125

128126
![](https://github.com/side-codes/andColorPicker/raw/master/github/seek_bar_rgb_pure.png)
129127

130-
#### Layout XML Snippet
128+
#### Properties
131129

132-
Basic RGB components:
133-
```xml
134-
<codes.side.andcolorpicker.rgb.RGBColorPickerSeekBar
135-
android:id="@+id/redRGBColorPickerSeekBar"
136-
android:layout_width="match_parent"
137-
android:layout_height="wrap_content"
138-
app:rgbMode="red" />
139-
```
130+
- View name: ```RGBColorPickerSeekBar```
131+
- ```app:rgbMode``` for RGB component selection
140132

141133
### LAB
142134

143135
![](https://github.com/side-codes/andColorPicker/raw/master/github/seek_bar_lab_output.png)
144136

145-
#### Layout XML Snippet
137+
#### Properties
146138

147-
Basic LAB components:
148-
```xml
149-
<codes.side.andcolorpicker.lab.LABColorPickerSeekBar
150-
android:id="@+id/lLABColorPickerSeekBar"
151-
android:layout_width="match_parent"
152-
android:layout_height="wrap_content"
153-
app:labMode="l" />
154-
```
139+
- View name: ```LABColorPickerSeekBar```
140+
- ```app:labMode``` for LAB component selection
155141

156142
### CMYK (cyan, magenta, yellow, key)
157143

158144
![](https://github.com/side-codes/andColorPicker/raw/master/github/seek_bar_cmyk_pure.png)
159145

160-
#### Layout XML Snippet
146+
#### Properties
161147

162-
Basic CMYK components:
163-
```xml
164-
<codes.side.andcolorpicker.cmyk.CMYKColorPickerSeekBar
165-
android:id="@+id/cyanCMYKColorPickerSeekBar"
166-
android:layout_width="match_parent"
167-
android:layout_height="wrap_content"
168-
app:cmykMode="cyan" />
169-
```
148+
- View name: ```CMYKColorPickerSeekBar```
149+
- ```app:cmykMode``` for CMYK component selection
150+
- ```app:cmykColoringMode``` for coloring mode selection
170151

171152
Supported `cmykMode` values:
172153
- `cyan` (default)
@@ -206,49 +187,6 @@ swatchView.setSwatchColor(
206187
)
207188
```
208189

209-
## :rocket: Roadmap
210-
211-
- [ ] Add more picker types
212-
- [x] HLS SeekBars
213-
- [ ] RGB SeekBars
214-
- [ ] RGB circle
215-
- [ ] RGB plane
216-
- [ ] HSV/HSB seekbars
217-
- [x] CMYK SeekBars
218-
- [x] Alpha SeekBars
219-
- [ ] HSL (S+L) plane
220-
- [ ] LAB
221-
- [ ] XYZ
222-
- [ ] YPbPr
223-
- [x] Swatches
224-
- [ ] Extend picker types
225-
- [ ] CMYK SeekBars coloring modes
226-
- [ ] More awesome swatches
227-
- [ ] More supported alpha color models
228-
- [x] Sample buttons -> radios
229-
- [x] Remove sample app child press delays
230-
- [x] Enhance API
231-
- [x] Add XML attributes
232-
- [x] Provide *git-flow*
233-
- [ ] Automate release/publish flow
234-
- [x] Add thumb animation
235-
- [x] Add *MaterialDrawer* & sample fragments
236-
- [x] Add more *HSLColorPickerSeekBar* checks and reduce calls count
237-
- [x] Add more encapsulation to limit picker modification capabilities
238-
- [x] Package repository publish *(Bintray)*
239-
- [ ] Add *Rx* support
240-
- [x] Add/Revisit *RecyclerView* support
241-
- [x] Add sample app icon
242-
- [ ] Add logger solution
243-
- [ ] Add sample app analytics
244-
- [ ] Add GIFs media
245-
- [ ] Add call flow diagram
246-
- [ ] Add tests
247-
- [ ] Add docs
248-
- [ ] Add contribution guidelines
249-
- [x] Add OSS licenses
250-
- [x] Add license
251-
252190
## :memo: License
253191

254192
```

0 commit comments

Comments
 (0)