Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes! This is more to what I'm getting at Peter.
I'll look into converting RGB to HSL, then adjusting the L, then converting back to RGB. Without any knowledge beyond what you've said, this sounds like exactly like what I'm trying to do. It also sounds easier than mixing pattern grey shades. I'm not sure, but at least now I know where to look and where to possible point further questions. Thanks. -Jeremy Peter T wrote: Hi Jeremy I know I can read the RGB value of a color in VBA. If you use customized palette colours be sure to read the RGB of the color index and not the RGB of some format. Otherwise you may return the default palette colour rather than the actual colour (depends on other factors related in your overall code). Is there a consistent way to do a calculation on those values to visually return the same color but lighter (dimmer)? Depending on what you mean by making lighter/darker it probably involves converting RGB to HSL, adjusting the L value +/- then reconverting the new HSL to RGB. Then perhaps customizing one of the palette colours with the new RGB. But if all you want to do is format a similar colour lighter/darker a crude way is mixing pattern "grey" shades with pattern colour white through grey to black. If you want to go further over 2000 unique colours can be "simulated" using pattern shades with the default palette of 46 unique colours (56-10 duplicates). Regards, Peter T "Jeremy Gollehon" wrote in message ... I know I can read the RGB value of a color in VBA. Is there a consistent way to do a calculation on those values to visually return the same color but lighter (dimmer)? Thanks, Jeremy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing font color of protected cells programatically | Excel Discussion (Misc queries) | |||
can I lighten background page numbers | Excel Discussion (Misc queries) | |||
can i access the cell colour programatically? eg if cell is blue | Excel Discussion (Misc queries) | |||
programatically color fonts and auto sorting | Excel Programming | |||
Excel: is there a way I can lighten the fill colors in a cell? | Excel Discussion (Misc queries) |