2 Spectrum Colorpicker v1.2.0
3 https://github.com/bgrins/spectrum
4 Author: Brian Grinstead
15 /* https://github.com/bgrins/spectrum/issues/40 */
19 .sp-container.sp-flat {
23 /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
52 .sp-clear-enabled .sp-hue {
68 .sp-alpha-enabled .sp-top {
71 .sp-alpha-enabled .sp-alpha {
81 border: 1px solid black;
94 border: solid 1px #333;
101 .sp-clear.sp-clear-display {
102 background-position: center;
105 .sp-clear-enabled .sp-clear {
115 /* Don't allow text selection */
116 .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
117 -webkit-user-select:none;
118 -moz-user-select: -moz-none;
123 .sp-container.sp-input-disabled .sp-input-container {
126 .sp-container.sp-buttons-disabled .sp-button-container {
129 .sp-palette-only .sp-picker-container {
132 .sp-palette-disabled .sp-palette-container {
136 .sp-initial-disabled .sp-initial {
141 /* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
143 background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
144 background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
145 background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
146 background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
147 background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
148 background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
149 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
150 filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
153 background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
154 background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
155 background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
156 background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
157 background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
158 background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
159 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
160 filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
164 background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
165 background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
166 background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
167 background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
168 background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
171 /* IE filters do not support multiple color stops.
172 Generate 6 divs, line them up, and do two color gradients for each.
177 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
181 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
185 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
189 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
193 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
197 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
201 display: none !important;
205 .sp-cf:before, .sp-cf:after { content: ""; display: table; }
206 .sp-cf:after { clear: both; }
209 /* Mobile devices, make hue slider bigger so it is easier to slide */
210 @media (max-device-width: 480px) {
211 .sp-color { right: 40%; }
212 .sp-hue { left: 63%; }
213 .sp-fill { padding-top: 60%; }
219 border: 1px solid #fff;
233 border: 1px solid #000;
240 Here are the basic themeable display options (colors, fonts, global widths).
241 See http://bgrins.github.io/spectrum/themes/ for instructions.
246 background-color: #ECECEC;
247 border: solid 1px #f0c49B;
250 .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear
252 font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
253 -webkit-box-sizing: border-box;
254 -moz-box-sizing: border-box;
255 -ms-box-sizing: border-box;
256 box-sizing: border-box;
262 .sp-color, .sp-hue, .sp-clear
264 border: solid 1px #666;
268 .sp-input-container {
273 .sp-initial-disabled .sp-input-container {
277 font-size: 12px !important;
282 background:transparent;
287 border: 1px solid orange;
289 .sp-input.sp-validation-error
291 border: 1px solid red;
294 .sp-picker-container , .sp-palette-container
299 padding-bottom: 300px;
300 margin-bottom: -290px;
305 border-left: solid 1px #fff;
309 .sp-palette-container
311 border-right: solid 1px #ccc;
314 .sp-palette .sp-thumb-el {
322 border:solid 2px transparent;
324 .sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
325 border-color: orange;
336 border: solid 1px #333;
347 .sp-initial .sp-clear-display {
348 background-position: center;
352 .sp-button-container {
356 /* Replacer (the little preview div that shows up instead of the <input>) */
362 display:inline-block;
365 border: solid 1px #91765d;
368 vertical-align: middle;
370 .sp-replacer:hover, .sp-replacer.sp-active {
371 border-color: #F0C49B;
374 .sp-replacer.sp-disabled {
376 border-color: silver;
391 border: solid 1px #222;
402 .sp-palette .sp-thumb-el
407 border: solid 1px #d0d0d0;
416 /* Buttons: http://hellohappy.org/css3-buttons/ */
417 .sp-container button {
418 background-color: #eeeeee;
419 background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
420 background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
421 background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
422 background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
423 background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
424 border: 1px solid #ccc;
425 border-bottom: 1px solid #bbb;
432 text-shadow: 0 1px 0 #eee;
433 vertical-align: middle;
435 .sp-container button:hover {
436 background-color: #dddddd;
437 background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
438 background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
439 background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
440 background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
441 background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
442 border: 1px solid #bbb;
443 border-bottom: 1px solid #999;
445 text-shadow: 0 1px 0 #ddd;
447 .sp-container button:active {
448 border: 1px solid #aaa;
449 border-bottom: 1px solid #888;
450 -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
451 -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
452 -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
453 -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
454 box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
459 color: #d93f3f !important;
463 vertical-align: middle;
464 text-decoration:none;
469 color: #d93f3f !important;
470 text-decoration: underline;
474 .sp-palette span:hover, .sp-palette span.sp-thumb-active
479 .sp-preview, .sp-alpha, .sp-thumb-el
482 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
484 .sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner
488 top:0;left:0;bottom:0;right:0;
491 .sp-palette .sp-thumb-inner
493 background-position: 50% 50%;
494 background-repeat: no-repeat;
497 .sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner
499 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
502 .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner
504 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
508 background-repeat:no-repeat;
509 background-position: center;
510 background-image: url(data:image/gif;base64,R0lGODlhFAAU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