ExcelScript.ShapeFill interface
Represents the fill formatting of a shape object.
Methods
clear() | Clears the fill formatting of this shape. |
get |
Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") |
get |
Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns |
get |
Returns the fill type of the shape. See |
set |
Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") |
set |
Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid". |
set |
Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns |
Method Details
clear()
Clears the fill formatting of this shape.
clear(): void;
Returns
void
getForegroundColor()
Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange")
getForegroundColor(): string;
Returns
string
getTransparency()
Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns null
if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type.
getTransparency(): number;
Returns
number
getType()
Returns the fill type of the shape. See ExcelScript.ShapeFillType
for details.
getType(): ShapeFillType;
Returns
setForegroundColor(foregroundColor)
Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange")
setForegroundColor(foregroundColor: string): void;
Parameters
- foregroundColor
-
string
Returns
void
setSolidColor(color)
Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid".
setSolidColor(color: string): void;
Parameters
- color
-
string
A string that represents the fill color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange").
Returns
void
setTransparency(transparency)
Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns null
if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type.
setTransparency(transparency: number): void;
Parameters
- transparency
-
number
Returns
void
Office Scripts