-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcolor-picker.css
107 lines (92 loc) · 2.29 KB
/
color-picker.css
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
.color-picker {
display: inline-block;
}
.color-picker .preview {
width: 20px;
height: 20px;
}
.color-picker .preview,
.color-picker .main,
.color-picker .alpha,
.color-picker .hue {
display: inline-block;
position: relative;
border: 1px solid #ccc;
}
.color-picker .main {
cursor: crosshair;
width: 180px;
height: 180px;
}
.color-picker .main .grad {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%), linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
width: 100%;
height: 100%;
}
.color-picker .hue {
cursor: row-resize;
width: 20px;
height: 180px;
background-image: linear-gradient(to top, #F00 0%, #FF0 15%, #0F0 33%, #0FF 50%, #00F 67%, #F0F 84%, #F00 100%);
}
.color-picker .preview {
position: relative;
width: 20px;
height: 20px;
}
.color-picker .cover {
background-color: white;
background-image: linear-gradient(45deg, #555 25%, transparent 25%, transparent), linear-gradient(-45deg, #555 25%, transparent 25%, transparent), linear-gradient(45deg, transparent 75%, #555 75%), linear-gradient(-45deg, transparent 75%, #555 75%);
background-size: 10px 10px;
width: 100%;
height: 100%;
}
.color-picker .alpha {
width: 180px;
background-color: white;
background-image: linear-gradient(45deg, #555 25%, transparent 25%, transparent), linear-gradient(-45deg, #555 25%, transparent 25%, transparent), linear-gradient(45deg, transparent 75%, #555 75%), linear-gradient(-45deg, transparent 75%, #555 75%);
background-size: 10px 10px;
height: 20px;
cursor: col-resize;
}
.color-picker .alphacolor {
height: 100%;
}
.color-picker .alphapos,
.color-picker .huepos,
.color-picker .mainpos {
pointer-events: none
}
.color-picker .mainpos {
width: 6px;
height: 6px;
border-radius: 5px;
border: 1px solid #ccc;
position: absolute;
margin-left: -3px;
margin-top: -3px;
top: 100%;
left: 100%;
box-sizing: border-box;
}
.color-picker .huepos {
width: 100%;
height: 2px;
background-color: black;
position: absolute;
top: 0;
left: 0;
}
.color-picker .alphapos {
height: 100%;
width: 1px;
margin-left: -1px;
background-color: white;
position: absolute;
top: 0;
left: 0;
border-width: 0px 1px;
border-style: solid;
border-color: black;
margin-left: -1px;
}