资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
颜色选择: ColorMatch 5K
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="generator" content="WebWerx 2.5"> <meta name="keywords" content="colormatch,5k,color picker,color schemes,match,matching,colors,colours,palette,web design,free,freeware,online"> <meta name="description" content="Online tool for picking matching color schemes. Made in less than 5.120 bytes of code."> <style> body {background-color:#E6E6E6; font:10px tahoma; margin:30px; margin-top:20px; color:#323232; } p {margin:0px; margin-bottom:4px; font:11px tahoma; line-height: 12px; } td {vertical-align:top;} h1 {font-size:12px; font-weight:bold margin:0px; margin-bottom:8px; } </style> </head> <body> <style>.s{border:inset 1;width:50}.s2{border:outset 1;width:19;height:19;background-color:#E6E6E6;position:absolute;left:1;top:1}.t{font:11px tahoma;color:#555555}.t2{font:bold 36px verdana}</style></head><img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22JavaScript%22%3Evar%20mover%3Dmoveg%3Dmoveb%3Dmoveh%3D0%3Bvar%20hs%3Dnew%20Object()%3Bvar%20rg%3Dnew%20Object()%3Brg.r%3Drg.g%3Drg.b%3D0%3Bfunction%20click(x%2Cs)%7Bif(x%3C10)%7Bx%3D10%7D%3Bif(x%3E265)%7Bx%3D265%7Dx-%3D10%3Beval(%22h%22%2Bs%2B%22.style%22).left%3Dx%2B1%3Beval(%22rg.%22%2Bs%2B%22%3D%22%2Bx)%3Brg2hs(rg)%3Bud(%220%22%2Crg)%3Bsw.style.backgroundColor%3D%22rgb(%22%2Brg.r%2B%22%2C%22%2Brg.g%2B%22%2C%22%2Brg.b%2B%22)%22%3Bdom()%3B%7Dfunction%20bclick(s)%7Bx%3Dwindow.event.offsetX%2Beval(%22h%22%2Bs%2B%22.style.pixelLeft-1%22)%3Bclick(x%2Cs)%3B%7Dfunction%20sc(s)%7Bx%3Dwindow.event.offsetX%3Bclick(x%2Cs)%3B%7Dfunction%20movee(s)%7Beval(%22move%22%2Bs%2B%22%3D0%22)%7Dfunction%20rc(x%2Cm)%7Bif(x%3Em)%7Breturn%20m%7Dif(x%3C0)%7Breturn%200%7Delse%7Breturn%20x%7D%7Dfunction%20rg2hs(rg)%7Bm%3Drg.r%3Bif(rg.g%3Cm)%7Bm%3Drg.g%7D%3Bif(rg.b%3Cm)%7Bm%3Drg.b%7D%3Bv%3Drg.r%3Bif(rg.g%3Ev)%7Bv%3Drg.g%7D%3Bif(rg.b%3Ev)%7Bv%3Drg.b%7D%3Bvalue%3D100*v%2F255%3Bdelta%3Dv-m%3Bif(v%3D%3D0.0)%7Bhs.s%3D0%7Delse%7Bhs.s%3D100*delta%2Fv%7D%3Bif(hs.s%3D%3D0)%7Bhs.h%3D0%7Delse%7Bif(rg.r%3D%3Dv)%7Bhs.h%3D60.0*(rg.g-rg.b)%2Fdelta%7Delse%20if(rg.g%3D%3Dv)%7Bhs.h%3D120.0%2B60.0*(rg.b-rg.r)%2Fdelta%7Delse%20if(rg.b%3Dv)%7Bhs.h%3D240.0%2B60.0*(rg.r-rg.g)%2Fdelta%7Dif(hs.h%3C0.0)%7Bhs.h%3Dhs.h%2B360.0%7D%7Dhs.v%3DMath.round(value)%3Bhs.h%3DMath.round(hs.h)%3Bhs.s%3DMath.round(hs.s)%3Breturn(true)%3B%7Dfunction%20rg2html(z)%7Breturn%20%22%23%22%2Bd2h(z.r)%2Bd2h(z.g)%2Bd2h(z.b)%3B%7Dfunction%20d2h(d)%7Bhch%3D%220123456789ABCDEF%22%3Ba%3Dd%2516%3Bb%3D(d-a)%2F16%3Breturn%20hch.charAt(b)%2Bhch.charAt(a)%3B%7Dfunction%20c2r(d)%7Bk%3Dwindow.event.srcElement.style.backgroundColor%3Bj%3D(k.substr(4%2Ck.indexOf(%22)%22)-4)).split(%22%2C%22)%3Bclick(parseInt(j%5B0%5D)%2B10%2C%22r%22)%3Bclick(parseInt(j%5B1%5D)%2B10%2C%22g%22)%3Bclick(parseInt(j%5B2%5D)%2B10%2C%22b%22)%3B%7Dfunction%20h2r(hs)%7Bvar%20rg%3Dnew%20Object()%3Bif(hs.s%3D%3D0)%7Brg.r%3Drg.g%3Drg.b%3DMath.round(hs.v*2.55)%3Breturn%20rg%3B%7Dhs.s%3Dhs.s%2F100%3Bhs.v%3Dhs.v%2F100%3Bhs.h%2F%3D60%3Bi%3DMath.floor(hs.h)%3Bf%3Dhs.h-i%3Bp%3Dhs.v*(1-hs.s)%3Bq%3Dhs.v*(1-hs.s*f)%3Bt%3Dhs.v*(1-hs.s*(1-f))%3Bswitch(i)%7Bcase%200%3Arg.r%3Dhs.v%3Brg.g%3Dt%3Brg.b%3Dp%3Bbreak%3Bcase%201%3Arg.r%3Dq%3Brg.g%3Dhs.v%3Brg.b%3Dp%3Bbreak%3Bcase%202%3Arg.r%3Dp%3Brg.g%3Dhs.v%3Brg.b%3Dt%3Bbreak%3Bcase%203%3Arg.r%3Dp%3Brg.g%3Dq%3Brg.b%3Dhs.v%3Bbreak%3Bcase%204%3Arg.r%3Dt%3Brg.g%3Dp%3Brg.b%3Dhs.v%3Bbreak%3Bdefault%3Arg.r%3Dhs.v%3Brg.g%3Dp%3Brg.b%3Dq%3B%7Drg.r%3DMath.round(rg.r*255)%3Brg.g%3DMath.round(rg.g*255)%3Brg.b%3DMath.round(rg.b*255)%3Breturn%20rg%3B%7Dfunction%20ps(x)%7Bdocument.write('%3Ctd%3E%3Cdiv%20style%3D%22width%3A53%3Bheight%3A53%3Bbackground-color%3Argb(0%2C0%2C0)%3Bcursor%3Ahand%22%20class%3Ds%20id%3D%22sw'%2Bx%2B'%22%20onClick%3D%22c2r()%22%20title%3D%22Click%20to%20promote%20to%20primary%20color%22%3E%3C%2Fdiv%3E%3C%2Ftd%3E')%3B%7Dfunction%20ph(x)%7Bdocument.write('%3Ctd%3E%3Cdiv%20class%3Dt%20id%3D%22hc'%2Bx%2B'%22%3E%23000000%3C%2Fdiv%3E%3C%2Ftd%3E')%3B%7Dfunction%20ud(x%2Cc)%7Beval(%22sw%22%2Bx).style.backgroundColor%3D%22rgb(%22%2Bc.r%2B%22%2C%22%2Bc.g%2B%22%2C%22%2Bc.b%2B%22)%22%3Beval(%22hc%22%2Bx).innerHTML%3Drg2html(c)%7Dfunction%20pl(t%2Cc%2Cl)%7Bdocument.write('%3Cdiv%20style%3D%22position%3Aabsolute%3Bleft%3A30%3Btop%3A'%2Bt%2B'%3Bbackground-color%3Ablack%22%3E%3Cdiv%20class%3Ds%20style%3D%22width%3A276%3Bheight%3A21%3Bbackground-color%3A'%2Bc%2B'%3Bfilter%3Aalpha(style%3D1%2Cstartx%3D360%2Cfinishx%3D0)%3B%22%20onMouseDown%3D%22move'%2Bl%2B'%3D1%3Bsc(%5C''%2Bl%2B'%5C')%3B%22%20onMouseMove%3D%22if(move'%2Bl%2B'%3D%3D1)%7Bsc(%5C''%2Bl%2B'%5C')%3B%7D%22%3E%3C%2Fdiv%3E%3Cdiv%20class%3Ds2%20id%3Dh'%2Bl%2B'%20onMouseDown%3D%22move'%2Bl%2B'%3D1%3Bbclick(%5C''%2Bl%2B'%5C')%3B%22%20onMouseUp%3D%22movee(%5C''%2Bl%2B'%5C')%3B%22%20onMouseMove%3D%22if(move'%2Bl%2B'%3D%3D1)%7Bbclick(%5C''%2Bl%2B'%5C')%3B%7D%22%3E%3C%2Fdiv%3E%3C%2Fdiv%3E')%7Dfunction%20dom()%7Bz%3Dnew%20Object()%3By%3Dnew%20Object()%3Byx%3Dnew%20Object()%3By.s%3Dhs.s%3By.h%3Dhs.h%3Bif(hs.v%3E70)%7By.v%3Dhs.v-30%7Delse%7By.v%3Dhs.v%2B30%7D%3Bz%3Dh2r(y)%3Bud(%221%22%2Cz)%3Bif((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D0%3By.s%3D0%3By.v%3D100-hs.v%3Bz%3Dh2r(y)%3Bud(%224%22%2Cz)%3By.h%3D0%3By.s%3D0%3By.v%3Dhs.v%3Bz%3Dh2r(y)%3Bud(%225%22%2Cz)%3B%7D%3C%2Fscript%3E"><body onMouseUp="mover=moveg=moveb=0;" bgcolor=#E6E6E6 leftmargin=30 topmargin=30 class=t><div style="width:400"><span class=t2>ColorMatch 5K</span> This utility will help you select a matching 6-color palette for your website. Define a single color that you like. Matching colors will be calculated. Click a color in the palette to promote it to the primary color. <b> I like this color: 6-color matching palette:</div><img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3Epl(170%2C%22red%22%2C%22r%22)%3Bpl(200%2C%22green%22%2C%22g%22)%3Bpl(230%2C%22blue%22%2C%22b%22)%3C%2Fscript%3E"><div class=s id=sw style="position:absolute;left:316;top:170;height:81;width:82;background-color:black;"></div><div style="position:absolute;left:20;top:290;"><table cellspacing=10 cellpadding=0><tr><img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3Eps(0)%3Bps(1)%3Bps(2)%3Bps(3)%3Bps(4)%3Bps(5)%3B%3C%2Fscript%3E"></tr><tr><img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3Eph(0)%3Bph(1)%3Bph(2)%3Bph(3)%3Bph(4)%3Bph(5)%3B%3C%2Fscript%3E"></tr></table></div> <div style="width:500px; top:420px; position:absolute;"> <h1>About this page</h1> <p>The color selector on this site was submitted as an entry for the Danish 5KB (5.120 bytes) web competition in 2001.</p> <p>Given the nature of the competition ?allowing only for 5.120 bytes to be used in total! ?I was not able to make it cross-browser compatible at the time. Despite the lack of compatibility beyond IE, the tool won the competition.</p> <p>A lot of enthusiastic people around the World have not only made it more compatible, but also added even more features. <a target="_blank" href="http://www.google.com/search?q=colormatch+5k" _ewebeditor_ta_href="http%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dcolormatch%2B5k">Google will guide you to them!</a></p> <p>If you for some reason want to get in touch with me, please use the contact form at my site <a target="_top" href="http://port80.biz" _ewebeditor_ta_href="http%3A%2F%2Fport80.biz">Port80.biz</a>. ?Best regards, Kim Jensen aka kim^lwx</p> </div> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程