Solved

point

Posted on 2002-04-16
2
134 Views
Last Modified: 2010-05-02
I retrieve the color of a pixel with the point command...
problem though is that i get a strange large number like 543005 or something like that.

Is it possible to change this number into a html color, like: #FFFFFF for white

??
0
Comment
Question by:michael123199
2 Comments
 
LVL 1

Accepted Solution

by:
olx earned 50 total points
ID: 6946412

HEX(StrangeNumberObtained) ?

in vb the # stands for double precision, but in html have no idea
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6946420
Actually what you want to do is to PARSE that number into its three parts: Red + 256*(Green+ 256*Blue))

red = 29 = #1D (Hex)
Green = 73 = #49 (Hex)
Blue = 8 = &08 (Hex)

so the hex string would be #08491D or #BBGGRR

you can also get this with the HEX() function:

Hex(543005) = 8491D = #BBGGRR ==> BB=08, GG=49, RR=1D

Arthur Wood
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question