Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

the question of color convert???

Posted on 2002-04-24
6
Medium Priority
?
173 Views
Last Modified: 2010-05-02
i want to know how to convert RGB to CMYK,HTML,HSV AND HEX!!
THANK YOU !!
0
Comment
Question by:ccj76
6 Comments
 

Author Comment

by:ccj76
ID: 6965073
MY EMAIL:CCJ76@163.NET,THANKS
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 6965100
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 200 total points
ID: 6965102
http://www.freevbcode.com/ShowCode.Asp?ID=1734

http://www.freevbcode.com/ShowCode.Asp?ID=457

Public Function RGB2HTMLColor(R As Byte, G As Byte, _
   B As Byte) As String


'INPUT: Numeric (Base 10) Values for R, G, and B)

'RETURNS:
'A string that can be used as an HTML Color
'(i.e., "#" + the Hexadecimal equivalent)

Dim HexR, HexB, HexG As Variant
Dim sTemp As String

On Error GoTo ErrorHandler

 'R
 HexR = Hex(R)
 If Len(HexR) < 2 Then HexR = "0" & HexR
 
 'Get Green Hex
 HexG = Hex(G)
If Len(HexG) < 2 Then HexG = "0" & HexG

HexB = Hex(B)
If Len(HexB) < 2 Then HexB = "0" & HexB



    RGB2HTMLColor = "#" & HexR & HexG & HexB
ErrorHandler:
End Function


0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 22

Expert Comment

by:rspahitz
ID: 6966399
RGB to Hex?

Private function RGB2Hex(Red as integer, Green as integer, Blue as integer) as string
  RGB2Hex = hex$(Blue * 256 * 256 + Green * 256 + Red)
end function
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7660852
Hi ccj76,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept n_narayanan's comment(s) as an answer.

ccj76, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7755423
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

927 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