【Python爬虫】将某网页中表格里的十六进制颜色值转换成十进制,再生成新表格

news2024/11/20 15:50:56

【需求】

在 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\">&nbsp;</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">&nbsp;</td><td width="50">#000000<br/>(0,0,0)</td><td bgcolor="#2f0000" width="60">&nbsp;</td><td width="50">#2f0000<br/>(47,0,0)</td><td bgcolor="#600030" width="60">&nbsp;</td><td width="50">#600030<br/>(96,0,48)</td><td bgcolor="#460046" width="60">&nbsp;</td><td width="50">#460046<br/>(70,0,70)</td><td bgcolor="#28004d" width="60">&nbsp;</td><td width="50">#28004d<br/>(40,0,77)</td></tr><tr><td bgcolor="#272727" width="60">&nbsp;</td><td width="50">#272727<br/>(39,39,39)</td><td bgcolor="#4d0000" width="60">&nbsp;</td><td width="50">#4d0000<br/>(77,0,0)</td><td bgcolor="#820041" width="60">&nbsp;</td><td width="50">#820041<br/>(130,0,65)</td><td bgcolor="#5e005e" width="60">&nbsp;</td><td width="50">#5e005e<br/>(94,0,94)</td><td bgcolor="#3a006f" width="60">&nbsp;</td><td width="50">#3a006f<br/>(58,0,111)</td></tr><tr><td bgcolor="#3c3c3c" width="60">&nbsp;</td><td width="50">#3c3c3c<br/>(60,60,60)</td><td bgcolor="#600000" width="60">&nbsp;</td><td width="50">#600000<br/>(96,0,0)</td><td bgcolor="#9f0050" width="60">&nbsp;</td><td width="50">#9f0050<br/>(159,0,80)</td><td bgcolor="#750075" width="60">&nbsp;</td><td width="50">#750075<br/>(117,0,117)</td><td bgcolor="#4b0091" width="60">&nbsp;</td><td width="50">#4b0091<br/>(75,0,145)</td></tr><tr><td bgcolor="#4f4f4f" width="60">&nbsp;</td><td width="50">#4f4f4f<br/>(79,79,79)</td><td bgcolor="#750000" width="60">&nbsp;</td><td width="50">#750000<br/>(117,0,0)</td><td bgcolor="#bf0060" width="60">&nbsp;</td><td width="50">#bf0060<br/>(191,0,96)</td><td bgcolor="#930093" width="60">&nbsp;</td><td width="50">#930093<br/>(147,0,147)</td><td bgcolor="#5b00ae" width="60">&nbsp;</td><td width="50">#5b00ae<br/>(91,0,174)</td></tr><tr><td bgcolor="#5b5b5b" width="60">&nbsp;</td><td width="50">#5b5b5b<br/>(91,91,91)</td><td bgcolor="#930000" width="60">&nbsp;</td><td width="50">#930000<br/>(147,0,0)</td><td bgcolor="#d9006c" width="60">&nbsp;</td><td width="50">#d9006c<br/>(217,0,108)</td><td bgcolor="#ae00ae" width="60">&nbsp;</td><td width="50">#ae00ae<br/>(174,0,174)</td><td bgcolor="#6f00d2" width="60">&nbsp;</td><td width="50">#6f00d2<br/>(111,0,210)</td></tr><tr><td bgcolor="#6c6c6c" width="60">&nbsp;</td><td width="50">#6c6c6c<br/>(108,108,108)</td><td bgcolor="#ae0000" width="60">&nbsp;</td><td width="50">#ae0000<br/>(174,0,0)</td><td bgcolor="#f00078" width="60">&nbsp;</td><td width="50">#f00078<br/>(240,0,120)</td><td bgcolor="#d200d2" width="60">&nbsp;</td><td width="50">#d200d2<br/>(210,0,210)</td><td bgcolor="#8600ff" width="60">&nbsp;</td><td width="50">#8600ff<br/>(134,0,255)</td></tr><tr><td bgcolor="#7b7b7b" width="60">&nbsp;</td><td width="50">#7b7b7b<br/>(123,123,123)</td><td bgcolor="#ce0000" width="60">&nbsp;</td><td width="50">#ce0000<br/>(206,0,0)</td><td bgcolor="#ff0080" width="60">&nbsp;</td><td width="50">#ff0080<br/>(255,0,128)</td><td bgcolor="#e800e8" width="60">&nbsp;</td><td width="50">#e800e8<br/>(232,0,232)</td><td bgcolor="#921aff" width="60">&nbsp;</td><td width="50">#921aff<br/>(146,26,255)</td></tr><tr><td bgcolor="#8e8e8e" width="60">&nbsp;</td><td width="50">#8e8e8e<br/>(142,142,142)</td><td bgcolor="#ea0000" width="60">&nbsp;</td><td width="50">#ea0000<br/>(234,0,0)</td><td bgcolor="#ff359a" width="60">&nbsp;</td><td width="50">#ff359a<br/>(255,53,154)</td><td bgcolor="#ff00ff" width="60">&nbsp;</td><td width="50">#ff00ff<br/>(255,0,255)</td><td bgcolor="#9f35ff" width="60">&nbsp;</td><td width="50">#9f35ff<br/>(159,53,255)</td></tr><tr><td bgcolor="#9d9d9d" width="60">&nbsp;</td><td width="50">#9d9d9d<br/>(157,157,157)</td><td bgcolor="#ff0000" width="60">&nbsp;</td><td width="50">#ff0000<br/>(255,0,0)</td><td bgcolor="#ff60af" width="60">&nbsp;</td><td width="50">#ff60af<br/>(255,96,175)</td><td bgcolor="#ff44ff" width="60">&nbsp;</td><td width="50">#ff44ff<br/>(255,68,255)</td><td bgcolor="#b15bff" width="60">&nbsp;</td><td width="50">#b15bff<br/>(177,91,255)</td></tr><tr><td bgcolor="#adadad" width="60">&nbsp;</td><td width="50">#adadad<br/>(173,173,173)</td><td bgcolor="#ff2d2d" width="60">&nbsp;</td><td width="50">#ff2d2d<br/>(255,45,45)</td><td bgcolor="#ff79bc" width="60">&nbsp;</td><td width="50">#ff79bc<br/>(255,121,188)</td><td bgcolor="#ff77ff" width="60">&nbsp;</td><td width="50">#ff77ff<br/>(255,119,255)</td><td bgcolor="#be77ff" width="60">&nbsp;</td><td width="50">#be77ff<br/>(190,119,255)</td></tr><tr><td bgcolor="#bebebe" width="60">&nbsp;</td><td width="50">#bebebe<br/>(190,190,190)</td><td bgcolor="#ff5151" width="60">&nbsp;</td><td width="50">#ff5151<br/>(255,81,81)</td><td bgcolor="#ff95ca" width="60">&nbsp;</td><td width="50">#ff95ca<br/>(255,149,202)</td><td bgcolor="#ff8eff" width="60">&nbsp;</td><td width="50">#ff8eff<br/>(255,142,255)</td><td bgcolor="#ca8eff" width="60">&nbsp;</td><td width="50">#ca8eff<br/>(202,142,255)</td></tr><tr><td bgcolor="#d0d0d0" width="60">&nbsp;</td><td width="50">#d0d0d0<br/>(208,208,208)</td><td bgcolor="#ff7575" width="60">&nbsp;</td><td width="50">#ff7575<br/>(255,117,117)</td><td bgcolor="#ffaad5" width="60">&nbsp;</td><td width="50">#ffaad5<br/>(255,170,213)</td><td bgcolor="#ffa6ff" width="60">&nbsp;</td><td width="50">#ffa6ff<br/>(255,166,255)</td><td bgcolor="#d3a4ff" width="60">&nbsp;</td><td width="50">#d3a4ff<br/>(211,164,255)</td></tr><tr><td bgcolor="#e0e0e0" width="60">&nbsp;</td><td width="50">#e0e0e0<br/>(224,224,224)</td><td bgcolor="#ff9797" width="60">&nbsp;</td><td width="50">#ff9797<br/>(255,151,151)</td><td bgcolor="#ffc1e0" width="60">&nbsp;</td><td width="50">#ffc1e0<br/>(255,193,224)</td><td bgcolor="#ffbfff" width="60">&nbsp;</td><td width="50">#ffbfff<br/>(255,191,255)</td><td bgcolor="#dcb5ff" width="60">&nbsp;</td><td width="50">#dcb5ff<br/>(220,181,255)</td></tr><tr><td bgcolor="#f0f0f0" width="60">&nbsp;</td><td width="50">#f0f0f0<br/>(240,240,240)</td><td bgcolor="#ffb5b5" width="60">&nbsp;</td><td width="50">#ffb5b5<br/>(255,181,181)</td><td bgcolor="#ffd9ec" width="60">&nbsp;</td><td width="50">#ffd9ec<br/>(255,217,236)</td><td bgcolor="#ffd0ff" width="60">&nbsp;</td><td width="50">#ffd0ff<br/>(255,208,255)</td><td bgcolor="#e6caff" width="60">&nbsp;</td><td width="50">#e6caff<br/>(230,202,255)</td></tr><tr><td bgcolor="#fcfcfc" width="60">&nbsp;</td><td width="50">#fcfcfc<br/>(252,252,252)</td><td bgcolor="#ffd2d2" width="60">&nbsp;</td><td width="50">#ffd2d2<br/>(255,210,210)</td><td bgcolor="#ffecf5" width="60">&nbsp;</td><td width="50">#ffecf5<br/>(255,236,245)</td><td bgcolor="#ffe6ff" width="60">&nbsp;</td><td width="50">#ffe6ff<br/>(255,230,255)</td><td bgcolor="#f1e1ff" width="60">&nbsp;</td><td width="50">#f1e1ff<br/>(241,225,255)</td></tr><tr><td bgcolor="#ffffff" width="60">&nbsp;</td><td width="50">#ffffff<br/>(255,255,255)</td><td bgcolor="#ffecec" width="60">&nbsp;</td><td width="50">#ffecec<br/>(255,236,236)</td><td bgcolor="#fff7fb" width="60">&nbsp;</td><td width="50">#fff7fb<br/>(255,247,251)</td><td bgcolor="#fff7ff" width="60">&nbsp;</td><td width="50">#fff7ff<br/>(255,247,255)</td><td bgcolor="#faf4ff" width="60">&nbsp;</td><td width="50">#faf4ff<br/>(250,244,255)</td></tr><tr><td bgcolor="#000079" width="60">&nbsp;</td><td width="50">#000079<br/>(0,0,121)</td><td bgcolor="#000079" width="60">&nbsp;</td><td width="50">#000079<br/>(0,0,121)</td><td bgcolor="#003e3e" width="60">&nbsp;</td><td width="50">#003e3e<br/>(0,62,62)</td><td bgcolor="#006030" width="60">&nbsp;</td><td width="50">#006030<br/>(0,96,48)</td><td bgcolor="#006000" width="60">&nbsp;</td><td width="50">#006000<br/>(0,96,0)</td></tr><tr><td bgcolor="#000093" width="60">&nbsp;</td><td width="50">#000093<br/>(0,0,147)</td><td bgcolor="#003d79" width="60">&nbsp;</td><td width="50">#003d79<br/>(0,61,121)</td><td bgcolor="#005757" width="60">&nbsp;</td><td width="50">#005757<br/>(0,87,87)</td><td bgcolor="#01814a" width="60">&nbsp;</td><td width="50">#01814a<br/>(1,129,74)</td><td bgcolor="#007500" width="60">&nbsp;</td><td width="50">#007500<br/>(0,117,0)</td></tr><tr><td bgcolor="#0000c6" width="60">&nbsp;</td><td width="50">#0000c6<br/>(0,0,198)</td><td bgcolor="#004b97" width="60">&nbsp;</td><td width="50">#004b97<br/>(0,75,151)</td><td bgcolor="#007979" width="60">&nbsp;</td><td width="50">#007979<br/>(0,121,121)</td><td bgcolor="#019858" width="60">&nbsp;</td><td width="50">#019858<br/>(1,152,88)</td><td bgcolor="#009100" width="60">&nbsp;</td><td width="50">#009100<br/>(0,145,0)</td></tr><tr><td bgcolor="#0000c6" width="60">&nbsp;</td><td width="50">#0000c6<br/>(0,0,198)</td><td bgcolor="#005ab5" width="60">&nbsp;</td><td width="50">#005ab5<br/>(0,90,181)</td><td bgcolor="#009393" width="60">&nbsp;</td><td width="50">#009393<br/>(0,147,147)</td><td bgcolor="#01b468" width="60">&nbsp;</td><td width="50">#01b468<br/>(1,180,104)</td><td bgcolor="#00a600" width="60">&nbsp;</td><td width="50">#00a600<br/>(0,166,0)</td></tr><tr><td bgcolor="#0000e3" width="60">&nbsp;</td><td width="50">#0000e3<br/>(0,0,227)</td><td bgcolor="#0066cc" width="60">&nbsp;</td><td width="50">#0066cc<br/>(0,102,204)</td><td bgcolor="#00aeae" width="60">&nbsp;</td><td width="50">#00aeae<br/>(0,174,174)</td><td bgcolor="#02c874" width="60">&nbsp;</td><td width="50">#02c874<br/>(2,200,116)</td><td bgcolor="#00bb00" width="60">&nbsp;</td><td width="50">#00bb00<br/>(0,187,0)</td></tr><tr><td bgcolor="#2828ff" width="60">&nbsp;</td><td width="50">#2828ff<br/>(40,40,255)</td><td bgcolor="#0072e3" width="60">&nbsp;</td><td width="50">#0072e3<br/>(0,114,227)</td><td bgcolor="#00caca" width="60">&nbsp;</td><td width="50">#00caca<br/>(0,202,202)</td><td bgcolor="#02df82" width="60">&nbsp;</td><td width="50">#02df82<br/>(2,223,130)</td><td bgcolor="#00db00" width="60">&nbsp;</td><td width="50">#00db00<br/>(0,219,0)</td></tr><tr><td bgcolor="#4a4aff" width="60">&nbsp;</td><td width="50">#4a4aff<br/>(74,74,255)</td><td bgcolor="#0080ff" width="60">&nbsp;</td><td width="50">#0080ff<br/>(0,128,255)</td><td bgcolor="#00e3e3" width="60">&nbsp;</td><td width="50">#00e3e3<br/>(0,227,227)</td><td bgcolor="#02f78e" width="60">&nbsp;</td><td width="50">#02f78e<br/>(2,247,142)</td><td bgcolor="#00ec00" width="60">&nbsp;</td><td width="50">#00ec00<br/>(0,236,0)</td></tr><tr><td bgcolor="#6a6aff" width="60">&nbsp;</td><td width="50">#6a6aff<br/>(106,106,255)</td><td bgcolor="#2894ff" width="60">&nbsp;</td><td width="50">#2894ff<br/>(40,148,255)</td><td bgcolor="#00ffff" width="60">&nbsp;</td><td width="50">#00ffff<br/>(0,255,255)</td><td bgcolor="#1afd9c" width="60">&nbsp;</td><td width="50">#1afd9c<br/>(26,253,156)</td><td bgcolor="#28ff28" width="60">&nbsp;</td><td width="50">#28ff28<br/>(40,255,40)</td></tr><tr><td bgcolor="#7d7dff" width="60">&nbsp;</td><td width="50">#7d7dff<br/>(125,125,255)</td><td bgcolor="#46a3ff" width="60">&nbsp;</td><td width="50">#46a3ff<br/>(70,163,255)</td><td bgcolor="#4dffff" width="60">&nbsp;</td><td width="50">#4dffff<br/>(77,255,255)</td><td bgcolor="#4efeb3" width="60">&nbsp;</td><td width="50">#4efeb3<br/>(78,254,179)</td><td bgcolor="#53ff53" width="60">&nbsp;</td><td width="50">#53ff53<br/>(83,255,83)</td></tr><tr><td bgcolor="#9393ff" width="60">&nbsp;</td><td width="50">#9393ff<br/>(147,147,255)</td><td bgcolor="#66b3ff" width="60">&nbsp;</td><td width="50">#66b3ff<br/>(102,179,255)</td><td bgcolor="#80ffff" width="60">&nbsp;</td><td width="50">#80ffff<br/>(128,255,255)</td><td bgcolor="#7afec6" width="60">&nbsp;</td><td width="50">#7afec6<br/>(122,254,198)</td><td bgcolor="#79ff79" width="60">&nbsp;</td><td width="50">#79ff79<br/>(121,255,121)</td></tr><tr><td bgcolor="#aaaaff" width="60">&nbsp;</td><td width="50">#aaaaff<br/>(170,170,255)</td><td bgcolor="#84c1ff" width="60">&nbsp;</td><td width="50">#84c1ff<br/>(132,193,255)</td><td bgcolor="#a6ffff" width="60">&nbsp;</td><td width="50">#a6ffff<br/>(166,255,255)</td><td bgcolor="#96fed1" width="60">&nbsp;</td><td width="50">#96fed1<br/>(150,254,209)</td><td bgcolor="#93ff93" width="60">&nbsp;</td><td width="50">#93ff93<br/>(147,255,147)</td></tr><tr><td bgcolor="#b9b9ff" width="60">&nbsp;</td><td width="50">#b9b9ff<br/>(185,185,255)</td><td bgcolor="#97cbff" width="60">&nbsp;</td><td width="50">#97cbff<br/>(151,203,255)</td><td bgcolor="#bbffff" width="60">&nbsp;</td><td width="50">#bbffff<br/>(187,255,255)</td><td bgcolor="#adfedc" width="60">&nbsp;</td><td width="50">#adfedc<br/>(173,254,220)</td><td bgcolor="#a6ffa6" width="60">&nbsp;</td><td width="50">#a6ffa6<br/>(166,255,166)</td></tr><tr><td bgcolor="#ceceff" width="60">&nbsp;</td><td width="50">#ceceff<br/>(206,206,255)</td><td bgcolor="#acd6ff" width="60">&nbsp;</td><td width="50">#acd6ff<br/>(172,214,255)</td><td bgcolor="#caffff" width="60">&nbsp;</td><td width="50">#caffff<br/>(202,255,255)</td><td bgcolor="#c1ffe4" width="60">&nbsp;</td><td width="50">#c1ffe4<br/>(193,255,228)</td><td bgcolor="#bbffbb" width="60">&nbsp;</td><td width="50">#bbffbb<br/>(187,255,187)</td></tr><tr><td bgcolor="#ddddff" width="60">&nbsp;</td><td width="50">#ddddff<br/>(221,221,255)</td><td bgcolor="#c4e1ff" width="60">&nbsp;</td><td width="50">#c4e1ff<br/>(196,225,255)</td><td bgcolor="#d9ffff" width="60">&nbsp;</td><td width="50">#d9ffff<br/>(217,255,255)</td><td bgcolor="#d7ffee" width="60">&nbsp;</td><td width="50">#d7ffee<br/>(215,255,238)</td><td bgcolor="#ceffce" width="60">&nbsp;</td><td width="50">#ceffce<br/>(206,255,206)</td></tr><tr><td bgcolor="#ececff" width="60">&nbsp;</td><td width="50">#ececff<br/>(236,236,255)</td><td bgcolor="#d2e9ff" width="60">&nbsp;</td><td width="50">#d2e9ff<br/>(210,233,255)</td><td bgcolor="#ecffff" width="60">&nbsp;</td><td width="50">#ecffff<br/>(236,255,255)</td><td bgcolor="#e8fff5" width="60">&nbsp;</td><td width="50">#e8fff5<br/>(232,255,245)</td><td bgcolor="#dfffdf" width="60">&nbsp;</td><td width="50">#dfffdf<br/>(223,255,223)</td></tr><tr><td bgcolor="#fbfbff" width="60">&nbsp;</td><td width="50">#fbfbff<br/>(251,251,255)</td><td bgcolor="#ecf5ff" width="60">&nbsp;</td><td width="50">#ecf5ff<br/>(236,245,255)</td><td bgcolor="#fdffff" width="60">&nbsp;</td><td width="50">#fdffff<br/>(253,255,255)</td><td bgcolor="#fbfffd" width="60">&nbsp;</td><td width="50">#fbfffd<br/>(251,255,253)</td><td bgcolor="#f0fff0" width="60">&nbsp;</td><td width="50">#f0fff0<br/>(240,255,240)</td></tr><tr><td bgcolor="#467500" width="60">&nbsp;</td><td width="50">#467500<br/>(70,117,0)</td><td bgcolor="#424200" width="60">&nbsp;</td><td width="50">#424200<br/>(66,66,0)</td><td bgcolor="#5b4b00" width="60">&nbsp;</td><td width="50">#5b4b00<br/>(91,75,0)</td><td bgcolor="#844200" width="60">&nbsp;</td><td width="50">#844200<br/>(132,66,0)</td><td bgcolor="#642100" width="60">&nbsp;</td><td width="50">#642100<br/>(100,33,0)</td></tr><tr><td bgcolor="#548c00" width="60">&nbsp;</td><td width="50">#548c00<br/>(84,140,0)</td><td bgcolor="#5b5b00" width="60">&nbsp;</td><td width="50">#5b5b00<br/>(91,91,0)</td><td bgcolor="#796400" width="60">&nbsp;</td><td width="50">#796400<br/>(121,100,0)</td><td bgcolor="#9f5000" width="60">&nbsp;</td><td width="50">#9f5000<br/>(159,80,0)</td><td bgcolor="#842b00" width="60">&nbsp;</td><td width="50">#842b00<br/>(132,43,0)</td></tr><tr><td bgcolor="#64a600" width="60">&nbsp;</td><td width="50">#64a600<br/>(100,166,0)</td><td bgcolor="#737300" width="60">&nbsp;</td><td width="50">#737300<br/>(115,115,0)</td><td bgcolor="#977c00" width="60">&nbsp;</td><td width="50">#977c00<br/>(151,124,0)</td><td bgcolor="#bb5e00" width="60">&nbsp;</td><td width="50">#bb5e00<br/>(187,94,0)</td><td bgcolor="#a23400" width="60">&nbsp;</td><td width="50">#a23400<br/>(162,52,0)</td></tr><tr><td bgcolor="#73bf00" width="60">&nbsp;</td><td width="50">#73bf00<br/>(115,191,0)</td><td bgcolor="#8c8c00" width="60">&nbsp;</td><td width="50">#8c8c00<br/>(140,140,0)</td><td bgcolor="#ae8f00" width="60">&nbsp;</td><td width="50">#ae8f00<br/>(174,143,0)</td><td bgcolor="#d26900" width="60">&nbsp;</td><td width="50">#d26900<br/>(210,105,0)</td><td bgcolor="#bb3d00" width="60">&nbsp;</td><td width="50">#bb3d00<br/>(187,61,0)</td></tr><tr><td bgcolor="#82d900" width="60">&nbsp;</td><td width="50">#82d900<br/>(130,217,0)</td><td bgcolor="#a6a600" width="60">&nbsp;</td><td width="50">#a6a600<br/>(166,166,0)</td><td bgcolor="#c6a300" width="60">&nbsp;</td><td width="50">#c6a300<br/>(198,163,0)</td><td bgcolor="#ea7500" width="60">&nbsp;</td><td width="50">#ea7500<br/>(234,117,0)</td><td bgcolor="#d94600" width="60">&nbsp;</td><td width="50">#d94600<br/>(217,70,0)</td></tr><tr><td bgcolor="#8cea00" width="60">&nbsp;</td><td width="50">#8cea00<br/>(140,234,0)</td><td bgcolor="#c4c400" width="60">&nbsp;</td><td width="50">#c4c400<br/>(196,196,0)</td><td bgcolor="#d9b300" width="60">&nbsp;</td><td width="50">#d9b300<br/>(217,179,0)</td><td bgcolor="#ff8000" width="60">&nbsp;</td><td width="50">#ff8000<br/>(255,128,0)</td><td bgcolor="#f75000" width="60">&nbsp;</td><td width="50">#f75000<br/>(247,80,0)</td></tr><tr><td bgcolor="#9aff02" width="60">&nbsp;</td><td width="50">#9aff02<br/>(154,255,2)</td><td bgcolor="#e1e100" width="60">&nbsp;</td><td width="50">#e1e100<br/>(225,225,0)</td><td bgcolor="#eac100" width="60">&nbsp;</td><td width="50">#eac100<br/>(234,193,0)</td><td bgcolor="#ff9224" width="60">&nbsp;</td><td width="50">#ff9224<br/>(255,146,36)</td><td bgcolor="#ff5809" width="60">&nbsp;</td><td width="50">#ff5809<br/>(255,88,9)</td></tr><tr><td bgcolor="#a8ff24" width="60">&nbsp;</td><td width="50">#a8ff24<br/>(168,255,36)</td><td bgcolor="#f9f900" width="60">&nbsp;</td><td width="50">#f9f900<br/>(249,249,0)</td><td bgcolor="#ffd306" width="60">&nbsp;</td><td width="50">#ffd306<br/>(255,211,6)</td><td bgcolor="#ffa042" width="60">&nbsp;</td><td width="50">#ffa042<br/>(255,160,66)</td><td bgcolor="#ff8040" width="60">&nbsp;</td><td width="50">#ff8040<br/>(255,128,64)</td></tr><tr><td bgcolor="#b7ff4a" width="60">&nbsp;</td><td width="50">#b7ff4a<br/>(183,255,74)</td><td bgcolor="#ffff37" width="60">&nbsp;</td><td width="50">#ffff37<br/>(255,255,55)</td><td bgcolor="#ffdc35" width="60">&nbsp;</td><td width="50">#ffdc35<br/>(255,220,53)</td><td bgcolor="#ffaf60" width="60">&nbsp;</td><td width="50">#ffaf60<br/>(255,175,96)</td><td bgcolor="#ff8f59" width="60">&nbsp;</td><td width="50">#ff8f59<br/>(255,143,89)</td></tr><tr><td bgcolor="#c2ff68" width="60">&nbsp;</td><td width="50">#c2ff68<br/>(194,255,104)</td><td bgcolor="#ffff6f" width="60">&nbsp;</td><td width="50">#ffff6f<br/>(255,255,111)</td><td bgcolor="#ffe153" width="60">&nbsp;</td><td width="50">#ffe153<br/>(255,225,83)</td><td bgcolor="#ffbb77" width="60">&nbsp;</td><td width="50">#ffbb77<br/>(255,187,119)</td><td bgcolor="#ff9d6f" width="60">&nbsp;</td><td width="50">#ff9d6f<br/>(255,157,111)</td></tr><tr><td bgcolor="#ccff80" width="60">&nbsp;</td><td width="50">#ccff80<br/>(204,255,128)</td><td bgcolor="#ffff93" width="60">&nbsp;</td><td width="50">#ffff93<br/>(255,255,147)</td><td bgcolor="#ffe66f" width="60">&nbsp;</td><td width="50">#ffe66f<br/>(255,230,111)</td><td bgcolor="#ffc78e" width="60">&nbsp;</td><td width="50">#ffc78e<br/>(255,199,142)</td><td bgcolor="#ffad86" width="60">&nbsp;</td><td width="50">#ffad86<br/>(255,173,134)</td></tr><tr><td bgcolor="#d3ff93" width="60">&nbsp;</td><td width="50">#d3ff93<br/>(211,255,147)</td><td bgcolor="#ffffaa" width="60">&nbsp;</td><td width="50">#ffffaa<br/>(255,255,170)</td><td bgcolor="#ffed97" width="60">&nbsp;</td><td width="50">#ffed97<br/>(255,237,151)</td><td bgcolor="#ffd1a4" width="60">&nbsp;</td><td width="50">#ffd1a4<br/>(255,209,164)</td><td bgcolor="#ffbd9d" width="60">&nbsp;</td><td width="50">#ffbd9d<br/>(255,189,157)</td></tr><tr><td bgcolor="#deffac" width="60">&nbsp;</td><td width="50">#deffac<br/>(222,255,172)</td><td bgcolor="#ffffb9" width="60">&nbsp;</td><td width="50">#ffffb9<br/>(255,255,185)</td><td bgcolor="#fff0ac" width="60">&nbsp;</td><td width="50">#fff0ac<br/>(255,240,172)</td><td bgcolor="#ffdcb9" width="60">&nbsp;</td><td width="50">#ffdcb9<br/>(255,220,185)</td><td bgcolor="#ffcbb3" width="60">&nbsp;</td><td width="50">#ffcbb3<br/>(255,203,179)</td></tr><tr><td bgcolor="#e8ffc4" width="60">&nbsp;</td><td width="50">#e8ffc4<br/>(232,255,196)</td><td bgcolor="#ffffce" width="60">&nbsp;</td><td width="50">#ffffce<br/>(255,255,206)</td><td bgcolor="#fff4c1" width="60">&nbsp;</td><td width="50">#fff4c1<br/>(255,244,193)</td><td bgcolor="#ffe4ca" width="60">&nbsp;</td><td width="50">#ffe4ca<br/>(255,228,202)</td><td bgcolor="#ffdac8" width="60">&nbsp;</td><td width="50">#ffdac8<br/>(255,218,200)</td></tr><tr><td bgcolor="#efffd7" width="60">&nbsp;</td><td width="50">#efffd7<br/>(239,255,215)</td><td bgcolor="#ffffdf" width="60">&nbsp;</td><td width="50">#ffffdf<br/>(255,255,223)</td><td bgcolor="#fff8d7" width="60">&nbsp;</td><td width="50">#fff8d7<br/>(255,248,215)</td><td bgcolor="#ffeedd" width="60">&nbsp;</td><td width="50">#ffeedd<br/>(255,238,221)</td><td bgcolor="#ffe6d9" width="60">&nbsp;</td><td width="50">#ffe6d9<br/>(255,230,217)</td></tr><tr><td bgcolor="#f5ffe8" width="60">&nbsp;</td><td width="50">#f5ffe8<br/>(245,255,232)</td><td bgcolor="#fffff4" width="60">&nbsp;</td><td width="50">#fffff4<br/>(255,255,244)</td><td bgcolor="#fffcec" width="60">&nbsp;</td><td width="50">#fffcec<br/>(255,252,236)</td><td bgcolor="#fffaf4" width="60">&nbsp;</td><td width="50">#fffaf4<br/>(255,250,244)</td><td bgcolor="#fff3ee" width="60">&nbsp;</td><td width="50">#fff3ee<br/>(255,243,238)</td></tr><tr><td bgcolor="#613030" width="60">&nbsp;</td><td width="50">#613030<br/>(97,48,48)</td><td bgcolor="#616130" width="60">&nbsp;</td><td width="50">#616130<br/>(97,97,48)</td><td bgcolor="#336666" width="60">&nbsp;</td><td width="50">#336666<br/>(51,102,102)</td><td bgcolor="#484891" width="60">&nbsp;</td><td width="50">#484891<br/>(72,72,145)</td><td bgcolor="#6c3365" width="60">&nbsp;</td><td width="50">#6c3365<br/>(108,51,101)</td></tr><tr><td bgcolor="#743a3a" width="60">&nbsp;</td><td width="50">#743a3a<br/>(116,58,58)</td><td bgcolor="#707038" width="60">&nbsp;</td><td width="50">#707038<br/>(112,112,56)</td><td bgcolor="#3d7878" width="60">&nbsp;</td><td width="50">#3d7878<br/>(61,120,120)</td><td bgcolor="#5151a2" width="60">&nbsp;</td><td width="50">#5151a2<br/>(81,81,162)</td><td bgcolor="#7e3d76" width="60">&nbsp;</td><td width="50">#7e3d76<br/>(126,61,118)</td></tr><tr><td bgcolor="#804040" width="60">&nbsp;</td><td width="50">#804040<br/>(128,64,64)</td><td bgcolor="#808040" width="60">&nbsp;</td><td width="50">#808040<br/>(128,128,64)</td><td bgcolor="#408080" width="60">&nbsp;</td><td width="50">#408080<br/>(64,128,128)</td><td bgcolor="#5a5aad" width="60">&nbsp;</td><td width="50">#5a5aad<br/>(90,90,173)</td><td bgcolor="#8f4586" width="60">&nbsp;</td><td width="50">#8f4586<br/>(143,69,134)</td></tr><tr><td bgcolor="#984b4b" width="60">&nbsp;</td><td width="50">#984b4b<br/>(152,75,75)</td><td bgcolor="#949449" width="60">&nbsp;</td><td width="50">#949449<br/>(148,148,73)</td><td bgcolor="#4f9d9d" width="60">&nbsp;</td><td width="50">#4f9d9d<br/>(79,157,157)</td><td bgcolor="#7373b9" width="60">&nbsp;</td><td width="50">#7373b9<br/>(115,115,185)</td><td bgcolor="#9f4d95" width="60">&nbsp;</td><td width="50">#9f4d95<br/>(159,77,149)</td></tr><tr><td bgcolor="#ad5a5a" width="60">&nbsp;</td><td width="50">#ad5a5a<br/>(173,90,90)</td><td bgcolor="#a5a552" width="60">&nbsp;</td><td width="50">#a5a552<br/>(165,165,82)</td><td bgcolor="#5cadad" width="60">&nbsp;</td><td width="50">#5cadad<br/>(92,173,173)</td><td bgcolor="#8080c0" width="60">&nbsp;</td><td width="50">#8080c0<br/>(128,128,192)</td><td bgcolor="#ae57a4" width="60">&nbsp;</td><td width="50">#ae57a4<br/>(174,87,164)</td></tr><tr><td bgcolor="#b87070" width="60">&nbsp;</td><td width="50">#b87070<br/>(184,112,112)</td><td bgcolor="#afaf61" width="60">&nbsp;</td><td width="50">#afaf61<br/>(175,175,97)</td><td bgcolor="#6fb7b7" width="60">&nbsp;</td><td width="50">#6fb7b7<br/>(111,183,183)</td><td bgcolor="#9999cc" width="60">&nbsp;</td><td width="50">#9999cc<br/>(153,153,204)</td><td bgcolor="#b766ad" width="60">&nbsp;</td><td width="50">#b766ad<br/>(183,102,173)</td></tr><tr><td bgcolor="#c48888" width="60">&nbsp;</td><td width="50">#c48888<br/>(196,136,136)</td><td bgcolor="#b9b973" width="60">&nbsp;</td><td width="50">#b9b973<br/>(185,185,115)</td><td bgcolor="#81c0c0" width="60">&nbsp;</td><td width="50">#81c0c0<br/>(129,192,192)</td><td bgcolor="#a6a6d2" width="60">&nbsp;</td><td width="50">#a6a6d2<br/>(166,166,210)</td><td bgcolor="#c07ab8" width="60">&nbsp;</td><td width="50">#c07ab8<br/>(192,122,184)</td></tr><tr><td bgcolor="#cf9e9e" width="60">&nbsp;</td><td width="50">#cf9e9e<br/>(207,158,158)</td><td bgcolor="#c2c287" width="60">&nbsp;</td><td width="50">#c2c287<br/>(194,194,135)</td><td bgcolor="#95caca" width="60">&nbsp;</td><td width="50">#95caca<br/>(149,202,202)</td><td bgcolor="#b8b8dc" width="60">&nbsp;</td><td width="50">#b8b8dc<br/>(184,184,220)</td><td bgcolor="#ca8ec2" width="60">&nbsp;</td><td width="50">#ca8ec2<br/>(202,142,194)</td></tr><tr><td bgcolor="#d9b3b3" width="60">&nbsp;</td><td width="50">#d9b3b3<br/>(217,179,179)</td><td bgcolor="#cdcd9a" width="60">&nbsp;</td><td width="50">#cdcd9a<br/>(205,205,154)</td><td bgcolor="#a3d1d1" width="60">&nbsp;</td><td width="50">#a3d1d1<br/>(163,209,209)</td><td bgcolor="#c7c7e2" width="60">&nbsp;</td><td width="50">#c7c7e2<br/>(199,199,226)</td><td bgcolor="#d2a2cc" width="60">&nbsp;</td><td width="50">#d2a2cc<br/>(210,162,204)</td></tr><tr><td bgcolor="#e1c4c4" width="60">&nbsp;</td><td width="50">#e1c4c4<br/>(225,196,196)</td><td bgcolor="#d6d6ad" width="60">&nbsp;</td><td width="50">#d6d6ad<br/>(214,214,173)</td><td bgcolor="#b3d9d9" width="60">&nbsp;</td><td width="50">#b3d9d9<br/>(179,217,217)</td><td bgcolor="#d8d8eb" width="60">&nbsp;</td><td width="50">#d8d8eb<br/>(216,216,235)</td><td bgcolor="#dab1d5" width="60">&nbsp;</td><td width="50">#dab1d5<br/>(218,177,213)</td></tr><tr><td bgcolor="#ebd6d6" width="60">&nbsp;</td><td width="50">#ebd6d6<br/>(235,214,214)</td><td bgcolor="#dedebe" width="60">&nbsp;</td><td width="50">#dedebe<br/>(222,222,190)</td><td bgcolor="#c4e1e1" width="60">&nbsp;</td><td width="50">#c4e1e1<br/>(196,225,225)</td><td bgcolor="#e6e6f2" width="60">&nbsp;</td><td width="50">#e6e6f2<br/>(230,230,242)</td><td bgcolor="#e2c2de" width="60">&nbsp;</td><td width="50">#e2c2de<br/>(226,194,222)</td></tr><tr><td bgcolor="#f2e6e6" width="60">&nbsp;</td><td width="50">#f2e6e6<br/>(242,230,230)</td><td bgcolor="#e8e8d0" width="60">&nbsp;</td><td width="50">#e8e8d0<br/>(232,232,208)</td><td bgcolor="#d1e9e9" width="60">&nbsp;</td><td width="50">#d1e9e9<br/>(209,233,233)</td><td bgcolor="#f3f3fa" width="60">&nbsp;</td><td width="50">#f3f3fa<br/>(243,243,250)</td><td bgcolor="#ebd3e8" width="60">&nbsp;</td><td width="50">#ebd3e8<br/>(235,211,232)</td></tr>

