Thursday, January 21, 2010

colors

colors are important if you want your MATLAB plots to be aesthetically pleasing. which you should. because it makes life more enjoyable. i mean, see how the colors of the header image and the titles and links sort of match each other on this page, that is NOT by accident. and it pleases me.

another advantage of specifying your own colors is that you can make a bunch of personal colors that convert to the correct gray-shade. that way you can make one set of images for presentations (colorful!) and easily convert it to grey shade for papers. ingenious!

here's a webpage with the RGB codes for many colors:
http://en.wikipedia.org/wiki/Web_colors

in matlab colors are specified with RGB values between 0 and 1, not 0 and 255. so simply specify the code given on that page, e.g. i,j,k, like so: [i/255 j/255 k/255]

example:
plot(.6,1.5,'o', 'MarkerEdgeColor', [0 0 0], 'MarkerFaceColor', [70/255 130/255 180/255], 'MarkerSize',11, 'LineWidth', 1.5);

steel blue, mmmmmm.

btw, "coulours" is one of my favorite songs by The Prodigy.

2 comments:

  1. steel blue is a decent name, but you really should start using gun metal blue it will make you sound and look way cooooooler.

    ReplyDelete
  2. duly noted. i definitely want to be cooler.

    ReplyDelete