2

I need to get the color of text of title bar in Windows 10 because I want to color some text of my form upon this color.

Because the color of windows in Windows 10 can change dynamically with the background, I need to get the text color of title bar for properly coloring my form. For instance, if the Windows 10 color is yellow

enter image description here

the text is black, while if the color is blue

enter image description here

the text is white: I want the color of the text.

Where can I find it?

So far I properly set only the background color of my title bar with DWMCOLORIZATIONPARAMS through ColorizationColor, but I can not find a way to get the forecolor.

Tomislav Stankovic
  • 3,080
  • 17
  • 35
  • 42
HeisenPark
  • 23
  • 1
  • 5
  • Check [this](http://stackoverflow.com/a/3943023/501082) for exact algorithm and [this](http://stackoverflow.com/a/13670173/501082) to get the accent color for the title bar. Works well on my side. Tested on Windows 10. – Nazar Grynko Feb 10 '17 at 23:59

1 Answers1

0

I believe that the SystemColors.ActiveCaptionText should be the one you need. This changes dynamically according to the current profile.

Gets a Color structure that is the color of the text in the active window's title bar.

Link: SystemColors.ActiveCaptionText

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143