2.0.1 • Published 2 years ago
@wdkx/color v2.0.1
@wdkx/color
v2.0.0
Install
npm i @wdkx/color
Usage
import { initColor } from '@wdkx/color'
const color = initColor('hsl(0, 50% ,50%)')
console.log(color.light().value) //hsl(0, 50% ,89.2%)
Object
initColor()
returns UIColor
UIColor
APIs
- value:
string
- object:Color
light()
:UIColor
lightRatio(ratio:number)
:UIColor
dark()
:UIColor
darkRatio(ratio:number)
:UIColor
alpha(ratio:number)
:UIColor
hover()
:UIColor
active()
:UIColor
schemeText()
:UIColor
text()
:UIColor
secondaryText()
:UIColor