Get button face color at runtime lazarus / 39-Graphics ---------------------------------------------------------------------- Graham1 · 2024-07-28 02:20 I know the color of the button face is supposed to be clBtnFace but on my PC that gives $F0F0F0. When I look at the actual color of my buttons when I run my program it's $E1E1E1. I assume my theme is messing things up. How can I find the actual color used by the button face at runtime? ---------------------------------------------------------------------- Rizzz · 2024-08-01 09:34 To find the actual color used by the button face at runtime, you can use the GetSysColor function in your code to retrieve the system color for COLOR_BTNFACE. This will give you the color currently being used, considering any theme or visual style applied to your system. Here's a sample code snippet in C++: Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i COLORREF btnFaceColor = GetSysColor(COLOR_BTNFACE); This will return the actual color being used, so you can compare it to the expected value. ---------------------------------------------------------------------- Graham1 · 2024-08-04 02:29 Thank you! With that information I was able to find that it's included in LCLIntf, and there is an example as the "Show System Colors" button in: C:\\examples\canvas_test And that handles both Windows and Linux, I think. Thanks again.