How can i convert html color code, for example #FF0000, to rgb components. For example:
#FF0000 -> 255, 0, 0
And ofcourse back again:
255, 0, 0, -> #FF0000
In java its simple:
int r = Integer.parseInt(param.substring(0, 2), 16);
int g = Integer.parseInt(param.substring(2, 4), 16);
int b = Integer.parseInt(param.substring(4, 6), 16);
But unfortunally php has no parseInt() function.
Best regards,
twan