1.1.0 • Published 9 years ago
to-color v1.1.0
toColor
install
npm install to-color
API
toColor
Given an arbitrary string, create a rgba color of a specified opacity to identify it visually.
Parameters
str
string
any arbitrary stringopacity
number
an opacity value from 0 to 1
Examples
toColor('tom') //= 'rgba(187,153,68,0.75)'
Returns string
output color