2 Spectrum Colorpicker v1.8.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 /* Fix for * { box-sizing: border-box; } */
26 -webkit-box-sizing: content-box;
27 -moz-box-sizing: content-box;
28 box-sizing: content-box;
31 /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
60 .sp-clear-enabled .sp-hue {
76 .sp-alpha-enabled .sp-top {
79 .sp-alpha-enabled .sp-alpha {
89 border: 1px solid black;
102 border: solid 1px #333;
109 .sp-clear.sp-clear-display {
110 background-position: center;
113 .sp-clear-enabled .sp-clear {
123 /* Don't allow text selection */
124 .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 {
125 -webkit-user-select:none;
126 -moz-user-select: -moz-none;
131 .sp-container.sp-input-disabled .sp-input-container {
134 .sp-container.sp-buttons-disabled .sp-button-container {
137 .sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
140 .sp-palette-only .sp-picker-container {
143 .sp-palette-disabled .sp-palette-container {
147 .sp-initial-disabled .sp-initial {
152 /* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
154 background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
155 background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
156 background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
157 background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
158 background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
159 background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
160 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
161 filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
164 background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
165 background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
166 background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
167 background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
168 background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
169 background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
170 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
171 filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
175 background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
176 background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
177 background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
178 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));
179 background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
180 background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
183 /* IE filters do not support multiple color stops.
184 Generate 6 divs, line them up, and do two color gradients for each.
189 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
193 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
197 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
201 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
205 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
209 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
213 display: none !important;
217 .sp-cf:before, .sp-cf:after { content: ""; display: table; }
218 .sp-cf:after { clear: both; }
221 /* Mobile devices, make hue slider bigger so it is easier to slide */
222 @media (max-device-width: 480px) {
223 .sp-color { right: 40%; }
224 .sp-hue { left: 63%; }
225 .sp-fill { padding-top: 60%; }
231 border: 1px solid #fff;
245 border: 1px solid #000;
252 Here are the basic themeable display options (colors, fonts, global widths).
253 See http://bgrins.github.io/spectrum/themes/ for instructions.
258 background-color: #ECECEC;
259 border: solid 1px #f0c49B;
262 .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
263 font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
264 -webkit-box-sizing: border-box;
265 -moz-box-sizing: border-box;
266 -ms-box-sizing: border-box;
267 box-sizing: border-box;
272 .sp-color, .sp-hue, .sp-clear {
273 border: solid 1px #666;
277 .sp-input-container {
282 .sp-initial-disabled .sp-input-container {
286 font-size: 12px !important;
291 background:transparent;
296 border: 1px solid orange;
298 .sp-input.sp-validation-error {
299 border: 1px solid red;
302 .sp-picker-container , .sp-palette-container {
306 padding-bottom: 300px;
307 margin-bottom: -290px;
309 .sp-picker-container {
311 border-left: solid 1px #fff;
315 .sp-palette-container {
316 border-right: solid 1px #ccc;
319 .sp-palette-only .sp-palette-container {
323 .sp-palette .sp-thumb-el {
331 border:solid 2px transparent;
333 .sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
334 border-color: orange;
343 border: solid 1px #333;
354 .sp-initial .sp-clear-display {
355 background-position: center;
359 .sp-palette-button-container,
360 .sp-button-container {
364 /* Replacer (the little preview div that shows up instead of the <input>) */
370 display:inline-block;
373 border: solid 1px #91765d;
376 vertical-align: middle;
378 .sp-replacer:hover, .sp-replacer.sp-active {
379 border-color: #F0C49B;
382 .sp-replacer.sp-disabled {
384 border-color: silver;
398 border: solid 1px #222;
408 .sp-palette .sp-thumb-el {
412 border: solid 1px #d0d0d0;
420 /* Buttons: http://hellohappy.org/css3-buttons/ */
421 .sp-container button {
422 background-color: #eeeeee;
423 background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
424 background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
425 background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
426 background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
427 background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
428 border: 1px solid #ccc;
429 border-bottom: 1px solid #bbb;
436 text-shadow: 0 1px 0 #eee;
437 vertical-align: middle;
439 .sp-container button:hover {
440 background-color: #dddddd;
441 background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
442 background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
443 background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
444 background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
445 background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
446 border: 1px solid #bbb;
447 border-bottom: 1px solid #999;
449 text-shadow: 0 1px 0 #ddd;
451 .sp-container button:active {
452 border: 1px solid #aaa;
453 border-bottom: 1px solid #888;
454 -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
455 -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
456 -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
457 -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
458 box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
462 color: #d93f3f !important;
466 vertical-align: middle;
467 text-decoration:none;
471 color: #d93f3f !important;
472 text-decoration: underline;
476 .sp-palette span:hover, .sp-palette span.sp-thumb-active {
480 .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 {
487 top:0;left:0;bottom:0;right:0;
490 .sp-palette .sp-thumb-inner {
491 background-position: 50% 50%;
492 background-repeat: no-repeat;
495 .sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
496 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
499 .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
500 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEM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