Does anyone know of a reliable way get the default color of a form (as in clDefault) in RGB? I am writing some code to prepare bitmaps and I want their background to match the default color of a form. Unfortunately I don't see a way to convert clDefault to an RGB value. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191013/66b13edd/attachment.html>
Mailing lists / lazarus / 2019-10
Default color of form in RGB?
5 messages · 3 people ·
- AAnthony Walter 3
- BBart 1
- JJohn Landmesser 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Anthony Walter wrote 5 lines
Just an idea:
https://www.maketecheasier.com/color-picker-tools-for-linux/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191013/0f324598/attachment.html>
Okay, you made me laugh, but I hope you were joking. Just to be clear I don't mean to ask how to get the color of something on my screen, I meant how to calculate at runtime the default color of a form in RGB on all platforms without having to take a screenshot of the form. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191013/3f6e5c03/attachment-0001.html>
Does anyone know of a reliable way get the default color of a form (as in clDefault) in…
PM Anthony Walter wroteDoes anyone know of a reliable way get the default color of a form (as in clDefault) in RGB? I am writing some code to prepare bitmaps and I want their background to match the default color of a form. Unfortunately I don't see a way to convert clDefault to an RGB value.
Asked a similar question once before.
Here's Zeljko's answer to that:
No, clDefault is incorrect at any time. To obtain color we have:
function GetColorResolvingParent: TColor;
function GetRGBColorResolvingParent: TColor;Bart, that was exactly what I was looking for. Thank you so much! -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191013/0e3f6079/attachment.html>
