473,809 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript "Eyedropper " (pulls color of a pixel off a page)

Is there any way to use javascript to pull the color of the pixel under
the mouse pointer off the page?

Thanks,

Weston
~==~
http://weston.canncentral.org/
weston8[at]cann8central.or g
(remove eights to email me)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
3 6224
Weston C wrote:
Is there any way to use javascript to pull the color of
the pixel under the mouse pointer off the page?


Not really. You, with more or less ease, could work out which element
the mouse was over, and then, on browsers providing a computed style
interface, determine the text, background and border colours of that
element. But telling whether the pointer was over text or the background
or a border would not be easy (and borders may still be inset, outset,
etc and so not necessarily the declared colour under the pointer). And
there would be no chance with images (including background images).

Richard.
Jul 23 '05 #2
In <ci************ *******@news.de mon.co.uk> Richard Cornford wrote:
Weston C wrote:
Is there any way to use javascript to pull the color of
the pixel under the mouse pointer off the page?


Not really. You, with more or less ease, could work out which element

<snip>

Absolutely none, particularly off the page. You can try to do what
Richard says, except that will not allow for shadows, anti-aliasing, etc.
and even if you could do it, it will not work off the page since your
document must be inside a window.

You can do it with a Java applet maybe, but this is not the place to ask
such things.
Jul 23 '05 #3
On 15 Sep 2004 08:00:01 GMT, Fred Oz wrote:
You can do it with a Java applet maybe, ..


<caveat>
Only if it were a signed applet that
the user accepted and allowed to run.
</caveat>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4011
by: Neraph | last post by:
Sorry, I'm somewhat of a newbie at this. I'm looking for a method of grabbing the color of a pixel when clicking on an image (obviously, using javascript). Google searching hasn't returned anything useful for me. Thanks.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10637
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10379
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.