colpick.css 9.3 KB

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