SCI配色汇总,RGB、HEX、0-1取值,方便选用

在这里插入图片描述

% Define the HEX colors and their corresponding RGB values
hex_colors = {'#8D2F25', '#4E1945', '#CB9475', '#8CBF87', '#3E608D', '#909291'};
rgb_values = [141, 47, 37; 78, 25, 69; 203, 148, 117; 140, 191, 135; 62, 96, 141; 144, 146, 145];

% Convert RGB to MATLAB's color format (0-1 scale)
rgb_norm = rgb_values / 255;

% Display the colors
figure;
for i = 1:length(hex_colors)
    subplot(2, 3, i);
    rectangle('Position', [0, 0, 1, 1], 'FaceColor', rgb_norm(i, :), 'EdgeColor', 'none');
    title(sprintf('HEX: %s \n RGB: %d %d %d', hex_colors{i}, rgb_values(i, 1), rgb_values(i, 2), rgb_values(i, 3)));
    axis off;
end

在这里插入图片描述
在这里插入图片描述

% Define the HEX colors and their corresponding RGB values
hex_colors = {'#B8DBB3', '#72B063', '#719AAC', '#E29135', '#94ACCD', '#445F7E'};
rgb_values = [184, 219, 179; 114, 176, 99; 113, 154, 172; 226, 145, 53; 148, 172, 205; 68, 95, 126];

% Convert RGB to MATLAB's color format (0-1 scale)
rgb_norm = rgb_values / 255;

% Display the colors
figure;
for i = 1:length(hex_colors)
    subplot(2, 3, i);
    rectangle('Position', [0, 0, 1, 1], 'FaceColor', rgb_norm(i, :), 'EdgeColor', 'none');
    title(sprintf('HEX: %s \n RGB: %d %d %d', hex_colors{i}, rgb_values(i, 1), rgb_values(i, 2), rgb_values(i, 3)));
    axis off;
end

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱代码的小黄人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值