With Pixel 2, Google launched an automatic dark theme that changes according to wallpaper color within launcher and quick settings. This is a half-baked move with users requesting Google a dark system theme for years. There is no way you can manually select between light and dark theme. However, this might be changing with Android P release.
The current approach changes depending on the wallpaper that includes dark folder icons, quick black settings, and a dark app drawer. If your background is neutral or light, you get the standard white UI elements. Back in March, a user has added an item to the dev preview issue tracker asking for a toggle choose the theme. Google has apparently taken steps towards it.
Custom skins like Oxygen OS had this feature all along, while it is missing from the vanilla Android skin. While it still sounds like it might allow you to leave the theme dependent on your wallpaper, and it possibly will work on other phones with launchers based on the stock launcher3 code, but that’s unclear.
A Googler has marked the item as fixed in the bug tracker and replied:
We have added support for a Dark theme to be applied to quick settings and launcher under Settings -> Display -> Device Theme. It will be available in a future Android build.