PANTONE to custom color

A

AlexT

Folks...

I need to write some code that would set the background color of a cell
to a custom value based on a Pantone color...

So I will probably need to get some RGB approximation and apply it to
the cell.

As I'd hate to reinvent the wheel I'm just asking around here.

:)

Regards

--alexT
 
T

Tom Ogilvy

Excel only supports 56 colors in the worksheets (fonts and backgrounds).
If you assign an RGB color that doesn't match, Excel will use the available
color closest to it. You can alter the 56 colors by editing them in
Tools=>Options=>Color tab. This custom pallete will be stored with the
workbook.

David McRitchie has a page on colors in Excel that you might want to look
at:

http://www.mvps.org/dmcritchie/excel/colors.htm
 
J

Jim Cone

--alexT,

There is a cross reference list showing Pantone number,
RGB numbers and Hex number at...
http://www.seoconsultants.com/css/colors/conversion/

Jim Cone
San Francisco, USA


Folks...
I need to write some code that would set the background color of a cell
to a custom value based on a Pantone color...
So I will probably need to get some RGB approximation and apply it to
the cell.
As I'd hate to reinvent the wheel I'm just asking around here.
:)
Regards
--alexT
 
A

AlexT

Folks

Many thanks for all those excellent resources.

I might very well have overlooked something but I was under the
impression that all I woud need to do is to lookup the PANTONE
equivalence and then do something like

Cells(i + 1, 1).Interior.color = myPantone

well... That doesn't work... So I guess I have to first define one of
the 56 colors as being my Pantone and then assign it. I might be stupid
but I'm not quite sure as of how to do this...

Best regards

--alexT
 
P

Peter T

Hi alexT

You are thinking along the right lines, customize one of the 56 palette
colours. A simple way might be like this -

Choose the coloured square on the palette you want to customize, and fill a
cell with that colour

With this cell still active, run this

Sub Test()
Dim x As Long
x = ActiveCell.Interior.ColorIndex
If x > 0 Then ActiveWorkbook.Colors(x) = RGB(10, 110, 210)
End Sub

If interested I have a workbook that will display 1,000+ typical print
colours (roughly similar to those in the link provided by Jim), the 140
named wed colours, and another large print swatch.

Regards,
Peter T

pmbthornton at gmail com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top