To split an image into its RGB color bands, you can use the imread and imwrite functions in MATLAB. Here's an example:
main.m486 chars21 lines
Note that this code assumes that myimage.jpg is in the current working directory. You may need to modify the path to the image file if it is in a different location.
Also, please note that I do not endorse or recommend dyeing your hair with fake coloring, especially if you are not a professional hair stylist. This answer is for educational purposes only.
gistlibby LogSnag