Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added CrameriColourMaps8.0.mat
Binary file not shown.
24 changes: 20 additions & 4 deletions crameri.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
figure('menubar','none','numbertitle','off','Name','crameri options:')

if license('test','image_toolbox')
imshow(imread('crameri7.0.png'));
imshow(imread('crameri8.0.png'));
else
axes('pos',[0 0 1 1])
image(imread('crameri7.0.png'));
image(imread('crameri8.0.png'));
axis image off
end

Expand Down Expand Up @@ -94,7 +94,7 @@
end

% Standardize all colormap names to lowercase:
ColormapName = lower(ColormapName);
ColormapName = (ColormapName);

% Oleron's too hard for me to remember, so I'm gonna use dem or topo.
if ismember(ColormapName,{'dem','topo'})
Expand Down Expand Up @@ -124,7 +124,7 @@
%% Load RGB values and interpolate to NLevels:

try
S = load('CrameriColourMaps7.0.mat',ColormapName);
S = load('CrameriColourMaps8.0.mat',ColormapName);
cmap = S.(ColormapName);
catch
error(['Unknown colormap name ''',ColormapName,'''. Try typing crameri with no inputs to check the options and try again.'])
Expand Down Expand Up @@ -171,3 +171,19 @@
%
% clear f k
% save('CrameriColourMaps7.0.mat')

% Code used to generate the 8.0 map:
% Unzip the latest folder, navigate to that filepath, and run this.
%
% clearvars
% c = (dir('**/*.mat')); % get all .mat files (avoids the need to update f ^above)
% for f = 1:numel(c)
% if contains(c(f).name,{'0','5','S'}) % To only load the 256x3 .mat files
% continue
% else
% load(fullfile(c(f).folder,c(f).name));
% end
% end
%
% clear f c
% save('CrameriColourMaps8.0.mat')
Binary file added crameri8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.