In CSS we can use several different methods to define a color:
red#FF0000
Edit: Each process has to get down to a binary value for r, g, and b. Hex and rgb bytes are already set up for that, so I guess they might actually be roughly the same speed. The rest have to go through a process to reach a hex/rgb value
#FF0000 = memory values of: 1111 1111 0000 0000 0000 0000
rgb(255,0,0) = memory values of: 1111 1111 0000 0000 0000 0000
Both cases are most likely stored in 3 int variables. So the real question is, which is faster to process into binary values for these integers? HEX or DEC? I think HEX, but I can't back that up. Anyhow, the code just takes the binary values of these variables.