Recent

Author Topic: Colour selector/picker  (Read 394 times)

petevick

  • Sr. Member
  • ****
  • Posts: 388
Colour selector/picker
« on: June 28, 2024, 07:02:13 pm »
I often have the need to insert a colour code into a project. I've been using a colour option from the Object Inspector and copied/paste the result, then change the property back to it's original value (if I remembered what it was !!), which was becoming a bit of a pain. So I rattled what few brain cells I have and quickly came up with the attached project. It's a very small footprint and a minimum amount of code. Hopefully someone might find it as useful as I'm finding it.

Tips...click in each value field to copy the value to the clipboard. Because it's a very small footprint, in Windows there's no room for the title and the min/max border icons, so to minimize use the numeric - key. The bottom combo box holds all the common colour names. The app can be resized should the value text spill outside of the panel.
The app displays to the right of the screen (purely for my selfish needs), it will also stay on top of other windows.
The Colour Picker exe.zip contains a Linux and Windows compiled executable. Colour Picker.zip is the project.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

petevick

  • Sr. Member
  • ****
  • Posts: 388
Re: Colour selector/picker
« Reply #1 on: June 28, 2024, 09:17:29 pm »
I forgot to mention, you'll need to install mbColorLib from the Online Package Manager to compile the project  :-X
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

petevick

  • Sr. Member
  • ****
  • Posts: 388
Re: Colour selector/picker
« Reply #2 on: June 29, 2024, 09:10:38 am »
There is also an issue for Linux dual monitor users, the mbColorLib picker only works on the primary screen, it's totally unresponsive on the secondary screen.
« Last Edit: June 29, 2024, 09:26:41 am by petevick »
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

 

TinyPortal © 2005-2018