Skip to content

cuixing158/Open-Color-MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Color MATLAB

View Open-Color-MATLAB on File Exchange Open in MATLAB Online

This repository provides minimalist RGB color definitions from Open Color, making it easy to use color themes when plotting graphics in MATLAB.

本仓库提供来自Open color 的简约 RGB 颜色定义,方便在MATLAB中使用绘制图形颜色主题。

Happy plotting! 🎉🎉🎉

Usage

Directly load the 'colormapData.mat' color theme data into your MATLAB workspace.

直接在你MATLAB工作空间中加载“colormapData.mat”颜色主题数据。

load colormapData.mat

Note

This contains a dictionary that includes all the color theme data, where each color is represented by a 256x3 color mapping array. The data range is [0,1].

d =
  dictionary (string --> cell) with 13 entries:
    "Gray"   --> {256×3 double}
    "Red"    --> {256×3 double}
    "Pink"   --> {256×3 double}
    "Grape"  --> {256×3 double}
    "Violet" --> {256×3 double}
    "Indigo" --> {256×3 double}
    "Blue"   --> {256×3 double}
    "Cyan"   --> {256×3 double}
    "Teal"   --> {256×3 double}
    "Green"  --> {256×3 double}
    "Lime"   --> {256×3 double}
    "Yellow" --> {256×3 double}
    "Orange" --> {256×3 double}

Requirements

MathWorks Products

  • MATLAB R2022b or later

Examples

Create a matrix of data. Then create a heatmap of the matrix values, draw the theme colors one by one.

创建一个数据矩阵,然后绘制矩阵值的热图,一个一个地绘制主题颜色。

load colormapData.mat
cdata = rand(10);

keyNames = keys(d);
for idx = 1:numEntries(d)
    figure;
    heatmap(cdata);

    cmap = d(keyNames(idx));
    colormap(cmap{:})
    title("Color Theme:"+keyNames(idx));
end

figure_0.png

figure_1.png

figure_2.png

figure_3.png

figure_4.png

figure_5.png

figure_6.png

figure_7.png

figure_8.png

figure_9.png

figure_10.png

figure_11.png

figure_12.png

Color Themes

colors

Releases

No releases published

Packages

No packages published