【将结果放入HTML的最终成果】

https://www.cnblogs.com/heyang78/p/3419103.html

END

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1539603.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

深度学习入门指南:从理论到实践

深度学习如何入门 深度学习是机器学习的一个分支&#xff0c;它通过模拟人脑神经网络的结构和功能来实现对数据的学习和理解。近年来&#xff0c;深度学习在图像识别、自然语言处理、语音识别等领域取得了显著的成果&#xff0c;越来越受到人们的关注。如果你想入门深度学习&a…

Ambari——编译——解决PowerShell中报错问题

您的支持是我继续创作与分享的动力源泉!!! 您的支持是我继续创作与分享的动力源泉!!! 您的支持是我继续创作与分享的动力源泉!!! 错误日志 因为在此系统上禁止运脚本。有关详细信息&#xff0c;请参阅 https:/go,microsoft,com/fwlink/?LinkID135170 中的 about_Execution…

Cesium安装部署运行

目录 1.简介 2.Cesium项目下载 3.Cesium项目运行 4.cesium运行 1.简介 Cesium是国外一个基于JavaScript编写的使用WebGL的地图引擎。Cesium支持3D,2D,2.5D形式的地图展示&#xff0c;可以自行绘制图形&#xff0c;高亮区域&#xff0c;并提供良好的触摸支持&#xff0c;且支…

