ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   RGB fill color not right (https://www.excelbanter.com/excel-programming/436869-rgb-fill-color-not-right.html)

Lucky[_6_]

RGB fill color not right
 
Excel 2003. I'm using VBA's graphics methods to draw a large area on
the screen that is not exactly square. I then fill this area with a
solid RGB color. No pattern or transparency or anything, just a solid
beige color. Sometimes the area appears with the color I want, and
sometimes it's way too light, almost white. I can't figure out how to
fix this. Any ideas?

JLGWhiz[_2_]

RGB fill color not right
 
Maybe have a serious talk with your VGA card? <g


"Lucky" wrote in message
...
Excel 2003. I'm using VBA's graphics methods to draw a large area on
the screen that is not exactly square. I then fill this area with a
solid RGB color. No pattern or transparency or anything, just a solid
beige color. Sometimes the area appears with the color I want, and
sometimes it's way too light, almost white. I can't figure out how to
fix this. Any ideas?




Tim Williams[_2_]

RGB fill color not right
 
XL2003 has a limited color palette (56 distinct color slots I think) - if
you specifiy a color which isn't on the palette Excel will "automagically"
map it to the nearest palette color.

Only way around this is if you know up-front which exact colors you need:
then you can modify the workbook's color palette to make sure it includes
them.

Tim

"Lucky" wrote in message
...
Excel 2003. I'm using VBA's graphics methods to draw a large area on
the screen that is not exactly square. I then fill this area with a
solid RGB color. No pattern or transparency or anything, just a solid
beige color. Sometimes the area appears with the color I want, and
sometimes it's way too light, almost white. I can't figure out how to
fix this. Any ideas?




Peter T

RGB fill color not right
 
Sounds like you have drawn a Freeform, or some Shape at least. Unlike cells
and charts (in Excel 2003 and earlier) Shapes can be formatted to accept any
RGB colour, eg

Dim shp As Shape
Set shp = ActiveSheet.Shapes("Freeform 1") ' < change name
shp.Fill.ForeColor.RGB = RGB(25, 150, 225)
' unlikely to need the following but just in case
shp.Fill.Solid
shp.Fill.Transparency = 0
shp.ThreeD.Visible = msoFalse

Regards,
Peter T



"Lucky" wrote in message
...
Excel 2003. I'm using VBA's graphics methods to draw a large area on
the screen that is not exactly square. I then fill this area with a
solid RGB color. No pattern or transparency or anything, just a solid
beige color. Sometimes the area appears with the color I want, and
sometimes it's way too light, almost white. I can't figure out how to
fix this. Any ideas?




Lucky[_6_]

RGB fill color not right
 
Just to follow this up, I had added a smaller area within an adjoining
area that was white. Changing the color of the smaller area to beige
like the big area somehow fixed the problem. I don't quite understand
what happened, but thought I'd add this in for the benefit of others
who might experience a similar problem. Anyway, thanks to those who
replied.
Lucky


All times are GMT +1. The time now is 10:52 PM.

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