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

  • When individual departments procure cloud service for their own use, they usually don't consider the hazardous organization-wide implications. Read this paper to learn best practices for setting up an internal, IT-based cloud brokerage function that service the entire organization. Find out how this approach enables you to retain top-down visibility and control of network security and manage the impact of cloud traffic on your WAN.

  • U.S. companies are desperately trying to recruit and hire skilled software engineers and developers, but there is simply not enough quality talent to go around. Tiempo Development is a nearshore software development company. Our headquarters are in AZ, but we are a pioneer and leader in outsourcing to Mexico, based on our three software development centers there. We have a proven process and we are experts at providing our customers with powerful solutions. We transform ideas into reality.

Most Popular Programming Stories

More for Developers

RSS Feeds

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