安卓手机系统跳过app启动广告软件

跳过广告关于此应用声明&#xff1a; 应用利用了安卓系统的辅助功能API&#xff0c;可以读取您手机屏幕上显示的所有内容&#xff0c;并且可以以您的名义进行屏幕点击等操作。* 轻量无广告&#xff0c;不联网&#xff0c;也不需要任何权限&#xff1b;* 请务必在系统设置中开启…

es bulk批量操作简单实例

&#xff08;1&#xff09;定义 bulk允许在单个步骤中进行多次create、index、update或delete请求。 bulk与其他的请求体格式稍有不同&#xff0c;如下所示&#xff1a; { action: { metadata }}\n { request body }\n { action: { metadata }}\n { request body …

C++多态机制详解(多态实现原理,单继承和多继承时虚函数表,菱形继承时的虚函数表原理)

文章目录 多态的定义多态的实现1.多态实现的两个必要条件2.什么是虚函数3.重写的条件4.多态实现代码5.重写的两个例外 C11引入的final和override关键字重载&#xff0c;重写&#xff08;覆盖&#xff09;&#xff0c;隐藏&#xff08;重定义&#xff09;抽象类接口继承和实现继…

关于JAVA8的Lambda表达式

1. 水在前面 这个礼拜忽然心血来潮把Lambda表达式学习了一遍&#xff0c;发现这玩意跟原来想象的好像不是一个东西&#xff0c;写个学习心得供以后复习用。还是那句话&#xff0c;这篇水文不能让你完全掌握&#xff0c;只是用来给我自己温习用的&#xff0c;或者也可以作为小伙…

