0

I am using the colormap "turbo" in MATLAB. The transition of color is red--orange--yellow--green--light blue--dark blue. Can I create a similar colormap with a different color transition? For example: green--blue--purple--red--orange--yellow. Is there an easy way to do that?

I know that MATLAB uses three-column data format to specify each color, but I don't know how to generate a beautiful color transition by manipulating the digits.

Thank you for any input.

Aurora7979
  • 13
  • 4
  • Check the [following post](https://stackoverflow.com/questions/17230837/how-to-create-a-custom-colormap-programmatically). Adjust the colors for creating your desired custom colormap. – Rotem May 09 '23 at 09:07
  • See the interactive [`colormapeditor`](https://www.mathworks.com/help/matlab/ref/colormapeditor.html) tool built into Matlab. – horchler May 09 '23 at 12:52

1 Answers1

0

You can play with colormapeditor, that will launch an interactive color map editor.

Once you are satisfied with your colormap, you can get the nColor-by-3 matrix in a variable cmap by calling cmap = colormap

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 10 '23 at 16:57