Thread: Color Palette
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Color Palette

When you say you need "more" or a "broader range" of colours, if you mean
different to the default 46, palette colours can of course be customized to
any RGB colour. See the link referred by Jason to David McRitcie's
comprehensive page.

However if you mean greater quantity, or you don't want to customize the
default palette, you can still create 2-3000 pseudo unique colours with the
default palette by mixing 2 colours as 25, 50 or 75% pattern shades. It's
not easy to find the correct combinations, but if this is what you need send
me the RGB colours you require and I'll send you the best matches, ie
color-index pairs + shade. (I have an app that colour matches and returns
calculated best combinations).

Regards,
Peter T
pmbthornton gmail com


"Katie" wrote in message
oups.com...
I'm working with VB in Excel 2003, and I need more colors than are
offered on the default palette. Does anyone know if and where I might
be able to get a broader range of colors and their codes? Here's what
my program looks like:

Sub ColorTest()

'Changes cell color based on adjacent to the left cell value
j = 2
While j < 7
i = 2
While ActiveSheet.Cells(i, j - 1) < ""
ActiveSheet.Cells(i, j).Interior.ColorIndex = Switch( _
ActiveSheet.Cells(i, j - 1) < 0.5, 3, _
ActiveSheet.Cells(i, j - 1) < 1, 9, _
ActiveSheet.Cells(i, j - 1) < 1.5, 6, _
ActiveSheet.Cells(i, j - 1) < 2, 12, _
ActiveSheet.Cells(i, j - 1) < 2.5, 4, _
ActiveSheet.Cells(i, j - 1) < 3, 10, _
ActiveSheet.Cells(i, j - 1) < 3.5, 50, _
ActiveSheet.Cells(i, j - 1) < 4, 8, _
ActiveSheet.Cells(i, j - 1) < 4.5, 5, _
ActiveSheet.Cells(i, j - 1) < 5, 11, _
ActiveSheet.Cells(i, j - 1) < 5.5, 7, _
ActiveSheet.Cells(i, j - 1) < 6, 13, _
ActiveSheet.Cells(i, j - 1) < 6.5, 15, _
ActiveSheet.Cells(i, j - 1) < 7, 16)
i = i + 1
Wend
j = j + 2
Wend

End Sub