@univerjscoreclassesRgbcolor

@univerjs/core v0.5.0-beta.1Docs


Class: RgbColor

Extends

Constructors

new RgbColor()

new RgbColor(cssString, builder): RgbColor

Parameters

ParameterType
cssStringstring
builderColorBuilder

Returns

RgbColor

Overrides

Color.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:301

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_builderprotectedColorBuilderundefinedColor._builderpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:88
RGB_COLOR_AMTstaticnumber0-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:283
RGB_EXTRACTstaticRegExpundefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:289
RGBA_EXTRACTstaticRegExpundefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:285

Methods

asHexString()

asHexString(): string

Returns

string

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:338


asRgbColor()

asRgbColor(): RgbColor

Returns

RgbColor

Inherited from

Color.asRgbColor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:129


asThemeColor()

asThemeColor(): ThemeColor

Returns

ThemeColor

Overrides

Color.asThemeColor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:390


clone()

clone(): RgbColor

Returns

RgbColor

Overrides

Color.clone

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:386


equals()

equals(color): boolean

Parameters

ParameterType
colorColor

Returns

boolean

Overrides

Color.equals

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:394


getAlpha()

getAlpha(): number

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:378


getBlue()

getBlue(): number

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:366


getColorType()

getColorType(): ColorType

Returns

ColorType

Overrides

Color.getColorType

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:382


getCssString()

getCssString(): string

Returns

string

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:406


getGreen()

getGreen(): number

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:354


getRed()

getRed(): number

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:342


hexToRgbString()

static hexToRgbString(hex): Nullable<string>

Parameters

ParameterType
hexstring

Returns

Nullable<string>

Inherited from

Color.hexToRgbString

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:114


hexValueToRgbColor()

static hexValueToRgbColor(hexValue): RgbColor

Parameters

ParameterType
hexValuestring

Returns

RgbColor

Inherited from

Color.hexValueToRgbColor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:100


rgbColorToHexValue()

static rgbColorToHexValue(color): string

Parameters

ParameterType
colorRgbColor

Returns

string

Inherited from

Color.rgbColorToHexValue

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:94