@univerjscoreclassesRgbcolor

@univerjs/core v0.5.4


Class: RgbColor

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/color/color.ts:282

Extends

Constructors

new RgbColor()

new RgbColor(cssString, builder): RgbColor

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

Parameters

ParameterType
cssStringstring
builderColorBuilder

Returns

RgbColor

Overrides

Color.constructor

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

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

Returns

string


asRgbColor()

asRgbColor(): RgbColor

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

Returns

RgbColor

Inherited from

Color.asRgbColor


asThemeColor()

asThemeColor(): ThemeColor

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

Returns

ThemeColor

Overrides

Color.asThemeColor


clone()

clone(): RgbColor

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

Returns

RgbColor

Overrides

Color.clone


equals()

equals(color): boolean

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

Parameters

ParameterType
colorColor

Returns

boolean

Overrides

Color.equals


getAlpha()

getAlpha(): number

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

Returns

number


getBlue()

getBlue(): number

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

Returns

number


getColorType()

getColorType(): ColorType

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

Returns

ColorType

Overrides

Color.getColorType


getCssString()

getCssString(): string

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

Returns

string


getGreen()

getGreen(): number

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

Returns

number


getRed()

getRed(): number

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

Returns

number


hexToRgbString()

static hexToRgbString(hex): Nullable<string>

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

Parameters

ParameterType
hexstring

Returns

Nullable<string>

Inherited from

Color.hexToRgbString


hexValueToRgbColor()

static hexValueToRgbColor(hexValue): RgbColor

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

Parameters

ParameterType
hexValuestring

Returns

RgbColor

Inherited from

Color.hexValueToRgbColor


rgbColorToHexValue()

static rgbColorToHexValue(color): string

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

Parameters

ParameterType
colorRgbColor

Returns

string

Inherited from

Color.rgbColorToHexValue