BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show color_picker_bg.htm Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download color_picker_bg.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.htm
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <link href="style/editor.css" rel="stylesheet" type="text/css">
  5. <script>
  6.   var sLangDir=dialogArguments[0].oUtil.langDir;
  7.   document.write("<scr"+"ipt src='language/"+sLangDir+"/color.js'></scr"+"ipt>");
  8. </script>
  9. <script>writeTitle()</script>
  10. <script>
  11. //******* COLOR ARRAY (CUSTOM) *********
  12. var dialogArg=dialogArguments[0];
  13. var sName=dialogArguments[1];//color object name
  14.  
  15. var arrColCustoms = eval("dialogArg."+sName).customColors;
  16.  
  17. //******* REAL TIME (CUSTOM) *********
  18. function doWindowFocus()
  19.   {
  20.   dialogArg.oUtil.onSelectionChanged=new Function("realTime()");
  21.   }
  22. function bodyOnLoad()
  23.   {
  24.   window.onfocus=doWindowFocus;
  25.   dialogArg.oUtil.onSelectionChanged=new Function("realTime()");
  26.   realTime()
  27.   }
  28. function realTime()
  29.   {
  30.   if(!dialogArg.oUtil.obj.checkFocus()){return;}//Focus stuff
  31.   var oEditor=dialogArg.oUtil.oEditor;
  32.   if(oEditor.document.queryCommandEnabled("BackColor"))
  33.     {
  34.     if(oEditor.document.queryCommandValue("BackColor")!=null)
  35.       {
  36.       sHex=convertDecToHex2(oEditor.document.queryCommandValue("BackColor"))
  37.       //alert(sHex)//cccccc
  38.       idCurrent.style.backgroundColor=sHex;
  39.       //alert(idCurrent.style.backgroundColor)//#cccccc
  40.       nRed=convertHexToDec(idCurrent.style.backgroundColor.substr(1,2));
  41.       nGreen=convertHexToDec(idCurrent.style.backgroundColor.substr(3,2));
  42.       nBlue=convertHexToDec(idCurrent.style.backgroundColor.substr(5,2));
  43.       if(idCurrent.style.backgroundColor=="")
  44.         {
  45.         nRed="";nGreen="";nBlue="";
  46.         }
  47.       idCurrent.title = "Red: "+nRed+"\nGreen: "+nGreen+"\nBlue: "+nBlue+"\nHex: "+idCurrent.style.backgroundColor;
  48.       }
  49.     }
  50.   }
  51.  
  52. //******* APPLY COLOR (CUSTOM) *********
  53. function doApply()
  54.   {
  55.   if(!dialogArg.oUtil.obj.checkFocus()){return;}//Focus stuff
  56.   var obj=dialogArg.oUtil.obj;
  57.   dialogArg.oUtil.obj.saveForUndo();
  58.   if(chkUseColorName.checked && idColorName.innerText!="")
  59.    obj.applyColor("BackColor",idColorName.innerText);
  60.   else
  61.     obj.applyColor("BackColor",inpHex.value);
  62.   }
  63. function doRemove()
  64.   {
  65.   if(!dialogArg.oUtil.obj.checkFocus()){return;}//Focus stuff
  66.   var oEditor=dialogArg.oUtil.oEditor;
  67.   var oSel=oEditor.document.selection.createRange();
  68.  
  69.   dialogArg.oUtil.obj.saveForUndo();
  70.  
  71.   //oSel.execCommand("BackColor",false,"transparent");
  72.   oSel.execCommand("BackColor",false,"");
  73.  
  74.   dialogArg.realTime(dialogArg.oUtil.oName);
  75.   dialogArg.oUtil.obj.selectElement(0);
  76.   }
  77.  
  78. //******* REFRESH CUSTOM COLOR (CUSTOM) *********
  79. function applyCustomColor()
  80.   {
  81.   for(var i=0;i<22;i++)
  82.    {
  83.    var cellCustom=eval("cellCustom"+i)
  84.    if(cellCustom.style.backgroundColor!="transparent")
  85.      arrColCustoms[i]=cellCustom.style.backgroundColor;
  86.    }
  87.  dialogArg.oUtil.obj.customColors=arrColCustoms;//CUSTOM (apply to public definition)
  88.  eval("dialogArg."+sName).refreshCustomColor();//spy kalo msh show lgs ter-apply
  89.  }
  90.  
  91. //******* TABS *********
  92. var oActiveTab;
  93. function tabClick(n)
  94.  {
  95.  if(!oActiveTab) oActiveTab=tab0;
  96.  var oEl=eval("tab"+n);
  97.  if(oActiveTab==oEl)return;
  98.  oEl.style.cssText="font-weight:bold;font-size:11px;color:gray;padding:5px;padding-left:7;padding-right:7;cursor:default;border:#e0e0e0 2 solid;border-bottom:#FCFCFC 2 solid;background:#FCFCFC";
  99.  oActiveTab.style.cssText="font-weight:bold;font-size:11px;color:gray;padding:5px;padding-left:7;padding-right:7;cursor:hand;border:#e0e0e0 2 solid;"
  100.  oActiveTab=oEl;
  101.  
  102.  if(n==0)
  103.    {
  104.    idWebPallete.style.display="block";
  105.    idNamedColors.style.display="none";
  106.    idWebSafe.style.display="none";
  107.    }
  108.  if(n==1)
  109.    {
  110.    idWebPallete.style.display="none";
  111.    idNamedColors.style.display="block";
  112.    idWebSafe.style.display="none";
  113.    }
  114.  if(n==2)
  115.    {
  116.    idWebPallete.style.display="none";
  117.    idNamedColors.style.display="none";
  118.    idWebSafe.style.display="block";
  119.    }
  120.  }
  121.  
  122. //******* UTILITY *********
  123. function updateHex()
  124.  {
  125.  if(inpRed.value==""||inpGreen.value==""||inpBlue.value=="")
  126.    {
  127.    idPreview.style.backgroundColor="";
  128.    inpHex.value="";
  129.    return;
  130.    }
  131.  try
  132.    {
  133.    inpHex.value=""+
  134.      convertDecToHex(inpRed.value)+
  135.      convertDecToHex(inpGreen.value)+
  136.      convertDecToHex(inpBlue.value);
  137.    idPreview.style.backgroundColor=inpHex.value;
  138.    idColorName.innerText="";
  139.    }
  140.  catch(e){;}
  141.  }
  142. function updateRGB()
  143.  {
  144.  if(inpHex.value=="")
  145.    {
  146.    inpRed.value="";
  147.    inpGreen.value="";
  148.    inpBlue.value="";
  149.    return;
  150.    }
  151.  try
  152.    {
  153.    idPreview.style.backgroundColor=inpHex.value;
  154.    inpRed.value=convertHexToDec(idPreview.style.backgroundColor.substr(1,2));
  155.    inpGreen.value=convertHexToDec(idPreview.style.backgroundColor.substr(3,2));
  156.    inpBlue.value=convertHexToDec(idPreview.style.backgroundColor.substr(5,2));
  157.    idColorName.innerText="";
  158.    }
  159.  catch(e){;}
  160.  }
  161. function convertHexToDec(hex)
  162.  {
  163.  return parseInt(hex,16);
  164.  }
  165. function convertDecToHex(dec)
  166.  {
  167.  var tmp = parseInt(dec).toString(16);
  168.  if(tmp.length == 1) tmp = ("0" +tmp);
  169.  return tmp;//.toUpperCase();
  170.  }
  171. function convertDecToHex2(dec)
  172.  {
  173.  var tmp = parseInt(dec).toString(16);
  174.  
  175.  if(tmp.length == 1) tmp = ("00000" +tmp);
  176.  if(tmp.length == 2) tmp = ("0000" +tmp);
  177.  if(tmp.length == 3) tmp = ("000" +tmp);
  178.  if(tmp.length == 4) tmp = ("00" +tmp);
  179.  if(tmp.length == 5) tmp = ("0" +tmp);
  180.  
  181.  tmp = tmp.substr(4,1) + tmp.substr(5,1) + tmp.substr(2,1) + tmp.substr(3,1) + tmp.substr(0,1) + tmp.substr(1,1)
  182.  return tmp;//.toUpperCase();
  183.  }
  184.  
  185. //******* INIT *********
  186. function init()
  187.  {
  188.  var sHTML="";
  189.  
  190.  //******* Web Pallete *********
  191.  var arrColors=[
  192.      ["#ef001b","#cc0017","#a60012","#83000e","#5c000a","#ef0078","#ce0067","#ad0057","#8b0045","#6a0035","#e301ed","#c501ce","#a401ab","#88018e","#610066","#6716ef","#5913ce","#4b10af","#3e0d90","#2d0a6a"],
  193.      ["#f13449","#d52437","#bb1d2e","#980b1a","#70000c","#f32a8f","#d5207a","#b21162","#970c51","#710039","#e624ef","#cc20d4","#ad10b4","#900995","#6f0374","#7b38ed","#6c2fd2","#5c27b5","#471a94","#391379"],
  194.      ["#f67684","#e36875","#ca5965","#b34e59","#933c45","#f563ac","#de599b","#cc5490","#b24d7f","#96416c","#ee68f4","#db5fe1","#c759cc","#b255b6","#964799","#a779f5","#976cdf","#8d68cc","#7f5eb7","#6f539c"],
  195.      ["#fcc0c6","#eea8af","#dd959c","#ce8c93","#bc858b","#fec7e2","#f4b8d6","#e5a6c6","#d495b4","#bb85a0","#fabffd","#eeaff1","#e19fe4","#cf90d2","#b985bb","#e0c3fd","#d1b1f1","#c1a0e2","#b192d1","#a489c0"],
  196.      ["#fef5f6","#fdeced","#f7dee0","#eacedc","#dec1d0","#fef3f8","#fbe8f1","#efd0e0","#e6c7d6","#d9b8c8","#fef2fe","#fae6fb","#f1d3f2","#e3c1e4","#d8bad9","#f5edfe","#f0e5fb","#e1d3ef","#d9cbe7","#cdbfdc"],
  197.      ["#028b6c","#02775d","#02644e","#015441","#013b2e","#1882ed","#1574d4","#115eab","#0e4f90","#0a3764","#0040eb","#0039d0","#0030b1","#002892","#001b64","#50509e","#46468b","#3a3a73","#303060","#222245"],
  198.      ["#279980","#1c856e","#15705b","#0b5b49","#054637","#3c95ee","#3283d5","#286fb8","#1b5997","#0c3e71","#2a61f3","#1d4ed3","#1640b2","#113699","#022072","#6d6db0","#5d5d99","#4c4c82","#373763","#29294d"],
  199.      ["#69baa7","#61a898","#57998a","#508b7d","#47776c","#7bb8f5","#6ea7e0","#6195c9","#5684b2","#4c7298","#6d92f5","#5f82e0","#5675c9","#4d68b2","#495f9a","#9b9bc9","#8b8bb6","#7e7ea5","#747496","#5f5f7a"],
  200.      ["#d0eae4","#b3d7cf","#9bc4ba","#8fb4ac","#86a49d","#c3dffc","#aacdf0","#9bbde0","#97b4d1","#94acc4","#bdcdfb","#a8bbef","#96aae1","#8a9bcb","#8393c0","#d8d8eb","#c7c7dc","#b5b5cc","#a5a5bc","#9898ac"],
  201.      ["#f0f8f6","#deedea","#d7e6e2","#ceddda","#c8d6d2","#f1f7fe","#e5f0fb","#d8e5f2","#cfdbe7","#c3cfda","#eff3fe","#e5eafa","#dde3f4","#d2d8ea","#c3cadd","#f4f4f9","#e5e5ef","#dbdbe5","#d6d6df","#d1d1d9"],
  202.      ["#00a000","#008d00","#007700","#006000","#004500","#86d800","#73ba00","#629e00","#528400","#395c00","#eded00","#cece00","#afaf00","#909000","#737300","#e3ab00","#c79600","#aa8000","#856400","#604800"],
  203.      ["#27b127","#229c22","#1b881b","#0f6e0f","#085408","#96dc24","#84c220","#6ea515","#5c8b0f","#3f6600","#f1f12c","#d3d31b","#b2b211","#959509","#747403","#e8b827","#cda220","#b18a15","#8c6c0a","#6e5300"],
  204.      ["#68c868","#5cb65c","#56a456","#4b924b","#488248","#b7e768","#a8d45f","#97c056","#86aa4d","#718e41","#f1f164","#e1e15d","#caca58","#b2b24d","#979746","#eecc65","#dabc5e","#c7ac59","#b09850","#948044"],
  205.      ["#c6ecc6","#addead","#96cd96","#87b987","#87b087","#e1f6c0","#d0eba6","#c1d99a","#b1c88c","#a4b786","#fbfbad","#f1f194","#e2e28e","#cece8c","#b9b982","#faeaba","#f2dfa7","#e6d090","#cbbb8b","#b6a778"],
  206.      ["#eef9ee","#dff1df","#d5e8d5","#c6dbc6","#bed1be","#f1fbe2","#e9f5d5","#dfebcd","#d4e1c0","#c9d5b6","#fefef0","#fafae3","#f0f0cb","#e4e4c5","#dadaba","#fdf8ea","#f9f2de","#eee4c7","#dfd7bf","#d6cfb7"],
  207.      ["#818181","#676767","#494949","#272727","#000000","#783c00","#673300","#562b00","#472300","#341a00","#eb4600","#cd3d00","#ad3300","#8f2a00","#671e00","#ed7700","#d26900","#af5800","#904800","#643200"],
  208.      ["#989898","#838383","#646464","#515151","#2f2f2f","#8c5927","#7c4f23","#673f19","#583616","#402408","#eb5f26","#d1521e","#b34315","#95330a","#702303","#f08c28","#d47a20","#b96816","#954f09","#713902"],
  209.      ["#c9c9c9","#a9a9a9","#919191","#787878","#565656","#af8b68","#a28264","#917458","#856d55","#715c49","#f19068","#dd8561","#c97654","#b47053","#985d45","#f5ac63","#e1a05f","#ca9259","#b78451","#966b41"],
  210.      ["#efefef","#dcdcdc","#c1c1c1","#9d9d9d","#828282","#dbcab9","#ccb8a5","#bda792","#a3917f","#9a8979","#fbcebc","#f1bba5","#e1aa93","#ce9f8b","#b18b7b","#fcd7b3","#f3caa2","#e7b98c","#c8a078","#b29171"],
  211.      ["#ffffff","#f7f7f7","#ededed","#dddddd","#c9c9c9","#f4efeb","#efe8e1","#e6ded6","#dbd3cc","#d0c9c2","#fef5f2","#fae8e1","#f0dbd3","#e1cbc2","#d6beb5","#fef7f0","#faecde","#f1e2d3","#e3d3c3","#dacaba"]
  212.      ]
  213.  
  214.  sHTML+="<table cellpadding=0 cellspacing=0 border=0 style=\"border-collapse:collapse\">";
  215.   for(var i=0;i<arrColors.length;i++)
  216.    {
  217.    sHTML+="<tr>";
  218.     for(var j=0;j<arrColors[i].length;j++)
  219.      {
  220.      sHTML+="<td id=\"cell"+i+j+"\" onclick=\"setColor(this)\" style=\"cursor:hand;width:17px;height:12px;background:"+arrColors[i][j]+"\"></td>";
  221.       }
  222.     sHTML+="</tr>";  
  223.     }
  224.   sHTML+="</table>";
  225.  
  226.   idWebPallete.innerHTML=sHTML;
  227.  
  228.   //******* 22 Custom Colors *********  
  229.   sHTML="<table cellpadding=0 cellspacing=0 border=0>";
  230.   sHTML+="<tr>";
  231.   for(var i=0;i<22;i++)
  232.    {
  233.    sHTML+="<td style='border:white 1px solid;padding:1px'>";
  234.     if(i<arrColCustoms.length)
  235.      sHTML+="<table cellpadding=0 cellspacing=0 id=\"cellCustom"+i+"\" onclick=\"setCustomColor(this)\" style=\"cursor:hand;width:12;height:12;background:"+arrColCustoms[i]+"\"><tr><td></td></tr></table>";
  236.     else
  237.       sHTML+="<table cellpadding=0 cellspacing=0 id=\"cellCustom"+i+"\" onclick=\"setCustomColor(this)\" style=\"width:12;height:12;background-color:transparent\"><tr><td></td></tr></table>";
  238.     sHTML+="</td>";
  239.     }
  240.   sHTML+="</tr>";
  241.   sHTML+="</table>";
  242.  
  243.   idColorCustom.innerHTML=sHTML;  
  244.  
  245.   //******* Named Colors *********
  246.   var arrNamedColors=[
  247.         ["#000000","#800000","#ff0000","#8b4513","#d2b48c","#b8860b","#556b2f","#006400","#2e8b57","#2f4f4f","#5f9ea0","#191970","#483d8b","#4b0082","#800080","#dc143c"],
  248.         ["#696969","#8b0000","#ff4500","#a0522d","#deb887","#daa520","#6b8e23","#008000","#3cb371","#008080","#00ced1","#000080","#4682b4","#8a2be2","#8b008b","#c71585"],
  249.         ["#808080","#a52a2a","#ff6347","#d2691e","#f5deb3","#bdb76b","#808000","#228b22","#8fbc8f","#008b8b","#00bfff","#00008b","#708090","#9932cc","#da70d6","#db7093"],
  250.         ["#a9a9a9","#b22222","#ff7f50","#cd853f","#ffdead","#f0e68c","#9acd32","#32cd32","#66cdaa","#20b2aa","#87cefa","#0000cd","#778899","#9400d3","#ee82ee","#ff1493"],
  251.         ["#c0c0c0","#cd5c5c","#ff8c00","#bc8f8f","#ffe4b5","#eee8aa","#ffd700","#00ff00","#00ff7f","#48d1cc","#87ceeb","#0000ff","#6a5acd","#ba55d3","#ff00ff","#ff69b4"],
  252.         ["#d3d3d3","#f08080","#f4a460","#e9967a","#ffebcd","#fffacd","#ffff00","#7cfc00","#00fa9a","#40e0d0","#add8e6","#4169e1","#7b68ee","#dda0dd","#ff00ff","#ffb6c1"],
  253.         ["#dcdcdc","#fa8072","#ffa500","#ffe4e1","#ffefd5","#fff8dc","#fafad2","#7fff00","#90ee90","#00ffff","#b0e0e6","#1e90ff","#9370db","#d8bfd8","#e6e6fa","#ffc0cb"],
  254.         ["#f5f5f5","#ffa07a","#ffdab9","#faebd7","#fdf5e6","#fffaf0","#ffffe0","#adff2f","#98fb98","#00ffff","#afeeee","#6495ed","#b0c4de","#f0ffff","#f8f8ff","#fff0f5"],
  255.         ["#fffafa","#ffffff","#ffe4c4","#fff5ee","#faf0e6","#fffff0","#f5f5dc","#f5fffa","#f0fff0","#7fffd4","#e0ffff","#f0f8ff","","","",""]
  256.         ]
  257.   var arrNamedColors2=[
  258.         ["Black","Maroon","Red","SaddleBrown","Tan","DarkGoldenrod","DarkOliveGreen","DarkGreen","SeaGreen","DarkSlateGray","CadetBlue","MidnightBlue","DarkSlateBlue","Indigo","Purple","Crimson"],
  259.         ["DimGray","DarkRed","OrangeRed","Sienna","Burlywood","Goldenrod","OliveDrab","Green","MediumSeaGreen","Teal","DarkTurquoise","Navy","SteelBlue","BlueViolet","DarkMagenta","MediumVioletRed"],
  260.         ["Gray","Brown","Tomato","Chocolate","Wheat","DarkKhaki","Olive","ForestGreen","DarkSeaGreen","DarkCyan","DeepSkyBlue","DarkBlue","SlateGray","DarkOrchid","Orchid","PaleVioletRed"],
  261.         ["DarkGray","FireBrick","Coral","Peru","NavajoWhite","Khaki","YellowGreen","LimeGreen","MediumAquamarine","LightSeaGreen","LightSkyBlue","MediumBlue","LightSlateGray","DarkViolet","Violet","DeepPink"],
  262.         ["Silver","IndianRed","DarkOrange","RosyBrown","Moccasin","PaleGoldenrod","Gold","Lime","SpringGreen","MediumTurquoise","SkyBlue","Blue","SlateBlue","MediumOrchid","Fuchsia","HotPink"],
  263.         ["LightGrey","LightCoral","SandyBrown","DarkSalmon","BlanchedAlmond","LemonChiffon","Yellow","LawnGreen","MediumSpringGreen","Turquoise","LightBlue","RoyalBlue","MediumSlateBlue","Plum","Fuchsia","LightPink"],
  264.         ["Gainsboro","Salmon","Orange","MistyRose","PapayaWhip","Cornsilk","LightGoldenrodYellow","Chartreuse","LightGreen","Aqua","PowderBlue","DodgerBlue","MediumPurple","Thistle","Lavender","Pink"],
  265.         ["WhiteSmoke","LightSalmon","PeachPuff","AntiqueWhite","Oldlace","FloralWhite","LightYellow","GreenYellow","PaleGreen","Aqua","PaleTurquoise","CornflowerBlue","LightSteelBlue","Azure","GhostWhite","LavenderBlush"],
  266.         ["Snow","White","Bisque","Seashell","Linen","Ivory","Beige","MintCream","Honeydew","Aquamarine","LightCyan","AliceBlue","","","",""]
  267.         ]
  268.  
  269.   sHTML="<table align=center cellpadding=0 cellspacing=0 style=\"border-collapse:collapse\">";
  270.   for(var i=0;i<arrNamedColors.length;i++)
  271.    {
  272.    sHTML+="<tr>";
  273.     for(var j=0;j<arrNamedColors[i].length;j++)
  274.      {
  275.      if(arrNamedColors[i][j]=="")
  276.        sHTML+="<td></td>"
  277.       else
  278.         sHTML+="<td id=\"cellNamed"+i+j+"\" onclick=\"setColor2(this,'"+arrNamedColors2[i][j]+"')\" style=\"cursor:hand;width:22px;height:20px;background:"+arrNamedColors[i][j]+";border:white 5px solid;\"></td>";
  279.       }
  280.     sHTML+="</tr>";  
  281.     }
  282.   sHTML+="</table>";
  283.  
  284.   sHTML+="<table width=100% cellpadding=0 cellspacing=0>";
  285.   sHTML+="<tr><td align=right>"+ getTxt("Use Color Name") +" <input type=checkbox name=chkUseColorName onclick=useColorName()><br>";
  286.   sHTML+="<span id=idColorName style='font-weight:bold;padding-right:2px;display:none'></span>";
  287.   sHTML+="</td></tr></table>";
  288.  
  289.   idNamedColors.innerHTML=sHTML;  
  290.  
  291.   //******* Safe Colors *********
  292.   show()
  293.   }
  294.  
  295. //******* SET COLOR *********
  296. function setColor(oEl)
  297.   {
  298.   inpHex.value=oEl.style.backgroundColor.substring(1);
  299.   updateRGB();//sekaligus preview
  300.  
  301.   idColorName.innerText="";
  302.   }
  303. function setColor2(oEl,sColorName)
  304.   {
  305.   inpHex.value=oEl.style.backgroundColor.substring(1);
  306.   updateRGB();//sekaligus preview
  307.  
  308.   idColorName.innerText=sColorName;
  309.  
  310.   if(chkUseColorName.checked)
  311.     idColorName.style.display="block";
  312.   else
  313.     idColorName.style.display="none";
  314.   }
  315. function useColorName()
  316.   {
  317.   if(chkUseColorName.checked)
  318.     idColorName.style.display="block";
  319.   else
  320.     idColorName.style.display="none";
  321.   }
  322.  
  323. //******* CUSTOM COLORS *********
  324. var oActiveCustomColor;
  325. var iActiveCustomColor=arrColCustoms.length;
  326. function setCustomColor(oEl)
  327.   {
  328.   if(oEl.style.backgroundColor=="transparent")return;
  329.  
  330.   //toggle:
  331.  
  332.   if(oEl.parentElement.style.border=="gray 1px solid")
  333.     {
  334.     oEl.parentElement.style.border= "white 1px solid";
  335.     oActiveCustomColor=null;
  336.     return;
  337.     }
  338.  
  339.   if(oActiveCustomColor)oActiveCustomColor.parentElement.style.border="white 1px solid";
  340.   oEl.parentElement.style.border="gray 1px solid";
  341.   oActiveCustomColor=oEl
  342.   setColor(oEl)
  343.   }
  344. function addToCustomColors()
  345.   {
  346.   if(oActiveCustomColor)
  347.     oActiveCustomColor.style.backgroundColor=idPreview.style.backgroundColor;
  348.   else
  349.     {
  350.     if(iActiveCustomColor==22)iActiveCustomColor=0;
  351.     var cellCustom=eval("cellCustom"+iActiveCustomColor)
  352.     cellCustom.style.backgroundColor=idPreview.style.backgroundColor;
  353.     cellCustom.style.cursor="hand";
  354.     iActiveCustomColor++;
  355.     }
  356.   }
  357.  
  358. //******* WEB SAFE COMPOSITION *********
  359. function show()
  360.   {
  361.   nTopInt=15;
  362.   nLeftInt=15;
  363.   nTopInt2=18;
  364.   nLeftInt2=39;
  365.   nTop=100;
  366.   nLeft=100;
  367.  
  368.   var sHTML="";
  369.  
  370.   sHTML+=drawPlate("00FF",nLeft+(5*nLeftInt),nTop+(-5*nTopInt),"11");
  371.  
  372.   sHTML+=drawPlate("00CC",nLeft+(4*nLeftInt),nTop+(-4*nTopInt),"10");
  373.   sHTML+=drawPlate("33FF",nLeft+(4*nLeftInt)+(1*nLeftInt2),nTop+(-4*nTopInt)+(1*nTopInt2),"");  
  374.  
  375.   sHTML+=drawPlate("0099",nLeft+(3*nLeftInt),nTop+(-3*nTopInt),"9");
  376.   sHTML+=drawPlate("33CC",nLeft+(3*nLeftInt)+(1*nLeftInt2),nTop+(-3*nTopInt)+(1*nTopInt2),"");
  377.   sHTML+=drawPlate("66FF",nLeft+(3*nLeftInt)+(2*nLeftInt2),nTop+(-3*nTopInt)+(2*nTopInt2),"");
  378.  
  379.   sHTML+=drawPlate("0066",nLeft+(2*nLeftInt),nTop+(-2*nTopInt),"8");
  380.   sHTML+=drawPlate("3399",nLeft+(2*nLeftInt)+(1*nLeftInt2),nTop+(-2*nTopInt)+(1*nTopInt2),"");
  381.   sHTML+=drawPlate("66CC",nLeft+(2*nLeftInt)+(2*nLeftInt2),nTop+(-2*nTopInt)+(2*nTopInt2),"");
  382.   sHTML+=drawPlate("99FF",nLeft+(2*nLeftInt)+(3*nLeftInt2),nTop+(-2*nTopInt)+(3*nTopInt2),"");  
  383.  
  384.   sHTML+=drawPlate("0033",nLeft+(1*nLeftInt),nTop+(-1*nTopInt),"7");
  385.   sHTML+=drawPlate("3366",nLeft+(1*nLeftInt)+(1*nLeftInt2),nTop+(-1*nTopInt)+(1*nTopInt2),"");
  386.   sHTML+=drawPlate("6699",nLeft+(1*nLeftInt)+(2*nLeftInt2),nTop+(-1*nTopInt)+(2*nTopInt2),"");
  387.   sHTML+=drawPlate("99CC",nLeft+(1*nLeftInt)+(3*nLeftInt2),nTop+(-1*nTopInt)+(3*nTopInt2),"");
  388.   sHTML+=drawPlate("CCFF",nLeft+(1*nLeftInt)+(4*nLeftInt2),nTop+(-1*nTopInt)+(4*nTopInt2),"");  
  389.  
  390.   sHTML+=drawPlate("0000",nLeft,nTop,"6");
  391.   sHTML+=drawPlate("3333",nLeft+(1*nLeftInt2),nTop+(1*nTopInt2),"");
  392.   sHTML+=drawPlate("6666",nLeft+(2*nLeftInt2),nTop+(2*nTopInt2),"");
  393.   sHTML+=drawPlate("9999",nLeft+(3*nLeftInt2),nTop+(3*nTopInt2),"");
  394.   sHTML+=drawPlate("CCCC",nLeft+(4*nLeftInt2),nTop+(4*nTopInt2),"");
  395.   sHTML+=drawPlate("FFFF",nLeft+(5*nLeftInt2),nTop+(5*nTopInt2),"");
  396.  
  397.   sHTML+=drawPlate("3300",nLeft+(-1*nLeftInt),nTop+(1*nTopInt),"5");
  398.   sHTML+=drawPlate("6633",nLeft+(-1*nLeftInt)+(1*nLeftInt2),nTop+(1*nTopInt)+(1*nTopInt2),"");
  399.   sHTML+=drawPlate("9966",nLeft+(-1*nLeftInt)+(2*nLeftInt2),nTop+(1*nTopInt)+(2*nTopInt2),"");
  400.   sHTML+=drawPlate("CC99",nLeft+(-1*nLeftInt)+(3*nLeftInt2),nTop+(1*nTopInt)+(3*nTopInt2),"");
  401.   sHTML+=drawPlate("FFCC",nLeft+(-1*nLeftInt)+(4*nLeftInt2),nTop+(1*nTopInt)+(4*nTopInt2),"");  
  402.  
  403.   sHTML+=drawPlate("6600",nLeft+(-2*nLeftInt),nTop+(2*nTopInt),"4");
  404.   sHTML+=drawPlate("9933",nLeft+(-2*nLeftInt)+(1*nLeftInt2),nTop+(2*nTopInt)+(1*nTopInt2),"");
  405.   sHTML+=drawPlate("CC66",nLeft+(-2*nLeftInt)+(2*nLeftInt2),nTop+(2*nTopInt)+(2*nTopInt2),"");
  406.   sHTML+=drawPlate("FF99",nLeft+(-2*nLeftInt)+(3*nLeftInt2),nTop+(2*nTopInt)+(3*nTopInt2),"");
  407.  
  408.   sHTML+=drawPlate("9900",nLeft+(-3*nLeftInt),nTop+(3*nTopInt),"3");
  409.   sHTML+=drawPlate("CC33",nLeft+(-3*nLeftInt)+(1*nLeftInt2),nTop+(3*nTopInt)+(1*nTopInt2),"");
  410.   sHTML+=drawPlate("FF66",nLeft+(-3*nLeftInt)+(2*nLeftInt2),nTop+(3*nTopInt)+(2*nTopInt2),"");  
  411.  
  412.   sHTML+=drawPlate("CC00",nLeft+(-4*nLeftInt),nTop+(4*nTopInt),"2");
  413.   sHTML+=drawPlate("FF33",nLeft+(-4*nLeftInt)+(1*nLeftInt2),nTop+(4*nTopInt)+(1*nTopInt2),"");
  414.  
  415.   sHTML+=drawPlate("FF00",nLeft+(-5*nLeftInt),nTop+(5*nTopInt),"1");
  416.  
  417.   idWebSafe.innerHTML=sHTML;
  418.   }
  419.  
  420. function drawPlate(C,nLeft,nTop,num)
  421.   {
  422.   var sHTML="";
  423.   arrC = new Array("FF","CC","99","66","33","00");
  424.   sHTML+="<table id='id"+C+"' cellpadding=0 cellspacing=0 style='table-layout: fixed;position:absolute;top:"+nTop+";left:"+nLeft+"'>";
  425.   for(var i=0;i<arrC.length;i++)
  426.    {
  427.    if(C=="FF99"||C=="CC99"||C=="9999"||C=="99CC"||C=="99FF"|| C=="FFCC"||C=="CCCC"||C=="CCFF"||C=="FFFF")
  428.      sHTML+="<tr><td onclick=\"setColor(this)\" style='cursor:hand;width:25;height:8;background:#"+C+arrC[i]+";'>&nbsp;</td></tr>";
  429.     else
  430.       sHTML+="<tr><td onclick=\"setColor(this)\" style='cursor:hand;width:25;height:8;background:#"+C+arrC[i]+";'>&nbsp;</td></tr>";
  431.     }
  432.   sHTML+="</table>";
  433.   return sHTML;
  434.   }
  435. </script>
  436. </head>
  437. <body onload="loadTxt();init();bodyOnLoad()" style="margin:5;margin-top:11;margin-right:8">
  438.  
  439. <table cellpadding=0 cellspacing=0 border=0>
  440. <tr>
  441. <td></td>
  442. <td>
  443.   <table align=right cellpadding=0 cellspacing=0 style="border-collapse:collapse">
  444.   <tr>
  445.   <td width=100% style="border-bottom:#e0e0e0 2 solid;"></td>
  446.   <td id=tab0 onclick="tabClick(0)" nowrap style="font-weight:bold;font-size:11px;color:gray;padding:5px;padding-left:7;padding-right:7;cursor:default;border:#e0e0e0 2 solid;border-bottom:#FCFCFC 2 solid;background:#FCFCFC"><span id=txtLang name=txtLang>Web Pallete</span></td>
  447.   <td id=tab1 onclick="tabClick(1)" nowrap style="font-weight:bold;font-size:11px;color:gray;padding:5px;padding-left:7;padding-right:7;cursor:hand;border:#e0e0e0 2 solid;"><span id=txtLang name=txtLang>Named Colors</span></td>
  448.   <td id=tab2 onclick="tabClick(2)" nowrap style="font-weight:bold;font-size:11px;color:gray;padding:5px;padding-left:7;padding-right:7;cursor:hand;border:#e0e0e0 2 solid;"><span id=txtLang name=txtLang>216 Web Safe</span></td>
  449.   </tr>
  450.   </table>
  451. </td>
  452. </tr>
  453. <tr>
  454. <td valign=top style="padding-right:2">
  455.   <table>
  456.   <tr><td align=right>R:<INPUT type="text" NAME="inpRed" class=inpTxt style="text-align:right" size=1 onblur="updateHex()"></td></tr>
  457.   <tr><td align=right>G:<INPUT type="text" NAME="inpGreen" class=inpTxt style="text-align:right" size=1 onblur="updateHex()"></td></tr>
  458.   <tr><td align=right>B:<INPUT type="text" NAME="inpBlue" class=inpTxt style="text-align:right" size=1 onblur="updateHex()"></td></tr>
  459.   <tr><td nowrap># <INPUT type="text" NAME="inpHex" class=inpTxt style="text-align:right;width:37px" onblur="updateRGB()"></td></tr>
  460.   <tr><td style="height:5px"></td></tr>
  461.   <tr><td align=right><div style="width:40px" align=center id=txtLang name=txtLang>New</div></td></tr>
  462.   <tr><td align=right><div style="padding:3;background:white;width:40px;height:33px;padding:3"><span id=idPreview style="width:37px;height:30px;background-color:white"></span></div></td></tr>
  463.   <tr><td align=right><div style="padding:3;background:white;width:40px;height:33px;padding:3"><span id=idCurrent style="width:37px;height:30px;background-color:white"></span></div></td></tr>
  464.   <tr><td align=right><div style="width:40px" align=center id=txtLang name=txtLang>Current</div></td></tr>
  465.   </table>
  466. </td>
  467. <td>
  468.   <div id="idWebPallete" style="padding:5;background:#FCFCFC;border:#e0e0e0 2 solid;border-top:none;width:354;height:252"></div>
  469.  
  470.   <div id="idNamedColors" style="display:none;padding:5;background:#FCFCFC;border:#e0e0e0 2 solid;border-top:none;width:354;height:252"></div>
  471.  
  472.   <div id="idWebSafe" style="display:none;overflow:auto;padding:5;background:#FCFCFC;border:#e0e0e0 2 solid;border-top:none;width:354;height:252"></div>
  473. </td>
  474. </tr>
  475. <tr>
  476.   <td>&nbsp;</td>
  477.   <td>
  478.     <table width=100% cellpadding=0 cellspacing=0>
  479.     <tr>
  480.     <td style="padding:3;padding-bottom:4" valign=bottom><span id=txtLang name=txtLang>Custom colors</span>:</td>
  481.     <td style="padding:3;padding-right:0" align=right><INPUT type="button" style="width:240px" name=btnAddToCustom id=btnAddToCustom value="Add to Custom Colors" onclick="addToCustomColors()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'"></td>
  482.     </tr>
  483.     </table>  
  484.   </td>
  485. </tr>
  486. <tr>
  487. <td>&nbsp;</td>
  488. <td>
  489.   <div style="padding:1;background:white">
  490.   <div id="idColorCustom"></div>
  491.   </div>
  492. </td>
  493. </tr>
  494. <tr>
  495. <td colspan=2 style="padding-top:10" align=right>
  496. <INPUT type="button" name=btnCancel id=btnCancel onclick="self.close()" value=" cancel " class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  497. <INPUT type="button" name=btnRemove id=btnRemove onclick="doRemove();self.close()" value=" remove color " class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  498. <INPUT type="button" name=btnApply id=btnApply onclick="applyCustomColor();doApply()" value=" apply " class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  499. <INPUT type="button" name=btnOk id=btnOk onclick="applyCustomColor();doApply();self.close()" value=" ok " class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  500. </td>
  501. </tr>
  502. </table>
  503.  
  504. </body>
  505. </html>
  506.  
downloadcolor_picker_bg.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code
Related Source Codes/Software:
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
C9 v2.1.1 static post system - Program USES ASP + ACC structure design and develo... 2016-09-21
Imitation green download station perfect version - Before increased | software home page, on the basi... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top