I've looked in this article about getting "dark mode" titlebar in winforms WinForms Dark title bar on Windows 10
its obvious you can get the window handle like this (In WPF) instead of using this.Handle
IntPtr hWnd = new WindowInteropHelper(GetWindow(this)).EnsureHandle();
So it works

But I was wondering if I could do this with any color..
Windows 10 and 11 have a setting to turn on any titlebar color in settings, but I was wondering if I could get the hWnd and do this myself per application, since I can turn it to black, why not any other color?

People have been wanting to see how I got this to work
Put this under your class
in whatever function (main?)
get the window handle or hwnd like this
then define the color
the 0x string thing is formatted like this 0xRRGGBB replace the letters to their corresponding values
then make it happen
note: this only works in windows 11
here is the complete version if your lazy
oh yes and import these
Edit: the color goes in the BGR format, so make sure it goes blue, green, red and not red, green blue