Global

Members

props

Source:
Properties:
Name Type Attributes Default Description
duration number <optional>

动画持续时间,单位:秒

reverse boolean <optional>

翻转 180度

opacity number <optional>
1

透明度

color string <optional>
#1890FF

颜色

属性参数

props

Source:
Properties:
Name Type Attributes Default Description
duration number <optional>

动画持续时间,单位:秒

reverse boolean <optional>

翻转 180度

opacity number <optional>
1

透明度

color string <optional>
#1890FF

颜色

size number <optional>
5

格子尺寸,单位:px

gap number <optional>
5

格子间距,单位: px

属性参数

props

Source:
Properties:
Name Type Attributes Default Description
duration number <optional>

动画持续时间,单位:秒

reverse boolean <optional>

翻转 180度

opacity number <optional>
1

透明度

color string <optional>
#1890FF

颜色

size number <optional>
5

线条的宽度,单位:px

属性参数

props

Source:
Properties:
Name Type Attributes Default Description
duration number <optional>

动画持续时间,单位:秒

reverse boolean <optional>

翻转 180度

opacity number <optional>
1

透明度

color string <optional>
#1890FF

颜色

size number <optional>
5

格子尺寸,单位:px

size number <optional>
5

格子间距,单位:px

属性参数

Methods

darken(color) → {Number|String|Boolean}

Source:

Deepen color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:
  • Percent of Deepen (1-100)

    Type
    Number
  • Rgba color (Invalid input will return false)

    Type
    String | Boolean

fade(color, percent) → {String|Boolean}

Source:

Adjust color opacity

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

percent Number

of opacity

Returns:

Rgba color (Invalid input will return false)

Type
String | Boolean

getCircleRadianPoint(x, y, radius, radian) → {Array}

Source:

Get the coordinates of the specified radian on the circle

Parameters:
Name Type Description
x Number

Circle x coordinate

y Number

Circle y coordinate

radius Number

Circle radius

radian Number

Specfied radian

Returns:

Postion of point

Type
Array

getColorByKeyword(keyword) → {String|Boolean}

Source:

Get color by keyword

Parameters:
Name Type Description
keyword String

Color keyword like red, green and etc.

Returns:

Hex or rgba color (Invalid keyword will return false)

Type
String | Boolean

getColorFromRgbValue(value) → {String|Boolean}

Source:

Get Color from Rgb|Rgba value

Parameters:
Name Type Description
value Array.<Number>

Rgb|Rgba color value

Returns:

Rgb|Rgba color (Invalid input will return false)

Type
String | Boolean

getOpacity(color) → {Number|Boolean}

Source:

Get the opacity of color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:

Color opacity (Invalid input will return false)

Type
Number | Boolean

getRgbaValue(color) → {Array.<Number>|Boolean}

Source:

Get the Rgba value of the color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:

Rgba value of the color (Invalid input will return false)

Type
Array.<Number> | Boolean

getRgbValue(color) → {Array.<Number>|Boolean}

Source:

Get the Rgb value of the color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:

Rgb value of the color (Invalid input will return false)

Type
Array.<Number> | Boolean

getRgbValueFromHex(color) → {Array.<Number>}

Source:

Get the rgb value of the hex color

Parameters:
Name Type Description
color String

Hex color

Returns:

Rgb value of the color

Type
Array.<Number>

getRgbValueFromRgb(color) → {Array}

Source:

Get the rgb value of the rgb/rgba color

Parameters:
Name Type Description
color String

Hex color

Returns:

Rgb value of the color

Type
Array

lighten(color) → {Number|String|Boolean}

Source:

Brighten color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:
  • Percent of brighten (1-100)

    Type
    Number
  • Rgba color (Invalid input will return false)

    Type
    String | Boolean

toHex(color) → {String|Boolean}

Source:

Convert color to Hex color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:

Hex color (Invalid input will return false)

Type
String | Boolean

toRgb(color, opacity) → {String|Boolean}

Source:

Convert color to Rgb|Rgba color

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

opacity Number

The opacity of color

Returns:

Rgb|Rgba color (Invalid input will return false)

Type
String | Boolean

validator(color) → {String|Boolean}

Source:

Color validator

Parameters:
Name Type Description
color String

Hex|Rgb|Rgba color or color keyword

Returns:

Valid color Or false

Type
String | Boolean