workbook.createColor(options)

Note:

The content in this help topic applies to SuiteScript 2.x.

Method Description

Creates a color.

Returns

workbook.Color

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/workbook Module

Sibling Module Members

N/workbook Module Members

Since

2021.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.alpha

number

optional

The alpha portion (opacity or transparency) of the color.

options.blue

number

optional

The blue portion of the color.

options.green

number

optional

The green portion of the color.

options.red

number

optional

The red portion of the color.

Errors

Error Code

Thrown If

INVALID_COLOR_VALUE

The value of any of the options.blue, options.green, or options.red parameters is less than 0 or greater than 255.

INVALID_INVALID_ALPHA_VALUE

The value of the options.alpha parameter is less than 0 or greater than 1.

Related Topics

N/workbook Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices