belbek
Новичок
hex to rgb
Write a function that converts a hexadecimal color, for example blue "#0000FF", into its RGB representation "rgb(0, 0, 255)". Name your function getRGB() and test it with this code:
var a = getRGB("#00FF00");
a;
"rgb(0, 255, 0)"
Как это сделать? Функцию split использовать нельзя, parseInt можно.
Write a function that converts a hexadecimal color, for example blue "#0000FF", into its RGB representation "rgb(0, 0, 255)". Name your function getRGB() and test it with this code:
var a = getRGB("#00FF00");
a;
"rgb(0, 255, 0)"
Как это сделать? Функцию split использовать нельзя, parseInt можно.