text: Title: [Bug]: I give an RGB image to imsave but I don't have the right color map!
  Body: ### Bug summary
  
  When I give an RGB image as a list of list of list to imsave, I don't have the right colormap and there is no rgb colormap!
  
  ### Code for reproduction
  
  ```Python
  import matplotlib.pyplot as plt
  I = plt.imread("notre-dame.jpg")
  m,n,p = I.shape #m=largeur, n=hauteur, p=uplet
  J=[[[0 for d in range(p)] for e in range(n)] for f in range(m)]
  K=[[[0 for d in range(p)] for e in range(n)] for f in range(m)]
  L=[[[0 for d in range(p)] for e in range(n)] for f in range(m)]
  for i in range(m) :
      for j in range(n) :
          J[i][j]=[int(I[i][j][0]),0,0]
          K[i][j]=[0,int(I[i][j][1]),0]
          L[i][j]=[0,0,int(I[i][j][2])]
  fig, ax=plt.subplots(4,figsize=(28,10))
  ax[0].imshow(I)
  ax[1].imshow(J)
  ax[2].imshow(K)
  ax[3].imshow(L)
  ax[0].set_axis_off()
  ax[1].set_axis_off()
  ax[2].set_axis_off()
  ax[3].set_axis_off()
  ax[0].set_title('Image complete')
  ax[1].set_title('Composante rouge')
  ax[2].set_title('Composante bleue')
  ax[3].set_title('Composante verte')
  fig.suptitle("Image de Notre-Dame", x=0.51,y=.93)
  plt.imsave("Notre-Dame_rouge.png",J) #The problem is here!
  plt.savefig("Notre-Dame_composante_ex1.png",dpi=750,bbox_inches="tight")
  plt.savefig("Notre-Dame_composante_ex1.pdf",dpi=750,bbox_inches="tight")
  plt.show()
  ```
  
  
  ### Actual outcome
  
  ![Notre-Dame_rouge](https://github.com/user-attachments/assets/8d7c2ca4-c1a1-41e5-a3f6-736c6f1b6b59)
  
  
  ### Expected outcome
  
  ![Notre-Dame_composante_ex1](https://github.com/user-attachments/assets/066b8514-243f-461f-b064-e1b726d42590)
  The red one in a png image!
  
  ### Additional information
  
  ![notre-dame](https://github.com/user-attachments/assets/e23ae1d2-f169-4d59-a06b-dd844287fd30)
  The original image
  
  ### Operating system
  
  Win 11
  
  ### Matplotlib Version
  
  3.9.2
  
  ### Matplotlib Backend
  
  module://matplotlib_inline.backend_inline
  
  ### Python version
  
  3.11.10
  
  ### Jupyter version
  
  _No response_
  
  ### Installation
  
  conda