DXP学习2- 绘制电气图【实验】

目录 一、实验目的 二、实验原理 1、创建一个新的项目文件。 2、新建原理图文件 3、设置原理图选项 4、放置元器件 5、其他电路元素的放置 6、对所有电路元素属性参数值的修改 三、实验设备 四、实验内容 1、绘制实验图2-1 元器件所在位置&#xff1a; 1&#xff0c;…

四、Elasticsearch 进阶

自定义目录 4.1 核心概念4.1.1 索引&#xff08;Index&#xff09;4.1.2 类型&#xff08;Type&#xff09;4.1.3 文档&#xff08;Document&#xff09;4.1.3 字段&#xff08;Field&#xff09;4.1.5 映射&#xff08;Mapping&#xff09;4.1.6 分片&#xff08;Shards&#…

基于java+springboot+vue实现的游戏账号估价交易平台(文末源码+Lw+ppt)23-555

摘 要 系统根据现有的管理模块进行开发和扩展&#xff0c;采用面向对象的开发的思想和结构化的开发方法对游戏账号估价交易的现状进行系统调查。采用结构化的分析设计&#xff0c;该方法要求结合一定的图表&#xff0c;在模块化的基础上进行系统的开发工作。在设计中采用“自…

【计算机网络篇】数据链路层(1)数据链路层的地位,问题

文章目录 &#x1f354;数据链路层在网络体系结构中的地位&#x1f354;链路&#xff0c;数据链路&#xff0c;帧&#x1f354;数据链路层的三个重要问题&#x1f95a;封装成帧和透明传输&#x1f95a;差错检测&#x1f95a;可靠传输 &#x1f354;数据链路层在网络体系结构中的…

Tableau学习——范围-线图、倾斜图

1范围-线图&#xff08;人工接听数据&#xff09; 范围-线图&#xff1a;将整体及个体数据特征&#xff08;均值、最值等&#xff09;都展示出来了 筛选出某个员工 &#xff08;1&#xff09;创建计算字段来表示均值、最大值、最小值 &#xff08;2&#xff09;数据处理好后&…

Day61:WEB攻防-PHP反序列化原生类TIPSCVE绕过漏洞属性类型特征

知识点&#xff1a; 1、PHP-反序列化-属性类型&显示特征 2、PHP-反序列化-CVE绕过&字符串逃逸 3、PHP-反序列化-原生类生成&利用&配合 补充&#xff1a;如果在 PHP 类中没有实现某个魔术方法&#xff0c;那么该魔术方法在相应的情况下不会被自动触发。PHP 的魔…

路桥公司知识竞赛活动方案

一、参赛对象 龙建路桥股份有限公司权属企业 二、组织单位 主办单位&#xff1a;龙建路桥股份有限公司委员会 承办单位&#xff1a;黑龙江省龙建路桥第二工程有限公司委员会 三、活动时间 11月&#xff08;具体时间另行通知&#xff09; 四、活动地点 龙建松北综合经营生产中心…

