Managing colour selection on Windows

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Managing colour selection on Windows

Post by SWEdeAndy » Fri Dec 02, 2022 3:01 pm

Thanks Stam, that is a good resource to reuse parts of in the tool I need to build.
I notice now that also Apple's colour picker lacks the ability to save custom colours. So that's definitely something I will want to include.

I think I'm on to something regarding hijacking the colour picker trigger in the IDE:
LCguts.png
Code:
answer color.png
If I intercept that "answer color" line and divert it to my own palette, and return the RGB code, then all should be fine, right?
(Said the colourblind brain surgeon janitor, just before putting the patient under... :D )
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

RogGuay
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Fri Apr 28, 2006 12:10 am
Location: Seattle

Re: Managing colour selection on Windows

Post by RogGuay » Fri Dec 02, 2022 3:46 pm

I too made my own that allows saving color sets (by project name or whatever). It's called ColorPiquer and is available in Sample Stacks or here:
colorPiquer.livecode.zip
(204.02 KiB) Downloaded 75 times
HTH,

Roger

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Managing colour selection on Windows

Post by richmond62 » Fri Dec 02, 2022 3:51 pm

Screen Shot 2022-12-02 at 4.53.12 PM.png
-
Ouch.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Managing colour selection on Windows

Post by SWEdeAndy » Fri Dec 02, 2022 4:03 pm

RogGuay wrote:
Fri Dec 02, 2022 3:46 pm
I too made my own that allows saving color sets (by project name or whatever). It's called ColorPiquer and is available in Sample Stacks or here:
NOW WE'RE TALKING! Great stuff, Roger!
I really should browse the Sample Stacks more often. It's just that the viewer in the IDE is so slow and bad at filtering/searching. I searched just now for "color", and ColorPiquer does not even turn up... So, thanks for the direct link!
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Fri Dec 02, 2022 6:34 pm

richmond62 wrote:
Fri Dec 02, 2022 3:51 pm
Screen Shot 2022-12-02 at 4.53.12 PM.png
-
Ouch.
Not sure what you did there - I’ve been using this to nearly two years and never saw this. Bernd very kindly intervened recently with some changes and reported no such issues either issues.

Any chance of more info than just “ouch”?
I cannot replicate this in any way so any explanation on how you got this error would be helpful...

To be clear, this isn't a "colour picker" as such, it's just a tool to access LiveCode's colorName constants, copy their names or RGB values to insert in script.
Last edited by stam on Fri Dec 02, 2022 8:04 pm, edited 2 times in total.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Fri Dec 02, 2022 6:41 pm

SWEdeAndy wrote:
Fri Dec 02, 2022 3:01 pm
I notice now that also Apple's colour picker lacks the ability to save custom colours. So that's definitely something I will want to include.
That’s not correct. It’s good to have cross platform identical solution of course. But your comment about Apple’s colour picker not saving custom colours is completely wrong I’m afraid ;)

Just pull down the bottom drawer and it will reveal any number of storage slots for colours. I use it ALL the time. The screenshot below is from a new machine, where haven't really stored that many colours yet...
Screenshot 2022-12-02 at 19.01.07.png
So if that is your motivation (and not a cross-platform solution like Roger's impressive stack) maybe have another look at the Apple picker... if you think about it, do you really think Apple, as a premier design platform, wouldn't cater for this?

S.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Managing colour selection on Windows

Post by SWEdeAndy » Fri Dec 02, 2022 8:14 pm

stam wrote:
Fri Dec 02, 2022 6:41 pm
But your comment about Apple’s colour picker not saving custom colours is completely wrong I’m afraid ;)
Ah, you are quite right! I was really wondering what all those little slots were for, when clicking them cause nothing to happen. But I see now that you drag'n'drop colours to them! Just like how Roger's tool works. OK, that's one more lesson learned today! Great! :D

However, it's the Windows deficiencies in the area that are my main headache.

And even with Roger's tool I'm not yet at 100% developer satisfaction. What I additionally need (on both platforms really) is this:

When designing software for some clients, I'm provided with their CVI policy (Corporate visual identity), which includes detailed colour specifications with RGB values. Often such colour choices match no named LC colour (or I can't remember it anyway), so I enter the RGB values each time.

Thus, I'd like to save the colour, and give it a custom name, such as "Volvo blue", or "IKEA yellow", or "Government accent red" etc (no, not actual clients of mine :) ) So that I can easily pick the correct one, even after not having worked on a project for a while. I have a simple text doc list now, or even store them as custom props sometimes, but it would be easier to have a tailor-made colour picker that makes it a one-click business for me.

This thread has given me some great resources and ideas, and so saved me a lot of time in chiselling out my ideal colour management tool.
I've really come to appreciate the spirit of Andre Garzia, who wrote a whole book on the virtues of building your own developer/project tools ("Development Oriented Development"). Time invested now will be saving so much time later.
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Fri Dec 02, 2022 8:24 pm

For colour schemes like that if usually define functions in a back script (eg IkeaYellow() that returns the RGB).
Shouldn’t too hard to create a stack that does that though…

Regarding development oriented development - I do that regularly and share stacks on sample stacks/livecodeshare. More and more though I’m putting these on GitHub - even if free, a licence should be attached, even if it’s an MIT licence (free use in every sense, only requirement is that the licence follows any distribution).
And then of course it increases exposure for the platform as well. At some point maybe the mothership will do the required to get LiveCodeScript to be recognised as an official language on GitHub….

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Managing colour selection on Windows

Post by richmond62 » Fri Dec 02, 2022 8:25 pm

Re: "ouch"; that was with LC 8.1.10 on Mac OS 10.7.5

I try to test it this weekend with something a bit more uptodate.

HOWEVER, am in the process if setting up a schoolroom with repurposed computers in a repurposed hospital that is now a living space for well skint Ukrainian refugees to teach ESL for nix to the kids there on my days off, so, LC matters will take fourth place for now after my ESL school, Ukrainian project, and Devawriter Pro.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Fri Dec 02, 2022 8:29 pm

richmond62 wrote:
Fri Dec 02, 2022 8:25 pm
Re: "ouch"; that was with LC 8.1.10 on Mac OS 10.7.5
Ah… not sure but that may well relate to the LC version then. This was written initially in 9.6.x and the two major revisions were in later versions.

I can’t replicate so let me know how it goes if you test with a “modern” version… sounds like you got your hands full though!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Managing colour selection on Windows

Post by richmond62 » Sat Dec 03, 2022 10:31 am

No "ouch" on MacOS 13.1 beta something with LC 9.6.3.

Wow! Dead Crafty:
-
SShot 2022-12-03 at 11.38.36.png
-
a GROUP . . . of . . .

Explains why my pathetic attempts to set the backGroundColor of lines in a drop-down menu
were a complete and utter waste of time. :roll:

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Sat Dec 03, 2022 3:12 pm

richmond62 wrote:
Sat Dec 03, 2022 10:31 am

a GROUP . . . of . . .
It's a 'group' because it's a datagrid ;)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Managing colour selection on Windows

Post by richmond62 » Sat Dec 03, 2022 3:27 pm

Indeed it is . . .

. . . but I cannot help thinking there might be something simpler.

This:
-
SShot 2022-12-03 at 16.26.29.png
-
is from RevMedia 2.7.1.
Attachments
Color Names Reference.rev.zip
Stack.
(19.7 KiB) Downloaded 49 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Managing colour selection on Windows

Post by richmond62 » Sat Dec 03, 2022 6:15 pm

SShot 2022-12-03 at 19.13.32.png
-
Hack Attack!
Attachments
Color Namez.livecode.zip
Stack
(21.88 KiB) Downloaded 69 times

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Managing colour selection on Windows

Post by stam » Sat Dec 03, 2022 11:59 pm

We obviously have different definitions of "simpler" ;)

Still, as I added to my post above skColorNames is not a color picker, it's a tool to access the 500+ colour constants defined in LiveCode.
I quite like the colour picker from Apple myself - but each to his own 8)

Also quite like using tools like coolors.co...

Post Reply

Return to “Talking LiveCode”