KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Colors, Palettes, 4D 3.x.x and 4D V6
PRODUCT: 4D | VERSION: 6.0 | PLATFORM: Mac & Win
Published On: October 1, 1997
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

This technical note explains the process of converting a 4th Dimension 3.x.x database with a customized color palette, to version 6.0. It contains valuable information for those who write 4D extensions that deal with customized colors and palettes.

Starting with 4th Dimension 6.0, colors on Macintosh are no longer restricted (*) to the 256 simultaneous colors predefined by a color palette (‘pltt’ resource) stored in the resources of the application (4D, Runtime, Client, Compiled/Merged applications).

The benefits are:

• If you copy and paste any picture from any graphical application that includes a custom color table, the picture is now displayed with its actual colors(*) and no longer with the best approximative colors coming from the ‘pltt’ resource.
• 4th Dimension no longer installs the ‘pltt’ resource (it no longer calls the Mac OS SetPalette routine).
• All objects now store their colors as 24-bit $RRGGBB values rather than as color indexes within the ‘pltt’ resources.
• The ‘pltt’ resource that supports color menus can now be freely customized; its role is now only for the user interface.

* Note however, that the colors are still subjected to approximations if your monitor is in 256 colors or less, if your video card does not support more than 256 colors, or if a 4D Extension itself sets a color palette to a window.

Tech Note