基于Java中的SSM框架实现图书仓储管理系统项目【项目源码+论文说明】计算机毕业设计

基于Java中的SSM框架实现图书仓储管理系统演示 摘要 随着社会经济的迅速发展和科学技术的全面进步&#xff0c;计算机事业的飞速发展&#xff0c;以计算机与通信技术为基础的信息系统正处于蓬勃发展的时期&#xff0c;随着经济文化水平的显著提高&#xff0c;人们对生活质量及…

Token的详解

Token的详解 文章目录 Token的详解前言:简介:使用token&#xff1a; 前言: 为什么会用到Token&#xff0c;因为cookie和session一些自身的缺点&#xff0c;限制了一些功能的实现&#xff0c;比如&#xff1a; cookie&#xff1a;优点是节省服务器空间&#xff0c;缺点不安全。…

如何监控企业微信聊天记录内容

假如说老板可以查看到你的微信聊天记录&#xff0c;那么此时此刻的你&#xff0c;会不会瑟瑟发抖&#xff1f; 其实不用啦&#xff0c;监控企业微信聊天记录&#xff0c;也是需要员工个人同意的。 下面我介绍两种方法&#xff0c;看看你属于哪种 方法一 企业微信自带功能 …

倒计时3天!2024“智衡杯”智能感知挑战赛即将启幕!

为推动智能感知算法领域的发展&#xff0c;发掘高品质的智能感知算法&#xff0c;并促进其在实际应用中落地&#xff0c;“2024‘智衡杯’智能感知挑战赛”将于3月26日盛大启幕&#xff01; 本次大赛由全国人工智能计量技术委员会、先进技术成果长三角转化中心、北京航天计量测…

深入浅出Reactor和Proactor模式

Reactor模式和Proactor模式是两种常见的设计模式&#xff0c;用于处理事件驱动的并发编程。它们在处理IO操作时有着不同的工作方式和特点。 对于到来的IO事件&#xff08;或是其他的信号/定时事件&#xff09;&#xff0c;又有两种事件处理模式&#xff1a; Reactor模式&…

阿里云服务器“镜像”操作系统选择方法(超详细)

阿里云服务器镜像怎么选择&#xff1f;云服务器操作系统镜像分为Linux和Windows两大类&#xff0c;Linux可以选择Alibaba Cloud Linux&#xff0c;Windows可以选择Windows Server 2022数据中心版64位中文版&#xff0c;阿里云服务器网aliyunfuwuqi.com来详细说下阿里云服务器操…