UNPKG
@lihbr/farben
Version:
latest (0.1.0)
0.1.0
0.0.2
0.0.1
Colors of lihbr
github.com/lihbr/farben
lihbr/farben
@lihbr/farben
/
index.js
9 lines
(6 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
farben
from
"./farben.json"
with
{
type
:
"json"
}
// eslint-disable-next-line ts/explicit-module-boundary-types
export
function
alpha
(
hexa, alpha =
1
) {
return
`
${hexa}
${
`0
${
Number
(
Math
.round(
255
* alpha)).toString(
16
)}
`
.slice(-
2
)}
`
}
export
{ farben }