Matlab-颜色格式转换

发布时间:2024-09-26 18:01

HEX转化成RGB

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\')

RGB转化成HEX

hex=dec2hex([229,245,249]);
hex=[\'#\',hex(1,:),hex(2,:),hex(3,:)];

HSV转化成RGB

rgb = hsv2rgb(hsv);

RGB转化成HSV

hsv = rgb2hsv(rgb);

ItVuer - 免责声明 - 关于我们 - 联系我们

本网站信息来源于互联网,如有侵权请联系:561261067@qq.com

桂ICP备16001015号