Skip to content

Instantly share code, notes, and snippets.

@jnkather
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnkather/68c1d89e9519d66cf184 to your computer and use it in GitHub Desktop.
Save jnkather/68c1d89e9519d66cf184 to your computer and use it in GitHub Desktop.
Show a CIELAB color cube composed of 15^3 balls
% JN Kather, 2015
% Show a CIELAB color cube composed of 25^3 balls
% note: Matlab CIELAB colorspace goes approx. from -108 to +100 as measured
% with: colors = rgb2lab(jet(100)); min(colors(:)), max(colors(:))
figure();
[X,Y,Z] = meshgrid(linspace(-108,100,15));
colors = lab2rgb([double(X(:)),double(Y(:)),double(Z(:))]);
scatter3(X(:),Y(:),Z(:),100,colors,'filled');
xlabel('L'); ylabel('a'); zlabel('b');
axis equal tight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment