Creating 256 color icons/cursors of any color using DevStudio

Environment: VC5, VC6

Introduction

This short article is a "how to" article describing the process of creating 256 color icons and cursors of any color using nothing but DevStudio.

Back in the Windows 3.x days icons were limited to 16 colors and cursors were limited to monochrome. Starting in Windows95 you could use icons and cursors of 256 colors, but they weren't always that easy to create. DevStudio allows you to create 256 color icons and cursors, but you are forced to use their default palette of pastel colors. The palette entries can not be changed. So if the color you want is not there, then all you can do is find the closest color to it.

Creating your own palette

The key to creating icons and cursors of any color is that you can only edit the palette while working on a bitmap file.

Step 1: First start DevStudio.

Step 2: Create a new bitmap by selecting File | New from the menus. (Bitmaps are under the "Files" tab of the New File Dialog.) It doesn't matter the file name or path, because it's just a temporary file.

Step 3: Turn the bitmap into a 256 color bitmap using the properties dialog. Click on the bitmap then press Alt+Enter. On the "General" tab change the colors to 256.

Step 4: Edit the palette. Switch from the "General" tab to the "Palette" tab. Double-click on any color entry to change the color value.

Step 5: Save the palette by selecting Image | Save Palette from the menus.

Step 6: Close the bitmap and create a new icon or cursor, or open an existing icon or cursor.

Step 7: Load the palette you saved in step 5 by selecting Image | Load Palette from the menus. You now can create or edit your icon/cursor using a palette of up to 256 colors of your choice, not defaults from Microsoft.

Note: if you change the palette on an existing icon/cursor you may have to re-paint all the bits in the image. This is because icons and cursors work like GIFs in that the pixel is actually an index into a color table. Since you changed the palette (which is the color table), the indexes now point to different colors.

To help you get started creating custom 256 color icons and cursors, below you can download a "clean" palette. In this palette the first 16 colors are the standard 16 colors used in Windows. The remaining 240 palette entries are all blank (set to white). You can edit these entries and put whatever color you want in there. To use this clean palette; in between steps 3 and 4 load the palette from the Image menu.

Downloads

Download a clean palette - 1 Kb


Comments

  • Excellent

    Posted by Legacy on 06/05/2003 12:00am

    Originally posted by: Manuel

    Very useful!.

    Reply
  • Legend!

    Posted by Legacy on 11/12/2002 12:00am

    Originally posted by: Vince Buttigieg

    Wether the author still checks this listing or not, I'd like to thankyou... been trying to find this solution for a while now ;-)

    Reply
  • Good.

    Posted by Legacy on 08/19/2002 12:00am

    Originally posted by: Nemesis.

    that's great

    Reply
  • Creating 256 color icons/cursors of any color using DevStudio

    Posted by Legacy on 02/26/2002 12:00am

    Originally posted by: Cory

    Thank you!

    I can know create an interface with some style. This has boogled me for a few days now. Why only 16 colors without needing ActiveX.

    Cory

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • According to a 2014 Javelin Strategy & Research Study, there is a new victim of fraud every two seconds – and that's just in the U.S. With identity theft and consumer fraud rising, and more frequent and sizable data breaches in the news, financial institutions need to work harder than ever to protect their customers and their business. Download this white paper to learn how you can use multi-channel communications to minimize the costs of fraud while also increasing customer loyalty.

  • Data integrity and ultra-high performance dictate the success and growth of many companies. One of these companies is BridgePay Network Solutions, a recently launched and rapidly growing financial services organization that allows merchants around the world to process millions of daily credit card transactions. Due to the nature of their business, their IT team needed to strike the perfect balance between meeting regulatory-mandated data security measures with the lowest possible levels of latency and …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date