Figure marker colors change slightly on export
7 views (last 30 days)
I'm creating a figure with marker colors defined using custom rgb identifiers in the 0 to 1 format (e.g. [.1 0 .6]). Upon save with the print() or saveas() functions, the colors are slightly altered.
I assume this is because upon export, MatLab defaults to some standard 256 color palette and changes the colors to closest fit. How can I circumvent this and keep the exact colors I've defined?
Mahdiyar on 5 Apr 2015
Edited: John Kelly on 19 May 2016
Somtimes, since the computer has not the font that you are using in the matlab, it may cause such a problem like this.
If you need to save the figure exactly the same as you see on the figure, it would be better to use some kind of tools like Snniping in windows to take the photo from the screen with high resolution. Of course, if you do not have many figures.
Jan on 5 Apr 2015
Matlab does not use a 256 color palette. RGB values remain exactly as they are defined, except if you modify them explicitly, e.g. when you export the contents of the figure to a 256-color PNG. So please post the code you are using for the export and explain how you detect the changes. Perhaps only the tool, which opens the images afterwards modify the colors.