You can customise the interface colours on Mastodon.
If you use the website, go to Preferences > Site Theme and choose the one you want, then click Save Changes. Most Mastodon servers offer a Dark theme, a Light theme and a High Contrast theme, but some servers have a lot more themes to choose from. If you're interested in having more themes on your server, ask your server's admin about it.
If you use the official app, click the cog/gear icon ⚙️ and choose Automatic, Always Dark or Always Light. Optionally you can also toggle "True Black" on or off, which makes dark mode use a much darker background than usual.