Excel VBA 17 - Tint and Shade

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Jul 15, 2010.
The new themes in Excel offer six accent colors. Learn how to take those six theme colors and turn them into 1200 colors using Tint and Shade.
maxresdefault.jpg


Transcript of the video:
MrExcel Podcast is sponsored by Easy-XL.
Excel VBA, Chapter 17 - Tint and Shade Okay, so Chapter 17 is all about spark lines.
Why am I not doing spark lines in the podcast because I love, when I discover something new in cool and I was looking at colors, you know, we always used to use, well, Colour Index, back in Excel 2003 from 156 or you know, RGB.
You know but now, the macro record starts doing this, Theme Color, all right.
You know, in the Themes I get it, Page Layout. You can choose the Themes, each theme has six colors.
As you can see, how the colors change back there, all right and in beginning, we define it a New Theme.
Each theme is comprised of 6 Accent colors and then we see these a lot, back on the Home tab, either the Font color or the Fill color.
The 6 Accent colors appear here.
But what's interesting is this lighter 80%, lighter 60%, lighter 40%, darker 25%, darker 50%.
So, think about those 6 Accent colors are showing with five different variations there.
Now, I love when I discovered the VBA to something better than the Excel interface does and that was exactly what happened here because when I actually looked at this code, we have ThemeColor = xlThemeColorAccent1 through 6.
Those are the 6 for the Theme other than Tint & Shade It turns out that it can be a number anywhere from negative 0.99, all the way up to positive 0.99.
The negative numbers are darker, the lighter numbers are, are the positive numbers, are lighter and so, I actually brought a little macro here, that went through and looked at a 100 different darker values.
So, this is the orange that is our Theme Color 6 but it goes all the way down the black, depending on what Tint and Shade we use.
Now scroll down here. Here's a another macro row that, came up with the 99 lighter colors.
All right. So, that one orange color, it goes from completely black to complete white in, 200 different steps.
All right. So, using Tint & Shade to modify the Theme Accent Color, you're not limited to just those five, that they happen to give us, using again, positive and negative numbers.
All right. Let's just try of using cell over here.
In this case being AccentColor1 is blue.
So, we'll just use theTintAndShade of 0.
First to see, how that looks, run that code.
You can see, we get that blue, all right. because of TintAndShade.
Let's go darker so -0.75, run it,.
That's all, that's almost black, almost too dark, so have a -0.5.
Run now.
Because you start to see that actually is blue and then if we go positive, those start to go lighter instead of darker.
All right so, a whole bunch of different colors you can use and the advantage to using the Theme Colors rather than RGB is that as you change the Theme, back here on the Page Layout, just choosing a rare theme.
Now, those colors are going to change so, it picks up the different colours in the Theme.
Very slick, I think it's a cool tool. We have many more options for what they give us, here at the Home Tab.
[ inaudible ] Hey, want to thank you for stopping by.
We'll see you next time for another netcast for MrExcel.
 

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top