Solved

the question of color convert???

Posted on 2002-04-24
6
158 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
Comment Utility
MY EMAIL:CCJ76@163.NET,THANKS
0
 
LVL 3

Expert Comment

by:n_narayanan
Comment Utility
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 50 total points
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now