live preview of color changes - possible?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Sjatplat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 75
Joined: Wed Jun 22, 2011 1:53 pm

live preview of color changes - possible?

Post by Sjatplat » Sun Mar 23, 2014 2:12 pm

The color wheel/color chooser in Livecode really hasn't changed much since the beginning and I guess it's because they use the system specific color chooser.

But since Livecode is a rad enviroment I think the possibility to save the custom colors with the stack and have live preview of the colors you pick would be nice.


Anyway - does anybody know of a plugin that does this?

Sjat

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: live preview of color changes - possible?

Post by dunbarx » Sun Mar 23, 2014 5:59 pm

Hi.

Couldn't you save a custom palette of colors in a custom property, and choose from that? It would be a terrific tool if you need that sort of thing.

Craig Newman

Sjatplat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 75
Joined: Wed Jun 22, 2011 1:53 pm

Re: live preview of color changes - possible?

Post by Sjatplat » Sun Mar 23, 2014 6:42 pm

I'm doing that already. What I'm looking for is a way to preview color changes you do when you use the color dialog. As it is now you have to choose a new color and press ok in the color dialog to see the changes. If you're not happy you have to open it up again and so on. This might sound like a lazy thing but when you're testing colors to get a rough idea on how the colors in your design should look it becomes tiresome.

Sjat

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: live preview of color changes - possible?

Post by dunbarx » Sun Mar 23, 2014 6:57 pm

Ah.

I know exactly what you mean. It is tedious to do that.

Could you import a snapshot of the color wheel into a image and use the "mouseColor" to test the waters? I wonder how accurate that would be in comparison to the actual color picker. But it may be fine for most contingencies.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: live preview of color changes - possible?

Post by dunbarx » Sun Mar 23, 2014 7:11 pm

This was easy.

Make an object and go to its color pane in the inspector. Select the "foreColor", for example. When the color wheel shows up, do a screen shot (cmd-shift-4) and grab just the wheel. Import as an image control to your stack. Make a graphic and a field. Set the opaque of the grc. Put this into the stack script:

Code: Select all

on mouseMove
if the mouseLoc is within the rect of img 1 then
   set the backcolor of grc 1 to the mouseColor
   put the mouseColor into fld 1
end if
end mouseMove
From that you should be able to write a gadget that does what you need. Maybe each time you click in the color wheel that RGB value is stored in a list? Whatever.

Craig

Sjatplat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 75
Joined: Wed Jun 22, 2011 1:53 pm

Re: live preview of color changes - possible?

Post by Sjatplat » Sun Mar 23, 2014 7:15 pm

Yeah, I'm considering building a color dialog myself ( with hex color values++ and other things you absolutely can't live without if UI design is important) , but wondered if there was something out there already. Tactile media had some good stuff - but they are updating their plugins....

Post Reply