Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default how to get lighter shade of gray for interior color of a cell?

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how to get lighter shade of gray for interior color of a cell?

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how to get lighter shade of gray for interior color of a cell?

Take a look at this...

http://www.cpearson.com/excel/colors.htm#RGB
--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default how to get lighter shade of gray for interior color of a cell?

Thank you very much for your reply. One more question if I may - is there a
way to determine what color you get with RGB ? like what numbers to select?
I have always had a problem with that using RGB. Is there maybe website that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter, and I
add that to the palette in my respective workbook, then I can use that color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default how to get lighter shade of gray for interior color of a cell?

If you want a grey just make all the RGB colours the same.

FYI, the lightest gray in a default palette is applied to colorindex 15 as
RGB(192,192,192)

You might try, say

Activeworkbook.colors(54) = rgb(204,204,204)
Activeworkbook.colors(39) = rgb(229,229,229)

Each RGB attribute should be in the range 0-255

As there are 256 x 256 x 256 = 16 million permutations, no web site will
show you all possible RGB colours. Though plenty of sites display the so
called "web safe" colours that exist in the old 256 colour palette.

Regards,
Peter T

"Rich" wrote in message
...
Thank you very much for your reply. One more question if I may - is there

a
way to determine what color you get with RGB ? like what numbers to

select?
I have always had a problem with that using RGB. Is there maybe website

that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter, and

I
add that to the palette in my respective workbook, then I can use that

color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the

lightest
gray in the color palet on the toolbar. But I need a lighter shade of

gray.
I experimented with various color indexes, but these indexes seem to

only use
the colors from the color palet on the toolbar. Is there a way to use

the
RGB color function maybe, to color the interior of a cell to a shade

that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how to get lighter shade of gray for interior color of a cell?

As for the colors generated by RGB the number is astronomical (16 Million
256*256*256) so you may not have a lot of luck finding a website that shows
all of the colours...

As I understand it once you add the color to the pallet you can feel free to
use it. The only caveat is that you can only have 56 colors in total.
--
HTH...

Jim Thomlinson


"Rich" wrote:

Thank you very much for your reply. One more question if I may - is there a
way to determine what color you get with RGB ? like what numbers to select?
I have always had a problem with that using RGB. Is there maybe website that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter, and I
add that to the palette in my respective workbook, then I can use that color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default how to get lighter shade of gray for interior color of a cell?

PS, forgot I posted a macro to display the 216 "web-safe" colours in a
worksheet here

http://tinyurl.com/fay37

Other colours in the old 256 palette are greys and system colours.

Regards,
Peter T


"Peter T" <peter_t@discussions wrote in message
...
If you want a grey just make all the RGB colours the same.

FYI, the lightest gray in a default palette is applied to colorindex 15 as
RGB(192,192,192)

You might try, say

Activeworkbook.colors(54) = rgb(204,204,204)
Activeworkbook.colors(39) = rgb(229,229,229)

Each RGB attribute should be in the range 0-255

As there are 256 x 256 x 256 = 16 million permutations, no web site will
show you all possible RGB colours. Though plenty of sites display the so
called "web safe" colours that exist in the old 256 colour palette.

Regards,
Peter T

"Rich" wrote in message
...
Thank you very much for your reply. One more question if I may - is

there
a
way to determine what color you get with RGB ? like what numbers to

select?
I have always had a problem with that using RGB. Is there maybe website

that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to

get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter,

and
I
add that to the palette in my respective workbook, then I can use that

color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the

lightest
gray in the color palet on the toolbar. But I need a lighter shade

of
gray.
I experimented with various color indexes, but these indexes seem to

only use
the colors from the color palet on the toolbar. Is there a way to

use
the
RGB color function maybe, to color the interior of a cell to a shade

that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default how to get lighter shade of gray for interior color of a cell?

Thank you all for your replies. Now I get it - only 56 color in the color
palette. I added

ActiveWorkbook.Colors(39) = RGB(229, 229, 229)

that is the shade of gray that I needed.

"Rich" wrote:

Thank you very much for your reply. One more question if I may - is there a
way to determine what color you get with RGB ? like what numbers to select?
I have always had a problem with that using RGB. Is there maybe website that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter, and I
add that to the palette in my respective workbook, then I can use that color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default how to get lighter shade of gray for interior color of a cell?

Another piece of information that may be of interest to you is that the next
version of Excel (due out this year sometime) will support support 4.3
billion individual colours. I guess then we'll be able to set the Color
property to RGB(x,x,x) without the colour reverting back to a colorindex
value.

Regards,
Vic Eldridge


"Rich" wrote:

Thank you all for your replies. Now I get it - only 56 color in the color
palette. I added

ActiveWorkbook.Colors(39) = RGB(229, 229, 229)

that is the shade of gray that I needed.

"Rich" wrote:

Thank you very much for your reply. One more question if I may - is there a
way to determine what color you get with RGB ? like what numbers to select?
I have always had a problem with that using RGB. Is there maybe website that
lists that various color you can get with RBG?

Also, I did notice that the lightest color of gray that I was able to get
using RGB (but not adding to the palette yet) was the same shade that is
currently in the palette. So if I find an RGB number that is lighter, and I
add that to the palette in my respective workbook, then I can use that color?

Thanks again.

"Jim Thomlinson" wrote:

Additionally here is a recent post from Chip...

Note that Excel supports only 56 colors, although you can specify
which 56 colors are used. If you attempt to use a color that is
not in Excel's palette of colors, Excel will use the closest
match. To use a specific color with RGB, you should set one of
the colors in the palette to that color, then use ColorIndex to
get the color to the cell. E.g,

ThisWorkbook.Colors(56) = RGB(r,g,b)
ActiveCell.Interior.ColorIndex = 56

See www.cpearson.com/excel/colors.htm for more info about working
with colors.


--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

I recorded a macro for setting the interior color of a cell to the lightest
gray in the color palet on the toolbar. But I need a lighter shade of gray.
I experimented with various color indexes, but these indexes seem to only use
the colors from the color palet on the toolbar. Is there a way to use the
RGB color function maybe, to color the interior of a cell to a shade that is
not on the color palet on the toolbar? How is this done?

Thanks,
Rich

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a formlula to replace cell shade color with another color Newsgal Excel Worksheet Functions 4 February 9th 10 09:21 AM
How do you shade 10% gray on an excel row? strandie Excel Discussion (Misc queries) 1 September 21st 07 08:08 AM
How to get a lighter shade of grey for fill color? LurfysMa New Users to Excel 2 March 14th 07 04:38 AM
Cell interior color JohnB Excel Discussion (Misc queries) 4 October 12th 06 06:07 PM
how do I apply 10% gray shade to a cell in Excel? myraddin Excel Worksheet Functions 3 May 14th 06 06:48 AM


All times are GMT +1. The time now is 05:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"