【需求】
在 https://www.cnblogs.com/heyang78/p/5712076.html 上有360种颜色及代码,但很遗憾没有十进制的RGB值,使用时需要自己转换一下,此过程依赖网络或计算器,颇为不便。因此,拟设计一爬虫将原有表格内容取出,在其原有颜色代码下添加十进制的RGB值。
具体意图如下图:
【关键点】
取网页内容使用requests,解析网页使用BeautifulSoup,先遍历所有的tr,再取tr下的td,如果其有bgcolor属性,那就是要找的目标。
使用函数int(txt,16)将两位颜色值转换为十进制的颜色值即可。
比如颜色值是bgcolor="#820041",那么取其R值的方法是bgcolor[1:3],取十进制R值的方法是r = int(bgcolor[1:3],16)
其它的文本组合有html知识即可,无须赘述。
【代码】
#encoding=utf-8 # 内置网络访问包 import requests # 内置的urllib.request模块 import urllib.request # 解析html的BeautifulSoup包,安装方法是pip install BeautifulSoup4 from bs4 import BeautifulSoup # 引入正则表达式包 import re # 把请求伪装成浏览器Mozilla user_agent='Mozilla/4.0 (compatible;MEIE 5.5;windows NT)' headers={'User-Agent':user_agent} # 要访问的页码地址 url="https://www.cnblogs.com/heyang78/p/5712076.html" # 发起请求获取其html内容 html=requests.get(url,headers=headers) # 使用BeautifulSoup解析html文本 soup= BeautifulSoup(html.text,'html.parser'); # 存储生成的新文本 content="" # 遍历网页中所有的tr for tr in soup.find_all('tr'): #一行tr开始 content=content+"<tr>" # 遍历tr中的td for td in tr.find_all('td'): # 取td的bgcolor属性 bgcolor=td.get("bgcolor") if bgcolor!=None: r = int(bgcolor[1:3],16) # red 将16进制的R值转十进制 g = int(bgcolor[3:5],16) # green 将16进制的G值转十进制 b = int(bgcolor[5:7],16) # blue 将16进制的B值转十进制 #print("bgcolor="+bgcolor+" r="+str(r)+" g="+str(g)+" b="+str(b)); #累加成新的三列td content=content+"<td bgcolor=\""+bgcolor+"\" width=\"60\"> </td>" content=content+"<td width=\"50\">"+bgcolor+"<br/>("+str(r)+","+str(g)+","+str(b)+")</td>" #一行tr结束 content=content+"</tr>" print(content)
【最终打印出来的内容】
<tr><td bgcolor="#000000" width="60"> </td><td width="50">#000000<br/>(0,0,0)</td><td bgcolor="#2f0000" width="60"> </td><td width="50">#2f0000<br/>(47,0,0)</td><td bgcolor="#600030" width="60"> </td><td width="50">#600030<br/>(96,0,48)</td><td bgcolor="#460046" width="60"> </td><td width="50">#460046<br/>(70,0,70)</td><td bgcolor="#28004d" width="60"> </td><td width="50">#28004d<br/>(40,0,77)</td></tr><tr><td bgcolor="#272727" width="60"> </td><td width="50">#272727<br/>(39,39,39)</td><td bgcolor="#4d0000" width="60"> </td><td width="50">#4d0000<br/>(77,0,0)</td><td bgcolor="#820041" width="60"> </td><td width="50">#820041<br/>(130,0,65)</td><td bgcolor="#5e005e" width="60"> </td><td width="50">#5e005e<br/>(94,0,94)</td><td bgcolor="#3a006f" width="60"> </td><td width="50">#3a006f<br/>(58,0,111)</td></tr><tr><td bgcolor="#3c3c3c" width="60"> </td><td width="50">#3c3c3c<br/>(60,60,60)</td><td bgcolor="#600000" width="60"> </td><td width="50">#600000<br/>(96,0,0)</td><td bgcolor="#9f0050" width="60"> </td><td width="50">#9f0050<br/>(159,0,80)</td><td bgcolor="#750075" width="60"> </td><td width="50">#750075<br/>(117,0,117)</td><td bgcolor="#4b0091" width="60"> </td><td width="50">#4b0091<br/>(75,0,145)</td></tr><tr><td bgcolor="#4f4f4f" width="60"> </td><td width="50">#4f4f4f<br/>(79,79,79)</td><td bgcolor="#750000" width="60"> </td><td width="50">#750000<br/>(117,0,0)</td><td bgcolor="#bf0060" width="60"> </td><td width="50">#bf0060<br/>(191,0,96)</td><td bgcolor="#930093" width="60"> </td><td width="50">#930093<br/>(147,0,147)</td><td bgcolor="#5b00ae" width="60"> </td><td width="50">#5b00ae<br/>(91,0,174)</td></tr><tr><td bgcolor="#5b5b5b" width="60"> </td><td width="50">#5b5b5b<br/>(91,91,91)</td><td bgcolor="#930000" width="60"> </td><td width="50">#930000<br/>(147,0,0)</td><td bgcolor="#d9006c" width="60"> </td><td width="50">#d9006c<br/>(217,0,108)</td><td bgcolor="#ae00ae" width="60"> </td><td width="50">#ae00ae<br/>(174,0,174)</td><td bgcolor="#6f00d2" width="60"> </td><td width="50">#6f00d2<br/>(111,0,210)</td></tr><tr><td bgcolor="#6c6c6c" width="60"> </td><td width="50">#6c6c6c<br/>(108,108,108)</td><td bgcolor="#ae0000" width="60"> </td><td width="50">#ae0000<br/>(174,0,0)</td><td bgcolor="#f00078" width="60"> </td><td width="50">#f00078<br/>(240,0,120)</td><td bgcolor="#d200d2" width="60"> </td><td width="50">#d200d2<br/>(210,0,210)</td><td bgcolor="#8600ff" width="60"> </td><td width="50">#8600ff<br/>(134,0,255)</td></tr><tr><td bgcolor="#7b7b7b" width="60"> </td><td width="50">#7b7b7b<br/>(123,123,123)</td><td bgcolor="#ce0000" width="60"> </td><td width="50">#ce0000<br/>(206,0,0)</td><td bgcolor="#ff0080" width="60"> </td><td width="50">#ff0080<br/>(255,0,128)</td><td bgcolor="#e800e8" width="60"> </td><td width="50">#e800e8<br/>(232,0,232)</td><td bgcolor="#921aff" width="60"> </td><td width="50">#921aff<br/>(146,26,255)</td></tr><tr><td bgcolor="#8e8e8e" width="60"> </td><td width="50">#8e8e8e<br/>(142,142,142)</td><td bgcolor="#ea0000" width="60"> </td><td width="50">#ea0000<br/>(234,0,0)</td><td bgcolor="#ff359a" width="60"> </td><td width="50">#ff359a<br/>(255,53,154)</td><td bgcolor="#ff00ff" width="60"> </td><td width="50">#ff00ff<br/>(255,0,255)</td><td bgcolor="#9f35ff" width="60"> </td><td width="50">#9f35ff<br/>(159,53,255)</td></tr><tr><td bgcolor="#9d9d9d" width="60"> </td><td width="50">#9d9d9d<br/>(157,157,157)</td><td bgcolor="#ff0000" width="60"> </td><td width="50">#ff0000<br/>(255,0,0)</td><td bgcolor="#ff60af" width="60"> </td><td width="50">#ff60af<br/>(255,96,175)</td><td bgcolor="#ff44ff" width="60"> </td><td width="50">#ff44ff<br/>(255,68,255)</td><td bgcolor="#b15bff" width="60"> </td><td width="50">#b15bff<br/>(177,91,255)</td></tr><tr><td bgcolor="#adadad" width="60"> </td><td width="50">#adadad<br/>(173,173,173)</td><td bgcolor="#ff2d2d" width="60"> </td><td width="50">#ff2d2d<br/>(255,45,45)</td><td bgcolor="#ff79bc" width="60"> </td><td width="50">#ff79bc<br/>(255,121,188)</td><td bgcolor="#ff77ff" width="60"> </td><td width="50">#ff77ff<br/>(255,119,255)</td><td bgcolor="#be77ff" width="60"> </td><td width="50">#be77ff<br/>(190,119,255)</td></tr><tr><td bgcolor="#bebebe" width="60"> </td><td width="50">#bebebe<br/>(190,190,190)</td><td bgcolor="#ff5151" width="60"> </td><td width="50">#ff5151<br/>(255,81,81)</td><td bgcolor="#ff95ca" width="60"> </td><td width="50">#ff95ca<br/>(255,149,202)</td><td bgcolor="#ff8eff" width="60"> </td><td width="50">#ff8eff<br/>(255,142,255)</td><td bgcolor="#ca8eff" width="60"> </td><td width="50">#ca8eff<br/>(202,142,255)</td></tr><tr><td bgcolor="#d0d0d0" width="60"> </td><td width="50">#d0d0d0<br/>(208,208,208)</td><td bgcolor="#ff7575" width="60"> </td><td width="50">#ff7575<br/>(255,117,117)</td><td bgcolor="#ffaad5" width="60"> </td><td width="50">#ffaad5<br/>(255,170,213)</td><td bgcolor="#ffa6ff" width="60"> </td><td width="50">#ffa6ff<br/>(255,166,255)</td><td bgcolor="#d3a4ff" width="60"> </td><td width="50">#d3a4ff<br/>(211,164,255)</td></tr><tr><td bgcolor="#e0e0e0" width="60"> </td><td width="50">#e0e0e0<br/>(224,224,224)</td><td bgcolor="#ff9797" width="60"> </td><td width="50">#ff9797<br/>(255,151,151)</td><td bgcolor="#ffc1e0" width="60"> </td><td width="50">#ffc1e0<br/>(255,193,224)</td><td bgcolor="#ffbfff" width="60"> </td><td width="50">#ffbfff<br/>(255,191,255)</td><td bgcolor="#dcb5ff" width="60"> </td><td width="50">#dcb5ff<br/>(220,181,255)</td></tr><tr><td bgcolor="#f0f0f0" width="60"> </td><td width="50">#f0f0f0<br/>(240,240,240)</td><td bgcolor="#ffb5b5" width="60"> </td><td width="50">#ffb5b5<br/>(255,181,181)</td><td bgcolor="#ffd9ec" width="60"> </td><td width="50">#ffd9ec<br/>(255,217,236)</td><td bgcolor="#ffd0ff" width="60"> </td><td width="50">#ffd0ff<br/>(255,208,255)</td><td bgcolor="#e6caff" width="60"> </td><td width="50">#e6caff<br/>(230,202,255)</td></tr><tr><td bgcolor="#fcfcfc" width="60"> </td><td width="50">#fcfcfc<br/>(252,252,252)</td><td bgcolor="#ffd2d2" width="60"> </td><td width="50">#ffd2d2<br/>(255,210,210)</td><td bgcolor="#ffecf5" width="60"> </td><td width="50">#ffecf5<br/>(255,236,245)</td><td bgcolor="#ffe6ff" width="60"> </td><td width="50">#ffe6ff<br/>(255,230,255)</td><td bgcolor="#f1e1ff" width="60"> </td><td width="50">#f1e1ff<br/>(241,225,255)</td></tr><tr><td bgcolor="#ffffff" width="60"> </td><td width="50">#ffffff<br/>(255,255,255)</td><td bgcolor="#ffecec" width="60"> </td><td width="50">#ffecec<br/>(255,236,236)</td><td bgcolor="#fff7fb" width="60"> </td><td width="50">#fff7fb<br/>(255,247,251)</td><td bgcolor="#fff7ff" width="60"> </td><td width="50">#fff7ff<br/>(255,247,255)</td><td bgcolor="#faf4ff" width="60"> </td><td width="50">#faf4ff<br/>(250,244,255)</td></tr><tr><td bgcolor="#000079" width="60"> </td><td width="50">#000079<br/>(0,0,121)</td><td bgcolor="#000079" width="60"> </td><td width="50">#000079<br/>(0,0,121)</td><td bgcolor="#003e3e" width="60"> </td><td width="50">#003e3e<br/>(0,62,62)</td><td bgcolor="#006030" width="60"> </td><td width="50">#006030<br/>(0,96,48)</td><td bgcolor="#006000" width="60"> </td><td width="50">#006000<br/>(0,96,0)</td></tr><tr><td bgcolor="#000093" width="60"> </td><td width="50">#000093<br/>(0,0,147)</td><td bgcolor="#003d79" width="60"> </td><td width="50">#003d79<br/>(0,61,121)</td><td bgcolor="#005757" width="60"> </td><td width="50">#005757<br/>(0,87,87)</td><td bgcolor="#01814a" width="60"> </td><td width="50">#01814a<br/>(1,129,74)</td><td bgcolor="#007500" width="60"> </td><td width="50">#007500<br/>(0,117,0)</td></tr><tr><td bgcolor="#0000c6" width="60"> </td><td width="50">#0000c6<br/>(0,0,198)</td><td bgcolor="#004b97" width="60"> </td><td width="50">#004b97<br/>(0,75,151)</td><td bgcolor="#007979" width="60"> </td><td width="50">#007979<br/>(0,121,121)</td><td bgcolor="#019858" width="60"> </td><td width="50">#019858<br/>(1,152,88)</td><td bgcolor="#009100" width="60"> </td><td width="50">#009100<br/>(0,145,0)</td></tr><tr><td bgcolor="#0000c6" width="60"> </td><td width="50">#0000c6<br/>(0,0,198)</td><td bgcolor="#005ab5" width="60"> </td><td width="50">#005ab5<br/>(0,90,181)</td><td bgcolor="#009393" width="60"> </td><td width="50">#009393<br/>(0,147,147)</td><td bgcolor="#01b468" width="60"> </td><td width="50">#01b468<br/>(1,180,104)</td><td bgcolor="#00a600" width="60"> </td><td width="50">#00a600<br/>(0,166,0)</td></tr><tr><td bgcolor="#0000e3" width="60"> </td><td width="50">#0000e3<br/>(0,0,227)</td><td bgcolor="#0066cc" width="60"> </td><td width="50">#0066cc<br/>(0,102,204)</td><td bgcolor="#00aeae" width="60"> </td><td width="50">#00aeae<br/>(0,174,174)</td><td bgcolor="#02c874" width="60"> </td><td width="50">#02c874<br/>(2,200,116)</td><td bgcolor="#00bb00" width="60"> </td><td width="50">#00bb00<br/>(0,187,0)</td></tr><tr><td bgcolor="#2828ff" width="60"> </td><td width="50">#2828ff<br/>(40,40,255)</td><td bgcolor="#0072e3" width="60"> </td><td width="50">#0072e3<br/>(0,114,227)</td><td bgcolor="#00caca" width="60"> </td><td width="50">#00caca<br/>(0,202,202)</td><td bgcolor="#02df82" width="60"> </td><td width="50">#02df82<br/>(2,223,130)</td><td bgcolor="#00db00" width="60"> </td><td width="50">#00db00<br/>(0,219,0)</td></tr><tr><td bgcolor="#4a4aff" width="60"> </td><td width="50">#4a4aff<br/>(74,74,255)</td><td bgcolor="#0080ff" width="60"> </td><td width="50">#0080ff<br/>(0,128,255)</td><td bgcolor="#00e3e3" width="60"> </td><td width="50">#00e3e3<br/>(0,227,227)</td><td bgcolor="#02f78e" width="60"> </td><td width="50">#02f78e<br/>(2,247,142)</td><td bgcolor="#00ec00" width="60"> </td><td width="50">#00ec00<br/>(0,236,0)</td></tr><tr><td bgcolor="#6a6aff" width="60"> </td><td width="50">#6a6aff<br/>(106,106,255)</td><td bgcolor="#2894ff" width="60"> </td><td width="50">#2894ff<br/>(40,148,255)</td><td bgcolor="#00ffff" width="60"> </td><td width="50">#00ffff<br/>(0,255,255)</td><td bgcolor="#1afd9c" width="60"> </td><td width="50">#1afd9c<br/>(26,253,156)</td><td bgcolor="#28ff28" width="60"> </td><td width="50">#28ff28<br/>(40,255,40)</td></tr><tr><td bgcolor="#7d7dff" width="60"> </td><td width="50">#7d7dff<br/>(125,125,255)</td><td bgcolor="#46a3ff" width="60"> </td><td width="50">#46a3ff<br/>(70,163,255)</td><td bgcolor="#4dffff" width="60"> </td><td width="50">#4dffff<br/>(77,255,255)</td><td bgcolor="#4efeb3" width="60"> </td><td width="50">#4efeb3<br/>(78,254,179)</td><td bgcolor="#53ff53" width="60"> </td><td width="50">#53ff53<br/>(83,255,83)</td></tr><tr><td bgcolor="#9393ff" width="60"> </td><td width="50">#9393ff<br/>(147,147,255)</td><td bgcolor="#66b3ff" width="60"> </td><td width="50">#66b3ff<br/>(102,179,255)</td><td bgcolor="#80ffff" width="60"> </td><td width="50">#80ffff<br/>(128,255,255)</td><td bgcolor="#7afec6" width="60"> </td><td width="50">#7afec6<br/>(122,254,198)</td><td bgcolor="#79ff79" width="60"> </td><td width="50">#79ff79<br/>(121,255,121)</td></tr><tr><td bgcolor="#aaaaff" width="60"> </td><td width="50">#aaaaff<br/>(170,170,255)</td><td bgcolor="#84c1ff" width="60"> </td><td width="50">#84c1ff<br/>(132,193,255)</td><td bgcolor="#a6ffff" width="60"> </td><td width="50">#a6ffff<br/>(166,255,255)</td><td bgcolor="#96fed1" width="60"> </td><td width="50">#96fed1<br/>(150,254,209)</td><td bgcolor="#93ff93" width="60"> </td><td width="50">#93ff93<br/>(147,255,147)</td></tr><tr><td bgcolor="#b9b9ff" width="60"> </td><td width="50">#b9b9ff<br/>(185,185,255)</td><td bgcolor="#97cbff" width="60"> </td><td width="50">#97cbff<br/>(151,203,255)</td><td bgcolor="#bbffff" width="60"> </td><td width="50">#bbffff<br/>(187,255,255)</td><td bgcolor="#adfedc" width="60"> </td><td width="50">#adfedc<br/>(173,254,220)</td><td bgcolor="#a6ffa6" width="60"> </td><td width="50">#a6ffa6<br/>(166,255,166)</td></tr><tr><td bgcolor="#ceceff" width="60"> </td><td width="50">#ceceff<br/>(206,206,255)</td><td bgcolor="#acd6ff" width="60"> </td><td width="50">#acd6ff<br/>(172,214,255)</td><td bgcolor="#caffff" width="60"> </td><td width="50">#caffff<br/>(202,255,255)</td><td bgcolor="#c1ffe4" width="60"> </td><td width="50">#c1ffe4<br/>(193,255,228)</td><td bgcolor="#bbffbb" width="60"> </td><td width="50">#bbffbb<br/>(187,255,187)</td></tr><tr><td bgcolor="#ddddff" width="60"> </td><td width="50">#ddddff<br/>(221,221,255)</td><td bgcolor="#c4e1ff" width="60"> </td><td width="50">#c4e1ff<br/>(196,225,255)</td><td bgcolor="#d9ffff" width="60"> </td><td width="50">#d9ffff<br/>(217,255,255)</td><td bgcolor="#d7ffee" width="60"> </td><td width="50">#d7ffee<br/>(215,255,238)</td><td bgcolor="#ceffce" width="60"> </td><td width="50">#ceffce<br/>(206,255,206)</td></tr><tr><td bgcolor="#ececff" width="60"> </td><td width="50">#ececff<br/>(236,236,255)</td><td bgcolor="#d2e9ff" width="60"> </td><td width="50">#d2e9ff<br/>(210,233,255)</td><td bgcolor="#ecffff" width="60"> </td><td width="50">#ecffff<br/>(236,255,255)</td><td bgcolor="#e8fff5" width="60"> </td><td width="50">#e8fff5<br/>(232,255,245)</td><td bgcolor="#dfffdf" width="60"> </td><td width="50">#dfffdf<br/>(223,255,223)</td></tr><tr><td bgcolor="#fbfbff" width="60"> </td><td width="50">#fbfbff<br/>(251,251,255)</td><td bgcolor="#ecf5ff" width="60"> </td><td width="50">#ecf5ff<br/>(236,245,255)</td><td bgcolor="#fdffff" width="60"> </td><td width="50">#fdffff<br/>(253,255,255)</td><td bgcolor="#fbfffd" width="60"> </td><td width="50">#fbfffd<br/>(251,255,253)</td><td bgcolor="#f0fff0" width="60"> </td><td width="50">#f0fff0<br/>(240,255,240)</td></tr><tr><td bgcolor="#467500" width="60"> </td><td width="50">#467500<br/>(70,117,0)</td><td bgcolor="#424200" width="60"> </td><td width="50">#424200<br/>(66,66,0)</td><td bgcolor="#5b4b00" width="60"> </td><td width="50">#5b4b00<br/>(91,75,0)</td><td bgcolor="#844200" width="60"> </td><td width="50">#844200<br/>(132,66,0)</td><td bgcolor="#642100" width="60"> </td><td width="50">#642100<br/>(100,33,0)</td></tr><tr><td bgcolor="#548c00" width="60"> </td><td width="50">#548c00<br/>(84,140,0)</td><td bgcolor="#5b5b00" width="60"> </td><td width="50">#5b5b00<br/>(91,91,0)</td><td bgcolor="#796400" width="60"> </td><td width="50">#796400<br/>(121,100,0)</td><td bgcolor="#9f5000" width="60"> </td><td width="50">#9f5000<br/>(159,80,0)</td><td bgcolor="#842b00" width="60"> </td><td width="50">#842b00<br/>(132,43,0)</td></tr><tr><td bgcolor="#64a600" width="60"> </td><td width="50">#64a600<br/>(100,166,0)</td><td bgcolor="#737300" width="60"> </td><td width="50">#737300<br/>(115,115,0)</td><td bgcolor="#977c00" width="60"> </td><td width="50">#977c00<br/>(151,124,0)</td><td bgcolor="#bb5e00" width="60"> </td><td width="50">#bb5e00<br/>(187,94,0)</td><td bgcolor="#a23400" width="60"> </td><td width="50">#a23400<br/>(162,52,0)</td></tr><tr><td bgcolor="#73bf00" width="60"> </td><td width="50">#73bf00<br/>(115,191,0)</td><td bgcolor="#8c8c00" width="60"> </td><td width="50">#8c8c00<br/>(140,140,0)</td><td bgcolor="#ae8f00" width="60"> </td><td width="50">#ae8f00<br/>(174,143,0)</td><td bgcolor="#d26900" width="60"> </td><td width="50">#d26900<br/>(210,105,0)</td><td bgcolor="#bb3d00" width="60"> </td><td width="50">#bb3d00<br/>(187,61,0)</td></tr><tr><td bgcolor="#82d900" width="60"> </td><td width="50">#82d900<br/>(130,217,0)</td><td bgcolor="#a6a600" width="60"> </td><td width="50">#a6a600<br/>(166,166,0)</td><td bgcolor="#c6a300" width="60"> </td><td width="50">#c6a300<br/>(198,163,0)</td><td bgcolor="#ea7500" width="60"> </td><td width="50">#ea7500<br/>(234,117,0)</td><td bgcolor="#d94600" width="60"> </td><td width="50">#d94600<br/>(217,70,0)</td></tr><tr><td bgcolor="#8cea00" width="60"> </td><td width="50">#8cea00<br/>(140,234,0)</td><td bgcolor="#c4c400" width="60"> </td><td width="50">#c4c400<br/>(196,196,0)</td><td bgcolor="#d9b300" width="60"> </td><td width="50">#d9b300<br/>(217,179,0)</td><td bgcolor="#ff8000" width="60"> </td><td width="50">#ff8000<br/>(255,128,0)</td><td bgcolor="#f75000" width="60"> </td><td width="50">#f75000<br/>(247,80,0)</td></tr><tr><td bgcolor="#9aff02" width="60"> </td><td width="50">#9aff02<br/>(154,255,2)</td><td bgcolor="#e1e100" width="60"> </td><td width="50">#e1e100<br/>(225,225,0)</td><td bgcolor="#eac100" width="60"> </td><td width="50">#eac100<br/>(234,193,0)</td><td bgcolor="#ff9224" width="60"> </td><td width="50">#ff9224<br/>(255,146,36)</td><td bgcolor="#ff5809" width="60"> </td><td width="50">#ff5809<br/>(255,88,9)</td></tr><tr><td bgcolor="#a8ff24" width="60"> </td><td width="50">#a8ff24<br/>(168,255,36)</td><td bgcolor="#f9f900" width="60"> </td><td width="50">#f9f900<br/>(249,249,0)</td><td bgcolor="#ffd306" width="60"> </td><td width="50">#ffd306<br/>(255,211,6)</td><td bgcolor="#ffa042" width="60"> </td><td width="50">#ffa042<br/>(255,160,66)</td><td bgcolor="#ff8040" width="60"> </td><td width="50">#ff8040<br/>(255,128,64)</td></tr><tr><td bgcolor="#b7ff4a" width="60"> </td><td width="50">#b7ff4a<br/>(183,255,74)</td><td bgcolor="#ffff37" width="60"> </td><td width="50">#ffff37<br/>(255,255,55)</td><td bgcolor="#ffdc35" width="60"> </td><td width="50">#ffdc35<br/>(255,220,53)</td><td bgcolor="#ffaf60" width="60"> </td><td width="50">#ffaf60<br/>(255,175,96)</td><td bgcolor="#ff8f59" width="60"> </td><td width="50">#ff8f59<br/>(255,143,89)</td></tr><tr><td bgcolor="#c2ff68" width="60"> </td><td width="50">#c2ff68<br/>(194,255,104)</td><td bgcolor="#ffff6f" width="60"> </td><td width="50">#ffff6f<br/>(255,255,111)</td><td bgcolor="#ffe153" width="60"> </td><td width="50">#ffe153<br/>(255,225,83)</td><td bgcolor="#ffbb77" width="60"> </td><td width="50">#ffbb77<br/>(255,187,119)</td><td bgcolor="#ff9d6f" width="60"> </td><td width="50">#ff9d6f<br/>(255,157,111)</td></tr><tr><td bgcolor="#ccff80" width="60"> </td><td width="50">#ccff80<br/>(204,255,128)</td><td bgcolor="#ffff93" width="60"> </td><td width="50">#ffff93<br/>(255,255,147)</td><td bgcolor="#ffe66f" width="60"> </td><td width="50">#ffe66f<br/>(255,230,111)</td><td bgcolor="#ffc78e" width="60"> </td><td width="50">#ffc78e<br/>(255,199,142)</td><td bgcolor="#ffad86" width="60"> </td><td width="50">#ffad86<br/>(255,173,134)</td></tr><tr><td bgcolor="#d3ff93" width="60"> </td><td width="50">#d3ff93<br/>(211,255,147)</td><td bgcolor="#ffffaa" width="60"> </td><td width="50">#ffffaa<br/>(255,255,170)</td><td bgcolor="#ffed97" width="60"> </td><td width="50">#ffed97<br/>(255,237,151)</td><td bgcolor="#ffd1a4" width="60"> </td><td width="50">#ffd1a4<br/>(255,209,164)</td><td bgcolor="#ffbd9d" width="60"> </td><td width="50">#ffbd9d<br/>(255,189,157)</td></tr><tr><td bgcolor="#deffac" width="60"> </td><td width="50">#deffac<br/>(222,255,172)</td><td bgcolor="#ffffb9" width="60"> </td><td width="50">#ffffb9<br/>(255,255,185)</td><td bgcolor="#fff0ac" width="60"> </td><td width="50">#fff0ac<br/>(255,240,172)</td><td bgcolor="#ffdcb9" width="60"> </td><td width="50">#ffdcb9<br/>(255,220,185)</td><td bgcolor="#ffcbb3" width="60"> </td><td width="50">#ffcbb3<br/>(255,203,179)</td></tr><tr><td bgcolor="#e8ffc4" width="60"> </td><td width="50">#e8ffc4<br/>(232,255,196)</td><td bgcolor="#ffffce" width="60"> </td><td width="50">#ffffce<br/>(255,255,206)</td><td bgcolor="#fff4c1" width="60"> </td><td width="50">#fff4c1<br/>(255,244,193)</td><td bgcolor="#ffe4ca" width="60"> </td><td width="50">#ffe4ca<br/>(255,228,202)</td><td bgcolor="#ffdac8" width="60"> </td><td width="50">#ffdac8<br/>(255,218,200)</td></tr><tr><td bgcolor="#efffd7" width="60"> </td><td width="50">#efffd7<br/>(239,255,215)</td><td bgcolor="#ffffdf" width="60"> </td><td width="50">#ffffdf<br/>(255,255,223)</td><td bgcolor="#fff8d7" width="60"> </td><td width="50">#fff8d7<br/>(255,248,215)</td><td bgcolor="#ffeedd" width="60"> </td><td width="50">#ffeedd<br/>(255,238,221)</td><td bgcolor="#ffe6d9" width="60"> </td><td width="50">#ffe6d9<br/>(255,230,217)</td></tr><tr><td bgcolor="#f5ffe8" width="60"> </td><td width="50">#f5ffe8<br/>(245,255,232)</td><td bgcolor="#fffff4" width="60"> </td><td width="50">#fffff4<br/>(255,255,244)</td><td bgcolor="#fffcec" width="60"> </td><td width="50">#fffcec<br/>(255,252,236)</td><td bgcolor="#fffaf4" width="60"> </td><td width="50">#fffaf4<br/>(255,250,244)</td><td bgcolor="#fff3ee" width="60"> </td><td width="50">#fff3ee<br/>(255,243,238)</td></tr><tr><td bgcolor="#613030" width="60"> </td><td width="50">#613030<br/>(97,48,48)</td><td bgcolor="#616130" width="60"> </td><td width="50">#616130<br/>(97,97,48)</td><td bgcolor="#336666" width="60"> </td><td width="50">#336666<br/>(51,102,102)</td><td bgcolor="#484891" width="60"> </td><td width="50">#484891<br/>(72,72,145)</td><td bgcolor="#6c3365" width="60"> </td><td width="50">#6c3365<br/>(108,51,101)</td></tr><tr><td bgcolor="#743a3a" width="60"> </td><td width="50">#743a3a<br/>(116,58,58)</td><td bgcolor="#707038" width="60"> </td><td width="50">#707038<br/>(112,112,56)</td><td bgcolor="#3d7878" width="60"> </td><td width="50">#3d7878<br/>(61,120,120)</td><td bgcolor="#5151a2" width="60"> </td><td width="50">#5151a2<br/>(81,81,162)</td><td bgcolor="#7e3d76" width="60"> </td><td width="50">#7e3d76<br/>(126,61,118)</td></tr><tr><td bgcolor="#804040" width="60"> </td><td width="50">#804040<br/>(128,64,64)</td><td bgcolor="#808040" width="60"> </td><td width="50">#808040<br/>(128,128,64)</td><td bgcolor="#408080" width="60"> </td><td width="50">#408080<br/>(64,128,128)</td><td bgcolor="#5a5aad" width="60"> </td><td width="50">#5a5aad<br/>(90,90,173)</td><td bgcolor="#8f4586" width="60"> </td><td width="50">#8f4586<br/>(143,69,134)</td></tr><tr><td bgcolor="#984b4b" width="60"> </td><td width="50">#984b4b<br/>(152,75,75)</td><td bgcolor="#949449" width="60"> </td><td width="50">#949449<br/>(148,148,73)</td><td bgcolor="#4f9d9d" width="60"> </td><td width="50">#4f9d9d<br/>(79,157,157)</td><td bgcolor="#7373b9" width="60"> </td><td width="50">#7373b9<br/>(115,115,185)</td><td bgcolor="#9f4d95" width="60"> </td><td width="50">#9f4d95<br/>(159,77,149)</td></tr><tr><td bgcolor="#ad5a5a" width="60"> </td><td width="50">#ad5a5a<br/>(173,90,90)</td><td bgcolor="#a5a552" width="60"> </td><td width="50">#a5a552<br/>(165,165,82)</td><td bgcolor="#5cadad" width="60"> </td><td width="50">#5cadad<br/>(92,173,173)</td><td bgcolor="#8080c0" width="60"> </td><td width="50">#8080c0<br/>(128,128,192)</td><td bgcolor="#ae57a4" width="60"> </td><td width="50">#ae57a4<br/>(174,87,164)</td></tr><tr><td bgcolor="#b87070" width="60"> </td><td width="50">#b87070<br/>(184,112,112)</td><td bgcolor="#afaf61" width="60"> </td><td width="50">#afaf61<br/>(175,175,97)</td><td bgcolor="#6fb7b7" width="60"> </td><td width="50">#6fb7b7<br/>(111,183,183)</td><td bgcolor="#9999cc" width="60"> </td><td width="50">#9999cc<br/>(153,153,204)</td><td bgcolor="#b766ad" width="60"> </td><td width="50">#b766ad<br/>(183,102,173)</td></tr><tr><td bgcolor="#c48888" width="60"> </td><td width="50">#c48888<br/>(196,136,136)</td><td bgcolor="#b9b973" width="60"> </td><td width="50">#b9b973<br/>(185,185,115)</td><td bgcolor="#81c0c0" width="60"> </td><td width="50">#81c0c0<br/>(129,192,192)</td><td bgcolor="#a6a6d2" width="60"> </td><td width="50">#a6a6d2<br/>(166,166,210)</td><td bgcolor="#c07ab8" width="60"> </td><td width="50">#c07ab8<br/>(192,122,184)</td></tr><tr><td bgcolor="#cf9e9e" width="60"> </td><td width="50">#cf9e9e<br/>(207,158,158)</td><td bgcolor="#c2c287" width="60"> </td><td width="50">#c2c287<br/>(194,194,135)</td><td bgcolor="#95caca" width="60"> </td><td width="50">#95caca<br/>(149,202,202)</td><td bgcolor="#b8b8dc" width="60"> </td><td width="50">#b8b8dc<br/>(184,184,220)</td><td bgcolor="#ca8ec2" width="60"> </td><td width="50">#ca8ec2<br/>(202,142,194)</td></tr><tr><td bgcolor="#d9b3b3" width="60"> </td><td width="50">#d9b3b3<br/>(217,179,179)</td><td bgcolor="#cdcd9a" width="60"> </td><td width="50">#cdcd9a<br/>(205,205,154)</td><td bgcolor="#a3d1d1" width="60"> </td><td width="50">#a3d1d1<br/>(163,209,209)</td><td bgcolor="#c7c7e2" width="60"> </td><td width="50">#c7c7e2<br/>(199,199,226)</td><td bgcolor="#d2a2cc" width="60"> </td><td width="50">#d2a2cc<br/>(210,162,204)</td></tr><tr><td bgcolor="#e1c4c4" width="60"> </td><td width="50">#e1c4c4<br/>(225,196,196)</td><td bgcolor="#d6d6ad" width="60"> </td><td width="50">#d6d6ad<br/>(214,214,173)</td><td bgcolor="#b3d9d9" width="60"> </td><td width="50">#b3d9d9<br/>(179,217,217)</td><td bgcolor="#d8d8eb" width="60"> </td><td width="50">#d8d8eb<br/>(216,216,235)</td><td bgcolor="#dab1d5" width="60"> </td><td width="50">#dab1d5<br/>(218,177,213)</td></tr><tr><td bgcolor="#ebd6d6" width="60"> </td><td width="50">#ebd6d6<br/>(235,214,214)</td><td bgcolor="#dedebe" width="60"> </td><td width="50">#dedebe<br/>(222,222,190)</td><td bgcolor="#c4e1e1" width="60"> </td><td width="50">#c4e1e1<br/>(196,225,225)</td><td bgcolor="#e6e6f2" width="60"> </td><td width="50">#e6e6f2<br/>(230,230,242)</td><td bgcolor="#e2c2de" width="60"> </td><td width="50">#e2c2de<br/>(226,194,222)</td></tr><tr><td bgcolor="#f2e6e6" width="60"> </td><td width="50">#f2e6e6<br/>(242,230,230)</td><td bgcolor="#e8e8d0" width="60"> </td><td width="50">#e8e8d0<br/>(232,232,208)</td><td bgcolor="#d1e9e9" width="60"> </td><td width="50">#d1e9e9<br/>(209,233,233)</td><td bgcolor="#f3f3fa" width="60"> </td><td width="50">#f3f3fa<br/>(243,243,250)</td><td bgcolor="#ebd3e8" width="60"> </td><td width="50">#ebd3e8<br/>(235,211,232)</td></tr>
【将结果放入HTML的最终成果】
https://www.cnblogs.com/heyang78/p/3419103.html