+ Reply to Thread
Results 1 to 4 of 4

Reverse engineer colour

  1. #1
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Reverse engineer colour

    Hi all,

    I have a lot of a spreadsheet set up using a lot of a theme colour (background2, darker 50%). This includes backgrounds borders, some text etc.
    I want to change all of this to a new colour, but if I change the theme to the correct new colour, then all the cells are the new colour but darkened by 50% and therefore wrong.

    I therefore need to reverse engineer a starting theme colour so that when darkened by 50% it gets to the colour I would like.

    Any suggestions around what to do please? Use VBA property .tintandshade? But by what amount (0.33333, 0.3, 0.5)? Or is there something else I can do?

    I'm using excel 2011.

    Thanks Domc

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Reverse engineer colour

    Hi domc,

    In Excel 2007 Microsoft introduced 'Tint and Shade' and a lot of other fancy color attributes, which I try to ignore. I am just interested in colors. I use the following macros to determine colors of Shapes and Cells. I prefixed 'aaa' in front of the Macro names so they would be at the top of the list when I press 'Alt F8' to display Macros.

    Excel 2011 is for the Mac, so I do not know if the following Windows Macros will work for you.
    Please Login or Register  to view this content.
    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    4. To add a module in the VBA Editor:
    a. 'Left Click' on any cell in the Excel Spreadsheet.
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. 'Right Click' on the Project or on any module in 'Project Explorer'.
    e. Insert > Module
    f. To rename the Module press 'F4' to access the 'Properties' Window (if the 'Properties' Window is not already visible)
    g. To the right of the (Name) Property, type in the New Name. The name MUST be unique and VBA must be DORMANT (i.e. no Macros running).

    You can now 'cut and paste' code into the module.

    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    I hope this helps.

    Lewis

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Reverse engineer colour

    Hi domc,

    I thought you could change the theme colors to your own mix and save that as the default. Read:

    https://support.office.com/en-us/art...4-42bd2afef904
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Reverse engineer colour

    Hi Marvin,

    Yes you're right in that you can change the theme colours - which i've done and imported.

    However, if you look on the colour grid, you have various shades (lighter or darker) of these theme colours.

    As the colour I'm trying to change is a 50% darker version of tan, when I bring in the specific colour I want as a theme, it is then darkened by 50% and is therefore not the right colour.
    [Hence trying to reverse engineer the colour which, when darkened by 50%, would actually be the colour I want.
    If it was a small amount of cells it would be easy to just reapply, but it's literally thousands of different backgrounds, borders and some text which has been assigned to this colour.

    Thanks for all your comments Lewes but would prefer to use the themes if I can.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Reverse engineer lookup table from efficiency chart
    By Jacc in forum Excel General
    Replies: 13
    Last Post: 05-30-2017, 12:10 PM
  2. Another engineer says 'hello'
    By bearwldr in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 05-06-2015, 07:42 PM
  3. Can someone help me reverse engineer my payslip into a spreadsheet?
    By M17xR3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-07-2014, 09:24 PM
  4. Help: Reverse Engineer Macro
    By bernhardjoshuabudion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2014, 02:16 AM
  5. [SOLVED] Reverse Engineer a Formula?
    By Rick-O-Shay in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-28-2013, 10:35 PM
  6. Replies: 6
    Last Post: 05-05-2013, 07:17 PM
  7. Engineer Sparky
    By Engineer Sparky in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-12-2013, 05:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1