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

  • Event Date: April 15, 2014 The ability to effectively set sales goals, assign quotas and territories, bring new people on board and quickly make adjustments to the sales force is often crucial to success--and to the field experience! But for sales operations leaders, managing the administrative processes, systems, data and various departments to get it all right can often be difficult, inefficient and manually intensive. Register for this webinar and learn how you can: Align sales goals, quotas and …

  • Corporate e-Learning technology has a long and diverse pedigree. As far back as the 1980s, companies were adopting computer-based training to supplement traditional classroom activities. More recently, rich web-based applications have added streaming audio and video, real-time collaboration and other new tools to the e-Learning mix. At the same time, the growing availability of informal learning tools--a category that includes everything from web searches to social media posts--are having a major impact on …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds