There are various background colors/themes you can change in Azure Portal. To change the Azure Portal to dark mode follow the below steps
Step 1: Go to Azure Portal
Step 2 : Click on Settings at the top
Step 3: Then Click on Appearence+Startup Views
Step 4: Then choose the dark mode.
Step 5: Click on Apply
As soon as you have clicked on Apply, you can see the Azure Portal in dark mode as shown below
But dark mode is really bad for your eyes..so try to switch to a white mode rather than a dark mode..