Changing the background color of a map

Hello everyone! Thank you for taking the time to read my question.

I am plotting global temperature differences from a netCDF file using fig.grdimage. The data is correctly plotted, but for some reason, the color of the ocean remains gray, although I have set it to white. This has happened to me before when plotting from a netCDF using grdimage. Is there a way to change that? I want the ocean areas to be white or transparent but not colored.

I appreciate any guidance you can provide on this.

Code I am using:

fig = pygmt.Figure()
fig.coast(land="white",  
          water="white", shorelines="1/0.8p", borders=["1/0.5p"],  region=[-180, 180, -65, 85], projection="Cyl_stere/30/-20/12c")
fig.basemap(frame=["afg"])
pygmt.makecpt(cmap="seis![Temp_diff|690x455](upload://vuvluZ0WbLdOQVIhcAu0XZxhT8m.png) ", series=[-5,5,1])
fig.grdimage(grid=grid, region=[-180, 180, -65, 85], projection="Cyl_stere/30/-20/12c", shading= False, cmap=True, transparency= 30)
fig.colorbar(position="JBC", frame=["agf", "x+lTemp diff", "y+l (C)"])

fig.show()![Temp_diff|690x455]

I dont see any -Q option in grdimage so it will color NaNs grey as by default. Either add the -Q option (equivalent one in pyGMT) or use a CPT which N white.

Thank you very much @pwessel! I used the option nan_transparent=True and it worked. I appreciate your help.