发布时间:2024-09-26 18:01
function rgb = hex2rgb(hexString)
r = double(hex2dec(hexString(2:3)))/255;
g = double(hex2dec(hexString(4:5)))/255;
b = double(hex2dec(hexString(6:7)))/255;
rgb = [r, g, b];
end
% 调用
hex2rgb(\'#e5f5f9\')
hex=dec2hex([229,245,249]);
hex=[\'#\',hex(1,:),hex(2,:),hex(3,:)];
rgb = hsv2rgb(hsv);
hsv = rgb2hsv(rgb);