Solved

point

Posted on 2002-04-16
2
139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

631 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