Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieve Excel Colors

Till Excel 2003, the below command was used for retrieving the
available colors to be used,

activeworkbook.colors(1...56)

Returns or sets colors in the palette for the workbook. The palette
has 56 entries,


Now with Excel 2007+2010, the same command can be used but it does not
return the theme colors.

Which command can I used in order to retrieve the colors given in HOME
ribbon, FILL COLOR (background) option which includes 70 colors (60
theme colors + 10 standard colors)?

Thanks a lot in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Retrieve Excel Colors

You can get the top row easily enough with
wb.Theme.ThemeColorScheme.colors(index)

note the order of the first four is not quite as expected, dark & light are
reversed in the first two pairs.

To get the tints & shades is not straightforward. Depending on the
themecolor there are five different algorithms that set the tints based on
the themecolor. Doable but a lot of work.

FWIW I have an addin that's "work in progress" (iow I look at it every few
months on a rainy day), which does all that. Also gets all colours (RGBs) of
all ColorSchemes from file (builtin & custom), including tints and shades
(to within 1 or 2 units of RGB). Also, can customize an existing colorscheme
or make a new one in "real time" (eg copy a pixel to directly into the
palette. Also shows old & new palettes together and can use either, also can
customize an "the old 56 colour palette" with the current theme palette.
Also, quite a lot more. Not sure if it includes anything that might fulfil
your overall objective though, maybe - can dump entire palette or individual
colour details to cells.

Regards,
Peter T

"chrisdev" wrote in message
...
Till Excel 2003, the below command was used for retrieving the
available colors to be used,

activeworkbook.colors(1...56)

Returns or sets colors in the palette for the workbook. The palette
has 56 entries,


Now with Excel 2007+2010, the same command can be used but it does not
return the theme colors.

Which command can I used in order to retrieve the colors given in HOME
ribbon, FILL COLOR (background) option which includes 70 colors (60
theme colors + 10 standard colors)?

Thanks a lot in advance!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Retrieve Excel Colors

On Sep 16, 4:19*am, chrisdev wrote:
Till Excel 2003, the below command was used for retrieving the
available colors to be used,

activeworkbook.colors(1...56)

Returns or sets colors in the palette for the workbook. The palette
has 56 entries,

Now with Excel 2007+2010, the same command can be used but it does not
return the theme colors.

Which command can I used in order to retrieve the colors given in HOME
ribbon, FILL COLOR (background) option which includes 70 colors (60
theme colors + 10 standard colors)?

Thanks a lot in advance!


Can you try activeworkbook.colorindex( )
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
How do you make Excel use CMY colors instead of RGB colors? Jim Benet Setting up and Configuration of Excel 5 October 10th 08 02:16 PM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
excel 2007 colors do not match excel 2003 colors. Tom's Travails' Excel Discussion (Misc queries) 0 July 17th 08 01:56 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM


All times are GMT +1. The time now is 01:15 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"