📅  最后修改于: 2022-03-11 15:03:50.147000             🧑  作者: Mango
function hex2RGB(hex){
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
return `${r}, ${g}, ${b}`;
}