BaseExtensions can be used to have a quick selection of colors available as either buttons or within a menu. These commands will change the color of font, line, and fill of a shape, for whatever is selected be it text or a shape. Note that you can use Alloy to create the icon of the button as the same color.
This can also be done to named shapes. Read more in this article.
In Excel, the fill color feature will fill selected cell(s) with color, while the line color feature will put a border around selected cell(s).
Choose between RGB or ARGB colors.
Modules are located here:
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\04a__WPE_changeLineColor.xml
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\04b_WPE_changeFillColor.xml
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\04c_WPE_changeFontColor.xml
CMDs
<Cmd case="BaseExtensions:change-font-color"/>
<Cmd case="BaseExtensions:change-line-color"/>
<Cmd case="BaseExtensions:change-fill-color"/>
Parameters
color
Type the RGB or ARGB color. Be sure to use a comma, and not a dot. When using ARGB colors, the A or the alpha value will define the density of the color.
bulletColor
This parameter works with the change font color command and will color bullets and numbered lists.
If the parameter is not added the bullet and numbered list color will follow the font color. However, if the parameter is added it will color the bullet and numbered list the defined bulletColor.
BulletColor supports RGB and accents, but not transparency.
useNativeFunc
Optional Boolean. Only relevant for font and only implemented in PowerPoint. Boolean. Can be set to true
in order for bullets of the text not to be colored, unless the bullet is marked. Acts closer to how native coloring functions.
noFill
Set this parameter to be true
in the command that changes fill color, if there should be no fill.
noLine
Just as the above parameter, define this to be true
in the command that changes line color, if there should be no line.
transparency
This parameter works in the commands that change fill color and line color. It controls the transparency of the color and must be defined as a number with 1 decimal, e.g. transparency="0.5"
which is 50% transparent.
prioritizeShape
Optional parameter for fill and line that defaults to false
but can be set to true
in order to prioritize shapes when applying new colors. This is relevant for when trying to target a shape within a table cell. With this set to false, it will color the cell in the table, but when set to true it will color the shape instead.
colorScheme
The three commands support referencing a color theme accent. In this way, we can change the color to a specific accent. To do so, omit the color
parameter and define in this parameter which accent the color should be changed to. These are the supported accents:
Accent1
, Accent2
, Accent3
, Accent4
, Accent5
, Accent6
, Light1
, Light2
, Dark1
and Dark2
Note that we also support using accent colors for ribbon icons using
icon="rgb:Accent.1"
Accent color example
<Cmd case="BaseExtensions:change-fill-color" colorScheme="Accent1"/>
Comments
0 comments
Article is closed for comments.