Great work, thank you!
Would you please explain, how to embed this in css? I would like to use the color as background of a div or span to show the jersey color next to the team name. Unfortunately I have not found how to simply include a variable in css. Thanks a lot!
It is not possible to update CSS in real time... that's just not something browsers can do. You have to place the style information in inline HTML in this case.