colpick.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. /*
  2. colpick Color Picker / colpick.com
  3. */
  4. /*Main container*/
  5. .colpick {
  6. position: absolute;
  7. width: 346px;
  8. height: 170px;
  9. overflow: hidden;
  10. display: none;
  11. font-family: Arial, Helvetica, sans-serif;
  12. background:#ebebeb;
  13. border: 1px solid #bbb;
  14. -webkit-border-radius: 5px;
  15. -moz-border-radius: 5px;
  16. border-radius: 5px;
  17. /*Prevents selecting text when dragging the selectors*/
  18. -webkit-user-select: none;
  19. -moz-user-select: none;
  20. -ms-user-select: none;
  21. -o-user-select: none;
  22. user-select: none;
  23. }
  24. .colpick,
  25. .colpick * {
  26. -moz-box-sizing: content-box;
  27. -webkit-box-sizing: content-box;
  28. box-sizing: content-box;
  29. }
  30. /*Color selection box*/
  31. .colpick_color {
  32. position: absolute;
  33. left: 7px;
  34. top: 7px;
  35. width: 156px;
  36. height: 156px;
  37. overflow: hidden;
  38. outline: 1px solid #aaa;
  39. cursor: crosshair;
  40. }
  41. .colpick_color_overlay1 {
  42. position: absolute;
  43. left:0;
  44. top:0;
  45. width: 156px;
  46. height: 156px;
  47. filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff'); /* IE6 & IE7 */
  48. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')"; /* IE8 */
  49. background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
  50. }
  51. .colpick_color_overlay2 {
  52. position: absolute;
  53. left:0;
  54. top:0;
  55. width: 156px;
  56. height: 156px;
  57. filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000'); /* IE6 & IE7 */
  58. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')"; /* IE8 */
  59. background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1));
  60. }
  61. /*HSL gradients are different*/
  62. .colpick_hsl .colpick_color_overlay1 {
  63. background: linear-gradient(to right, rgba(128,128,128,1) 0%, rgba(128,128,128,0) 100%);
  64. }
  65. .colpick_hsl .colpick_color_overlay2 {
  66. background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0) 50%, rgba(0,0,0,1) 100%);
  67. }
  68. /*Circular color selector*/
  69. .colpick_selector_outer {
  70. background:none;
  71. position: absolute;
  72. width: 11px;
  73. height: 11px;
  74. margin: -6px 0 0 -6px;
  75. border: 1px solid black;
  76. border-radius: 50%;
  77. }
  78. .colpick_selector_inner{
  79. position: absolute;
  80. width: 9px;
  81. height: 9px;
  82. border: 1px solid white;
  83. border-radius: 50%;
  84. }
  85. /*Vertical hue bar*/
  86. .colpick_hue {
  87. position: absolute;
  88. top: 6px;
  89. left: 175px;
  90. width: 19px;
  91. height: 156px;
  92. border: 1px solid #aaa;
  93. cursor: n-resize;
  94. }
  95. /*Hue bar sliding indicator*/
  96. .colpick_hue_arrs {
  97. position: absolute;
  98. left: -8px;
  99. width: 35px;
  100. height: 7px;
  101. margin: -7px 0 0 0;
  102. }
  103. .colpick_hue_larr {
  104. position:absolute;
  105. width: 0;
  106. height: 0;
  107. border-top: 6px solid transparent;
  108. border-bottom: 6px solid transparent;
  109. border-left: 7px solid #858585;
  110. }
  111. .colpick_hue_rarr {
  112. position:absolute;
  113. right:0;
  114. width: 0;
  115. height: 0;
  116. border-top: 6px solid transparent;
  117. border-bottom: 6px solid transparent;
  118. border-right: 7px solid #858585;
  119. }
  120. /*New color box*/
  121. .colpick_new_color {
  122. position: absolute;
  123. left: 207px;
  124. top: 6px;
  125. width: 60px;
  126. height: 27px;
  127. background: #f00;
  128. border: 1px solid #8f8f8f;
  129. }
  130. /*Current color box*/
  131. .colpick_current_color {
  132. position: absolute;
  133. left: 277px;
  134. top: 6px;
  135. width: 60px;
  136. height: 27px;
  137. background: #f00;
  138. border: 1px solid #8f8f8f;
  139. }
  140. /*Input field containers*/
  141. .colpick_field, .colpick_hex_field {
  142. position: absolute;
  143. height: 20px;
  144. width: 60px;
  145. overflow:hidden;
  146. background:#f3f3f3;
  147. color:#b8b8b8;
  148. font-size:12px;
  149. border:1px solid #bdbdbd;
  150. -webkit-border-radius: 3px;
  151. -moz-border-radius: 3px;
  152. border-radius: 3px;
  153. }
  154. .colpick_rgb_r {
  155. top: 40px;
  156. left: 207px;
  157. }
  158. .colpick_rgb_g {
  159. top: 67px;
  160. left: 207px;
  161. }
  162. .colpick_rgb_b {
  163. top: 94px;
  164. left: 207px;
  165. }
  166. .colpick_hsx_h {
  167. top: 40px;
  168. left: 277px;
  169. }
  170. .colpick_hsx_s {
  171. top: 67px;
  172. left: 277px;
  173. }
  174. .colpick_hsx_x {
  175. top: 94px;
  176. left: 277px;
  177. }
  178. .colpick_hex_field {
  179. width: 68px;
  180. left: 207px;
  181. top: 121px;
  182. }
  183. /*Text field container on focus*/
  184. .colpick_focus {
  185. border-color: #999;
  186. }
  187. /*Field label container*/
  188. .colpick_field_letter {
  189. position: absolute;
  190. width: 12px;
  191. height: 20px;
  192. line-height: 20px;
  193. padding-left: 4px;
  194. background: #efefef;
  195. border-right: 1px solid #bdbdbd;
  196. font-weight: bold;
  197. color:#777;
  198. }
  199. /*Text inputs*/
  200. .colpick_field input, .colpick_hex_field input {
  201. position: absolute;
  202. right: 11px;
  203. margin: 0;
  204. padding: 0;
  205. height: 20px;
  206. line-height: 20px;
  207. background: transparent;
  208. border: none;
  209. font-size: 12px;
  210. font-family: Arial, Helvetica, sans-serif;
  211. color: #555;
  212. text-align: right;
  213. outline: none;
  214. }
  215. .colpick_hex_field input {
  216. right: 4px;
  217. }
  218. /*Field up/down arrows*/
  219. .colpick_field_arrs {
  220. position: absolute;
  221. top: 0;
  222. right: 0;
  223. width: 9px;
  224. height: 21px;
  225. cursor: n-resize;
  226. }
  227. .colpick_field_uarr {
  228. position: absolute;
  229. top: 5px;
  230. width: 0;
  231. height: 0;
  232. border-left: 4px solid transparent;
  233. border-right: 4px solid transparent;
  234. border-bottom: 4px solid #959595;
  235. }
  236. .colpick_field_darr {
  237. position: absolute;
  238. bottom:5px;
  239. width: 0;
  240. height: 0;
  241. border-left: 4px solid transparent;
  242. border-right: 4px solid transparent;
  243. border-top: 4px solid #959595;
  244. }
  245. /*Submit/Select button*/
  246. .colpick_submit {
  247. position: absolute;
  248. left: 207px;
  249. top: 149px;
  250. width: 130px;
  251. height: 22px;
  252. line-height:22px;
  253. background: #efefef;
  254. text-align: center;
  255. color: #555;
  256. font-size: 12px;
  257. font-weight:bold;
  258. border: 1px solid #bdbdbd;
  259. -webkit-border-radius: 3px;
  260. -moz-border-radius: 3px;
  261. border-radius: 3px;
  262. }
  263. .colpick_submit:hover {
  264. background:#f3f3f3;
  265. border-color:#999;
  266. cursor: pointer;
  267. }
  268. /*full layout with no submit button*/
  269. .colpick_full_ns .colpick_submit, .colpick_full_ns .colpick_current_color{
  270. display:none;
  271. }
  272. .colpick_full_ns .colpick_new_color {
  273. width: 130px;
  274. height: 25px;
  275. }
  276. .colpick_full_ns .colpick_rgb_r, .colpick_full_ns .colpick_hsx_h {
  277. top: 42px;
  278. }
  279. .colpick_full_ns .colpick_rgb_g, .colpick_full_ns .colpick_hsx_s {
  280. top: 73px;
  281. }
  282. .colpick_full_ns .colpick_rgb_b, .colpick_full_ns .colpick_hsx_x {
  283. top: 104px;
  284. }
  285. .colpick_full_ns .colpick_hex_field {
  286. top: 135px;
  287. }
  288. /*rgbhex layout*/
  289. .colpick_rgbhex .colpick_hsx_h, .colpick_rgbhex .colpick_hsx_s, .colpick_rgbhex .colpick_hsx_x {
  290. display:none;
  291. }
  292. .colpick_rgbhex {
  293. width:282px;
  294. }
  295. .colpick_rgbhex .colpick_field, .colpick_rgbhex .colpick_submit {
  296. width:68px;
  297. }
  298. .colpick_rgbhex .colpick_new_color {
  299. width:34px;
  300. border-right:none;
  301. }
  302. .colpick_rgbhex .colpick_current_color {
  303. width:34px;
  304. left:240px;
  305. border-left:none;
  306. }
  307. /*rgbhex layout, no submit button*/
  308. .colpick_rgbhex_ns .colpick_submit, .colpick_rgbhex_ns .colpick_current_color{
  309. display:none;
  310. }
  311. .colpick_rgbhex_ns .colpick_new_color{
  312. width:68px;
  313. border: 1px solid #8f8f8f;
  314. }
  315. .colpick_rgbhex_ns .colpick_rgb_r {
  316. top: 42px;
  317. }
  318. .colpick_rgbhex_ns .colpick_rgb_g {
  319. top: 73px;
  320. }
  321. .colpick_rgbhex_ns .colpick_rgb_b {
  322. top: 104px;
  323. }
  324. .colpick_rgbhex_ns .colpick_hex_field {
  325. top: 135px;
  326. }
  327. /*hex layout*/
  328. .colpick_hex .colpick_hsx_h, .colpick_hex .colpick_hsx_s, .colpick_hex .colpick_hsx_x, .colpick_hex .colpick_rgb_r, .colpick_hex .colpick_rgb_g, .colpick_hex .colpick_rgb_b {
  329. display:none;
  330. }
  331. .colpick_hex {
  332. width:206px;
  333. height:201px;
  334. }
  335. .colpick_hex .colpick_hex_field {
  336. width:72px;
  337. height:25px;
  338. top:168px;
  339. left:80px;
  340. }
  341. .colpick_hex .colpick_hex_field div, .colpick_hex .colpick_hex_field input {
  342. height: 25px;
  343. line-height: 25px;
  344. }
  345. .colpick_hex .colpick_new_color {
  346. left:9px;
  347. top:168px;
  348. width:30px;
  349. border-right:none;
  350. }
  351. .colpick_hex .colpick_current_color {
  352. left:39px;
  353. top:168px;
  354. width:30px;
  355. border-left:none;
  356. }
  357. .colpick_hex .colpick_submit {
  358. left:164px;
  359. top: 168px;
  360. width:30px;
  361. height:25px;
  362. line-height: 25px;
  363. }
  364. /*hex layout, no submit button*/
  365. .colpick_hex_ns .colpick_submit, .colpick_hex_ns .colpick_current_color {
  366. display:none;
  367. }
  368. .colpick_hex_ns .colpick_hex_field {
  369. width:80px;
  370. }
  371. .colpick_hex_ns .colpick_new_color{
  372. width:60px;
  373. border: 1px solid #8f8f8f;
  374. }
  375. /*Dark color scheme*/
  376. .colpick_dark {
  377. background: #161616;
  378. border-color: #2a2a2a;
  379. }
  380. .colpick_dark .colpick_color {
  381. outline-color: #333;
  382. }
  383. .colpick_dark .colpick_hue {
  384. border-color: #555;
  385. }
  386. .colpick_dark .colpick_field, .colpick_dark .colpick_hex_field {
  387. background: #101010;
  388. border-color: #2d2d2d;
  389. }
  390. .colpick_dark .colpick_field_letter {
  391. background: #131313;
  392. border-color: #2d2d2d;
  393. color: #696969;
  394. }
  395. .colpick_dark .colpick_field input, .colpick_dark .colpick_hex_field input {
  396. color: #7a7a7a;
  397. }
  398. .colpick_dark .colpick_field_uarr {
  399. border-bottom-color:#696969;
  400. }
  401. .colpick_dark .colpick_field_darr {
  402. border-top-color:#696969;
  403. }
  404. .colpick_dark .colpick_focus {
  405. border-color:#444;
  406. }
  407. .colpick_dark .colpick_submit {
  408. background: #131313;
  409. border-color:#2d2d2d;
  410. color:#7a7a7a;
  411. }
  412. .colpick_dark .colpick_submit:hover {
  413. background-color:#101010;
  414. border-color:#444;
  415. }