UNPKG
duckengine
Version:
latest (2.1.0)
2.1.0
2.0.1
2.0.0
1.2.1
1.2.0
1.1.2-beta
1.1.1-beta
1.1.0
1.1.0-beta
1.0.1
1.0.1-beta
1.0.0
1.0.0-beta
A 2D Game Engine for the web.
github.com/ksplatdev/DuckEngine
ksplatdev/DuckEngine
duckengine
/
src
/
helper
/
color
/
getValuesRGB.ts
9 lines
(7 loc)
•
221 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
export
default
function
getValuesRGB
(
rgb
:
string
|
any
):
number
[] { rgb = rgb .
substring
(
4
, rgb.
length
-
1
) .
replace
(
/ /g
,
''
) .
split
(
','
);
return
(rgb
as
string
[]).
map
(
(
str
:
string
) =>
parseInt
(str)); }