Avoid hexadecimal colors and colors with names such as White or Green. Choosing a color for most objects should show you colors with names like ActiveWindow or ForegroundText. These are the colors you want to use. They are also available through code, and you want to select them so that the names have something to do with how they are used. For example, do not set “ForegroundText” as the background color just because you need a black background. If you have a gradient, use these colors to create the gradient. In addition, there is an event that you may need to change the topic.
This is if you decide to respect the topics. If you have a truly external interface, you can specify your own colors. In this case, never use the colors of the windows, because they will not be reliable, and you can be really ugly in something. This means that you will need to go and change all the default values in the standard controls, but if you do this, you probably have your own controls.
In general, all that needs to be remembered is that all or nothing fired: either respect the themes, or always use colors defined based on elements of the Windows widget, or never use themes and never use these colors at all.
Joel Coehoorn
source share