Create a range of solid colors for Desktop backgrounds

Nov 12, '09 07:30:00AM

Contributed by: techiejohn

Mac OS X Leopard and Snow Leopard come with a paltry set of solid colors for desktop backgrounds. This is easily remedied with the ImageMagick package (available for install through both MacPorts and Fink), and a quick Terminal command.

The script below generates all the background images for web-safe colors that should then be immediately available for use in the Solid Colors section of the Desktop tab of the Desktop and Screen Saver System Preferences panel.

cd /Library/Desktop\ Pictures/Solid\ Colors; for r in 00 33 66 99 cc ff; do for g in 00 33 66 99 cc ff; do for b in 00 33 66 99 cc ff; do echo Creating image for color $r$g$b; convert -background "#$r$g$b" -page 256x256 text:- "Background $r$g$b.jpg" < /dev/null; done; done; done
You can copy and paste the script into Terminal, but you’ll need to be a system administrator for it to succeed, because it writes the images into /Library/Desktop Pictures/Solid Colors.

[robg adds: I tested this on a 10.5 machine, and it works as described. If you just have a few solid colors you want to use, you can create them yourself, as we covered in this hint. In addition, if you'd like to make it possible to use any color as your desktop background, you can create a 128x128 transparent PNG, and then use a color picker to set the color of the desktop to anything you like -- see this hint for more details.]

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20091101133818705