Thursday, April 28, 2005

rgb color

In Firefox, I can get a node color in javascript like
window.getComputedStyle(node,null).getPropertyValue("color")
Then, I get rgb(0,%200,%200) for black and rgb(255,%200,%200) for red.

I try to convert them back to hex code, but what does "%200" mean?

1 comment:

Alex said...

Problem found.
I pass the "rgb(0, 0, 0)" in the url, so it becomes "rgb(0,%200,%200)". The %20 is space.