Page 1 of 1

mouseColor

Posted: Thu Jan 16, 2014 10:26 pm
by richmond62
People have been finding that mouseColor does not seem to work with 6.5.1 on Windows.

Here's a test stack so everybody can "have a bash" on as many operating systems as possible and report back.

It does work on UbuntuStudio Linux 13.10.
mouseColorTest.rev.zip
Here's the stack
(30.02 KiB) Downloaded 221 times

Re: mouseColor

Posted: Thu Jan 16, 2014 11:41 pm
by PBH
Richmond, this is what I have found so far:

Not working: Win 7 (under Parallels 8) / LC6.5.1 - mouseColor reports "0,0,0" regardless of the colour under the mouse pointer.

Almost working: Mac OS X 10.8.5 / LC 6.5.1 (rc2) - mouseColor reports the "Display Native Values" (or screen colour) of whatever is under the mouse pointer, but this is different to the "Native Object Colour" of the object below the mouse pointer. e.g. For a graphic with a fill of "255,0.0" mouseColor reports "253,0,23" on my system using the standard iMac screen profile, the value changes depending on the screen profile applied in the system preferences.

Working: Mac OS X 10.7.5 / LC 6.5.1 (rc2) - mouseColor reports the "Native Object Colour" of whatever is under the mouse pointer regardless of the screen profile.

Also be aware that changing the pixelScale can break mouseColor, bug reported.

I don't have any Linux machines, although I am tempted to dig out my old G4 and try that someday, just not too sure it's worth all the effort right now.

Paul

Re: mouseColor

Posted: Sun Jan 19, 2014 1:45 am
by capellan
Hi Richmond,

Your mouseColor test stack works fine under
LiveCode 6.5.1 on Lubuntu Linux.

I just made a small change:

1) Add a vector graphic (for example, a circle)
on the card and set the opaque of this vector
graphic to true

2) Change card script to:

on mouseDown
put the mouseColor into tColor
put tColor into fld "numm"
set the backcolor of last grc to tColor
end mouseDown

Al

Re: mouseColor

Posted: Tue Jan 21, 2014 7:29 pm
by richmond62
Here's one that returns the colour for all sorts of places on your screen.
where.livecode.zip
(590 Bytes) Downloaded 213 times

Re: mouseColor

Posted: Tue Jan 21, 2014 7:31 pm
by richmond62
Better version.