Skip to content

Commit 69700bf

Browse files
committed
update README.md
1 parent 36c9b98 commit 69700bf

File tree

1 file changed

+7
-123
lines changed

1 file changed

+7
-123
lines changed

README.md

Lines changed: 7 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Colorpicker With CodeMirror
1+
# Colorpicker With EasyLogic
22

33

44
This project was created to implement a color picker. It implemented basic functions for color and implemented image filters.
@@ -14,31 +14,19 @@ https://colorpicker.easylogic.studio/
1414

1515

1616

17-
# Sample Image
18-
19-
<img width="500px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/screen-shot.png" />
20-
21-
22-
2317
# Install
2418

2519
## npm
2620

2721
```npm
28-
npm install easylogic-colorpicker
22+
npm install @easylogic/colorpicker
2923
```
3024

31-
## bower
32-
33-
```
34-
bower install easylogic-colorpicker
35-
```
3625

3726
# How to use (for browser)
3827

3928
```
40-
<link rel="stylesheet" href="/easylogic-colorpicker/dist/codemirror-colorpciker.css/>
41-
<script src="/easylogic-colorpicker/dist/easylogic-colorpicker.min.js"></script>
29+
<script src="/@easylogic/colorpicker/dist/easylogic-colorpicker.min.js"></script>
4230
```
4331

4432
# How to use (for require, nodejs)
@@ -48,125 +36,21 @@ after npm install
4836
## script
4937

5038
```
51-
require( 'easylogic-colorpicker' );
39+
require( '@easylogic/colorpicker' );
5240
5341
or
5442
5543
// es6
56-
import 'easylogic-colorpicker/dist/easylogic-colorpicker.css'
57-
import 'easylogic-colorpicker'
44+
import '@easylogic/colorpicker/dist/easylogic-colorpicker.css'
45+
import '@easylogic/colorpicker'
5846
```
5947

6048
## style
6149

6250
```
63-
<link rel="stylesheet" href="/node_modules/easylogic-colorpicker/dist/easylogic-colorpicker.css">
64-
```
65-
66-
# ColorPicker Options for CodeMirror
67-
68-
## Set option - View mode
69-
70-
```javascript
71-
{
72-
colorpicker : true
73-
}
74-
```
75-
76-
## Set option - Edit mode (open color picker)
77-
78-
```javascript
79-
{
80-
colorpicker : {
81-
mode : 'edit'
82-
}
83-
}
84-
```
85-
86-
## Support short cut (for popup color picker)
87-
88-
It can open color picker on current cursor.
89-
90-
```javascript
91-
{
92-
colorpicker : {
93-
mode : 'edit'
94-
},
95-
extraKeys : {
96-
// when ctrl+k keys pressed, color picker is able to open.
97-
'Ctrl-K' : function (cm, event) {
98-
cm.state.colorpicker.popup_color_picker();
99-
}
100-
}
101-
}
102-
```
103-
104-
## Support custom color paletts (since v1.5)
105-
106-
You can set custom color paletts (ex : material, ...).
107-
108-
```javascript
109-
{
110-
colorpicker : {
111-
mode : 'edit',
112-
colorSets: [
113-
{ name : 'Material', colors : [ '#ffff', 'rgba(255, 255, 0, 0.5)' ] },
114-
{ name : 'My Colors', colors : [ 'red', 'blue', 'white' ] },
115-
{ name : 'Input Colors', edit: true }, // editable
116-
]
117-
}
118-
}
119-
```
120-
121-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/colorpicker.png" align="absmiddle" />
122-
123-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/colorpaletts.png" align="absmiddle" />
124-
125-
## Support color scale for palette
126-
127-
```javascript
128-
{
129-
colorpicker : {
130-
mode : 'edit',
131-
colorSets: [
132-
{ name : 'Scale Colors', scale: ['red', 'yellow', 'black'], count : 5 },
133-
]
134-
}
135-
}
136-
137-
```
138-
139-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/scalecolors-title.png" align="absmiddle" />
140-
141-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/scalecolors.png" align="absmiddle" />
142-
143-
## Support Sketch Style
144-
145-
```javascript
146-
{
147-
colorpicker : {
148-
mode : 'edit',
149-
type: 'sketch'
150-
}
151-
}
152-
153-
```
154-
155-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/sketch-type.png" align="absmiddle" />
156-
157-
## Support only Palette Style
158-
159-
```javascript
160-
{
161-
colorpicker : {
162-
mode : 'edit',
163-
type: 'palette'
164-
}
165-
}
166-
51+
<link rel="stylesheet" href="/node_modules/@easylogic/colorpicker/dist/easylogic-colorpicker.css">
16752
```
16853

169-
<img width="235px" src="https://easylogic.github.com/easylogic-colorpicker/resources/image/palette-type.png" align="absmiddle" />
17054

17155
# Developments
17256

0 commit comments

Comments
 (0)