View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default Fill color based on RGB

What I would like to do is take the colors from AutoCAD (ACI) and create a
layer color table with a color sample in a cell. There are 256 colors in
autocad so to answer your question, 256. I am working on converting AutoCAD
Color Index (ACI) into RGB numbers.


"Peter T" <peter_t@discussions wrote in message
...
ADK, how many unique colours do you envisage (envision) you will need in
total in the workbook.

Mike, the approach you suggested applies the 'nearest' RGB that already
exists in the palette. IOW one of the existing palette colours will be
applied, of which there are 46 in a default palette.

Regards,
Peter T

"ADK" wrote in message
...
A beginner at this vba stuff. Looking to color a cell based on RGB values

Column A has the R numbers
Column B has the G numbers
Column C has the B numbers
Column D will be the where the cells fill color is based on the values
entered in columns A thru C. I'll have 256 rows ...each row will end up
having a different fill color based on the values

Example

A1=255
B1=255
C1=0
D1={cell fill color would be yellow}

A2=255
B2=191
C2=0
D2={cell fill color would be orange}

Thanks in advance for your help!

ADK