[note] int to hex for html color

把 RGB 轉成 html 可用的色碼,就降

def rgbtohex(red, green, blue):
    result = hex(red)[2:-1] + hex(green)[2:-1] + hex(blue)[2:-1]
    return result

張貼留言

0 留言