File

projects/m2-core/src/lib/core/utils/colour.utils.ts

Index

Properties
Methods

Properties

Static RGB_COLOR_PART_REGEX
Default value : /rgb\((.+)\)/

Methods

Static colorToInt
colorToInt(color: string)
Parameters :
Name Type Optional
color string No
Returns : number
Static getAlpha
getAlpha(rgbOrRgba: string)
Parameters :
Name Type Optional
rgbOrRgba string No
Returns : number
Static getUIForm
getUIForm(rgbaColor: string)
Parameters :
Name Type Optional
rgbaColor string No
Returns : string
Static hex8ToRbga
hex8ToRbga(hex8: string)
Parameters :
Name Type Optional
hex8 string No
Returns : string
Static hexToInt
hexToInt(hex: string)
Parameters :
Name Type Optional Description
hex string No

(#rrggbbaa) or hex6 (#rrggbb)

Returns : number
Static intToHex8
intToHex8(int: number)
Parameters :
Name Type Optional
int number No
Returns : string
Static intToRbga
intToRbga(int: number)
Parameters :
Name Type Optional
int number No
Returns : string
Static rgbOrRgbaToInt
rgbOrRgbaToInt(rgbOrRgba: string)
Parameters :
Name Type Optional
rgbOrRgba string No
Returns : number

results matching ""

    No results matching ""