BaseExtensions can be used to remap colors on all elements in the selected slide - either on the slide itself or the custom layout that the selected slide belongs to. This means that we can change an element's color from one specific color to another.
This works with both RGB colors, ARGB colors and following built in color themes:
- Accent1
- Accent2
- Accent3
- Accent4
- Accent5
- Accent6
- Light1
- Light2
- Dark1
- Dark2
- Text1
- Text2
- Background1
- Background2
Note that these built-in colors match the colors which can be chosen in the color-picker in PowerPoint where the names are shown when you hover the color.
RGB/ARGB colors should be separated by commas and without spaces, e.g. "255,255,255".
CMD
<Cmd case="BaseExtensions:color-remapping-all-elements" type="x">
<Remap from="y" to="z"/>
</Cmd>
Parameters
type
Define the type of slide to remap colors of. This can be either slides
, layouts
or master
.
wholepresentation
Optional. Should be used in conjunction with type
. Set to true
or false
(will also set to false if omitted).
When this parameter is set to true
and type
is set to slides
it remaps colors on all shapes on all slides in the whole presentation.
When used with type="layout"
it remaps colors on all shapes on all layouts related to all slides present in the whole presentation.
When used with type="master"
it remaps colors on all shapes on all masters related to all slides present in the whole presentation.
CheckMasterBackgroundFill
Define whether the command should check the fill value against its master using true
or false
. If false
, it will check against the slide background value.
This parameter can only be used if the type is slides
.
CheckBackgroundThemeColor
Define whether the command should check the theme color mapping using true
or false
. If false
, it only checks RGB value of the slide background.
The reason for this parameter is that a slide has a background color value set to "Automatic". Thus, there is a chance that the slide will change color without the user wanting it.
This parameter can be used for all types.
from
Define the RGB/ARGB color or accent of the theme color that the command should change from.
to
Define the RGB/ARGB color or accent of the theme color that the command should change to.
Example of usage
Here, we remap several colors in one command.
<Cmd case="BaseExtensions:color-remapping-all-elements" type="slides" CheckMasterBackgroundFill="true">
<Remap from="Background1" to="121,121,145"/>
<Remap from="Text1" to="0,0,0"/>
<Remap from="Background2" to="121,121,145"/>
<Remap from="Text2" to="255,255,255"/>
<Remap from="Accent1" to="121,121,145"/>
<Remap from="Accent2" to="255,230,0"/>
<Remap from="Accent3" to="121,121,145"/>
<Remap from="Accent4" to="210,210,218"/>
<Remap from="Accent5" to="39,172,170"/>
<Remap from="Accent6" to="210,210,218"/>
</Cmd>
Comments
0 comments
Article is closed for comments.