Class Fill

Fill

Describes the page element's background

Methods

MethodReturn typeBrief description
getSolidFill()SolidFillGet the solid fill of this background, or null if the fill type is not FillType.SOLID.
getType()FillTypeGet the type of this fill.
isVisible()BooleanWhether the background is visible.
setSolidFill(color)voidSets the solid fill to the given Color.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and Color.
setSolidFill(red, green, blue)voidSets the solid fill to the given RGB values.
setSolidFill(red, green, blue, alpha)voidSets the solid fill to the given alpha and RGB values.
setSolidFill(hexString)voidSets the solid fill to the given hex color string.
setSolidFill(hexString, alpha)voidSets the solid fill to the given alpha and hex color string.
setSolidFill(color)voidSets the solid fill to the given ThemeColorType.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and ThemeColorType.
setTransparent()voidSets the background to transparent.

Detailed documentation

getSolidFill()

Get the solid fill of this background, or null if the fill type is not FillType.SOLID.

Return

SolidFill


getType()

Get the type of this fill.

Return

FillType


isVisible()

Whether the background is visible.

Return

Boolean


setSolidFill(color)

Sets the solid fill to the given Color.

Parameters

NameTypeDescription
colorColor

setSolidFill(color, alpha)

Sets the solid fill to the given alpha and Color.

Parameters

NameTypeDescription
colorColor
alphaNumber

setSolidFill(red, green, blue)

Sets the solid fill to the given RGB values.

Parameters

NameTypeDescription
redInteger
greenInteger
blueInteger

setSolidFill(red, green, blue, alpha)

Sets the solid fill to the given alpha and RGB values.

Parameters

NameTypeDescription
redInteger
greenInteger
blueInteger
alphaNumber

setSolidFill(hexString)

Sets the solid fill to the given hex color string.

The hex string must be in the format '#RRGGBB'. For example, pink would be represented as '#FFC0CB'.

Parameters

NameTypeDescription
hexStringString

setSolidFill(hexString, alpha)

Sets the solid fill to the given alpha and hex color string.

The hex string must be in the format '#RRGGBB'. For example, pink would be represented as '#FFC0CB'.

Parameters

NameTypeDescription
hexStringString
alphaNumber

setSolidFill(color)

Sets the solid fill to the given ThemeColorType.

Parameters

NameTypeDescription
colorThemeColorType

setSolidFill(color, alpha)

Sets the solid fill to the given alpha and ThemeColorType.

Parameters

NameTypeDescription
colorThemeColorType
alphaNumber

setTransparent()

Sets the background to transparent.

Send feedback about...

Apps Script
Apps Script