colpick.css 11 KB

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