ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PANTONE to custom color (https://www.excelbanter.com/excel-programming/334401-pantone-custom-color.html)

AlexT

PANTONE to custom color
 
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


Tom Ogilvy

PANTONE to custom color
 
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

--
Regards,
Tom Ogilvy

"AlexT" wrote in message
oups.com...
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




Jim Cone

PANTONE to custom color
 
--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


"AlexT" wrote in message
oups.com...
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


AlexT

PANTONE to custom color
 
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


Peter T

PANTONE to custom color
 
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

"AlexT" wrote in message
oups.com...
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





All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com