KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: System colors will vary in appearance based on OS
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: January 24, 2019
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

System colors (E.G. Background color, Foreground color, etc.) can be useful when setting colors without needing to explicitly state its RGB value. However, these color can actually vary in appearance depending on whether you are on a macOS or Windows system even when these colors retain the same constant longint value.

Take for example you are styling a listbox to alternate background color every other row. Odd numbered rows will be set to the Background color constant while even numbered rows will be set to Background color none. The images below show how this listbox will look like on each OS.

Windows:



Mac:


Below is a table showing the differences between system colors on each OS.


In conclusion, it may be more preferable to explicit set RBG values instead of system colors in order to retain color uniformity between both operating systems.