Skip to content

Instantly share code, notes, and snippets.

@kmundnic
Created August 10, 2018 01:18
Show Gist options
  • Save kmundnic/57701986f255675d28913774751c34ee to your computer and use it in GitHub Desktop.
Save kmundnic/57701986f255675d28913774751c34ee to your computer and use it in GitHub Desktop.
clear; close all; clc;
c = get(gca,'colororder');
close;
for i = 1:size(c,1)
string = ['\definecolor{mycolor', num2str(i), '}{rgb}{',...
num2str(c(i,1),'%.4f'), ',', num2str(c(i,2),'%.4f'), ',', num2str(c(i,2),'%.4f'), '}'];
disp(string)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment