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:

Managing colour selection on Windows

Post by SWEdeAndy » Thu Dec 01, 2022 8:56 pm

Recently, I’ve had the misfortune to have to work with LiveCode in Windows 10.

I’ll spare you my rant about the ugliness/clunkiness of it all (comes with the territory), but one thing in particular annoys the hell out of me:
Selecting colours from the colour palette/chooser thingy!

On Mac we have Apple’s multi-facetted colour chooser with five different panes, some of them with four different styles/methods for selecting colours. Many different lists with colour names, ’web safe’ colours, crayons, spectrums, you name it.

On Windows, we get this (disregard the Swedish locale):

colourChooser.PNG

THIS!!!

Seriously!?

I’m colour blind and need colour names indicated to help me tell apart shades of e.g. green vs brown, blue vs violet etc. And even if you have normal colour sight, it must still be so much easier to work with the Mac style colour palettes than the poor, crappy Win excuse for a colour chooser, right?! (It doesn’t even save the customs colours you pick, till next time!)

So, those of you using LiveCode on Windows - what workarounds do you have for colour selection?

I’m seriously thinking of building my own colour selection console to sidestep the Windows default atrocity.
But I can't be the first person considering reinvention of that wheel - right...? :)
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

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 » Thu Dec 01, 2022 9:22 pm

Not much better on Linux.

But, hang on while I finish my supper and turn my computer on because I do have a mad idea.

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 » Thu Dec 01, 2022 9:39 pm

SShot 2022-12-01 at 22.35.22.png
-
I have just "stolen" the colour chooser stack from MetaCard (!!!) and made it a substack of a stack called 'Holder',
it throws error messages when you open it: BUT . . .
-
SShot 2022-12-01 at 22.38.32.png
-
SShot 2022-12-01 at 22.38.50.png

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 » Thu Dec 01, 2022 9:41 pm

SShot 2022-12-01 at 22.38.56.png
-
SShot 2022-12-01 at 22.39.03.png
-
These snapshots are from Macintosh: but I suspect they will be the same on Windows

(they show up as much the same on Linux):

and I suspect the colour names will be extremely useful for you.

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 » Thu Dec 01, 2022 9:46 pm

Oops: feeling stupid as forgot to attach the stack.

Sorry. :?
Attachments
Holder.livecode.zip
Stack.
(6.29 KiB) Downloaded 45 times

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 » Thu Dec 01, 2022 9:48 pm

Thanks Richmond! Yes, something like that is what I have in mind, and then make it apply on the selectedObject or something, like the Object Inspector does. And I'd add some feature for saving custom RGB values.
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Managing colour selection on Windows

Post by SparkOut » Thu Dec 01, 2022 9:49 pm

I'm not colourblind, so my experience can't be measured the same way, but I don't have a problem with Windows or its colour picker.
I do or have worked on both Mac and Linux (a few Debian distros, and mostly Mepis and more latterly Mint).
There are advantages and disadvantages to all, and it's all subjective, but I would say Windows is the best O/S and best UX. (So stone me, it's fashionable.)
That said, I do wish that there was a bit more cross-platform parity in a cross-platform product, and a little less focus on Apple/iOS, but on the whole, the mothership do create an admirably platform independent environment.



PS when I can get on a computer, I will try and see what Richmond's stack looks like on Windows.

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 » Thu Dec 01, 2022 9:53 pm

Somewhere "down the line" the LiveCode people decided to remove the integrated colour chooser
they had inherited from MetaCard and replace it with something that opened into the colour chooser
of the operating system the IDE was working on: and, if you are running things on a Macintosh
computer that's all very fine and dandy, but if you are running things elsewhere things are just not so good.

At the weekend I shall have a poke at RevMedia 4.0 and LiveCode 6.x.x. on some of my groovy 'mature' Macs
and see if I can work out when that decision was taken.

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 » Thu Dec 01, 2022 10:03 pm

SShot 2022-12-01 at 23.01.58.png
-
THIS is also worth playing with.
Attachments
Colour Me.livecode.zip
Stack
(2.42 KiB) Downloaded 49 times

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Managing colour selection on Windows

Post by FourthWorld » Fri Dec 02, 2022 1:50 am

SparkOut wrote:
Thu Dec 01, 2022 9:49 pm
I do wish that there was a bit more cross-platform parity in a cross-platform product
All three LC desktop implementations use the default OS-provided color picker users on each platform are most accustomed to seeing, don't they?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 7:44 am

Screen Shot 2022-12-02 at 8.45.18 AM.png
-
Certainly, as far back as RevMedia 4 (here on MacOS 10.7.5) RR/LC used the operating system's own colour chooser.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Managing colour selection on Windows

Post by SparkOut » Fri Dec 02, 2022 8:19 am

FourthWorld wrote:
Fri Dec 02, 2022 1:50 am
SparkOut wrote:
Thu Dec 01, 2022 9:49 pm
I do wish that there was a bit more cross-platform parity in a cross-platform product
All three LC desktop implementations use the default OS-provided color picker users on each platform are most accustomed to seeing, don't they?
Yes it does, for the colour picker and many other features. If I wasn't on a phone and finding it cumbersome to type, I would have mentioned that too. There are some areas where cross platform features within LiveCode are not the same (eg browser implementation on Linux) but the mothership do a largely admirable job in keeping LC multi platform.

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 9:36 am

Screen Shot 2022-12-02 at 10.37.24 AM.png
-
I wonder where THIS is in the Windows version . . .

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 10:37 am

Ideally, I would like to hack the IDE so that when I click on one of these buttons in the object inspector, I get my custom colour picker instead of the default OS one:
oi.png
oi.png (14.39 KiB) Viewed 3518 times
Anyone knows which lines of which script of which stack I'd need to hack for that, and how to avoid generally breaking LiveCode in the process...?
(Yes, I would experiment on a copy/separate version, but still... I'll feel like a janitor doing brain surgery... :D )
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 10:41 am

richmond62 wrote:
Thu Dec 01, 2022 10:03 pm
SShot 2022-12-01 at 23.01.58.png
-
THIS is also worth playing with.
You could just use the stack I published on SampleStacks/liveCodeShare some time ago. I used FerrusLogic's TinyColor library as an easy way to set the text color to always be appropriate for the backgroundColor and included a quick 'search' function.

Recently, Bernd very kindly made some suggestions to sort the grey values correctly (so they follow a text rather than numerical sequence) and to copy the the RGB values, in a addition to the original copying of the colourName... double-click on a color to copy the colorName constant or right-click to copy the RGB values...
skColorNames.jpg
Drop it into your plugins folder to use as plugin (that's what I do). Look for it in Sample Stacks or the web front end to this on LiveCodeShare:
https://livecodeshare.runrev.com/stack/982/SkColorNames

HTH
Stam

Post Reply

Return to “Talking LiveCode”