ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Coloring of Excel Chart (https://www.excelbanter.com/charts-charting-excel/97746-coloring-excel-chart.html)

Darryn Lavery

Coloring of Excel Chart
 
Re-posting from

http://forums.microsoft.com/MSDN/Sho...26051&SiteID=1

Thanks

Darryn

------

Hello,

I'm generating Excel-Charts via VSTO in VB .NET. For the Seriescollections I
want to set given RGB-Values like RGB(223, 0, 48) for red. But the colors are
different from the colors, when I generate Chart objects in Excel-VBA.

It seems that the RGB-Colors in VSTO / VB .NET not scalable like it shoud
be. It seems furhter more that there are only a few colors avialable, wenn I
increase or decrease the RGB-Colors they only get brighter or darker in
intervalls.

e.g.
mySeries.Interior.Color = RGB(223, 0, 48) shows the same color as
mySeries.Interior.Color = RGB(204, 0, 35)

My Screen-Setting are settet to 32-bit true color. Do you have any ideas how
to solve this phenomenon?





Andy Pope

Coloring of Excel Chart
 
Hi,

Excel is restricted, in some areas, to a 56 colour palette. Charts is
one such area. When you specify the RGB colour Excel maps it to the
nearest colour in it's palette.

For details on colour in excel see here,
http://www.mvps.org/dmcritchie/excel/colors.htm

For a demonstration, not solution, of your problem in action see here,
http://www.andypope.info/charts/spectrum.htm

Cheers
Andy

Darryn Lavery wrote:
Re-posting from

http://forums.microsoft.com/MSDN/Sho...26051&SiteID=1

Thanks

Darryn

------

Hello,

I'm generating Excel-Charts via VSTO in VB .NET. For the Seriescollections I
want to set given RGB-Values like RGB(223, 0, 48) for red. But the colors are
different from the colors, when I generate Chart objects in Excel-VBA.

It seems that the RGB-Colors in VSTO / VB .NET not scalable like it shoud
be. It seems furhter more that there are only a few colors avialable, wenn I
increase or decrease the RGB-Colors they only get brighter or darker in
intervalls.

e.g.
mySeries.Interior.Color = RGB(223, 0, 48) shows the same color as
mySeries.Interior.Color = RGB(204, 0, 35)

My Screen-Setting are settet to 32-bit true color. Do you have any ideas how
to solve this phenomenon?





--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


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

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