Share this question

Welcome to Teachnovice Q&A, where you can ask questions and receive answers from other members of the community.

This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to find out the solid color used for the Windows Wallpaper?

0 like 0 dislike

I know how to retrieve the wallpaper from the registry:

HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper

But what if the user chooses to use a solid color as a wallpaper, how do I retrieve that specific color?

asked Mar 12, 2015 by Alexandru Pupsa  

1 Answer

0 like 0 dislike
Best answer

You can retrieve it from

HKEY_CURRENT_USER\Control Panel\Colors\Background

It is a string containing a space-seperated tuple "R G B", e.g. "255 0 0" for red, "255 102 0" for orange.

See here for information on acquiring the registry value using C#, C++, F#, and VB.NET.

And the example below for Powershell

# PowerShell Registry Key example
$Registry_Key = "HCU:\Control Panel\Colors\"
Get-ItemProperty -path $Registry_Key -name Background
answered Mar 12, 2015 by Appleman1234