Pita/etherpad-lite — pull request #1004 by yourcelf (2012-09-15 21:51:39+00:00)
Title: Add `userColor` query param to set initial color

Add a URL parameter which sets the initial color for a user, e.g.:

http://example.com/p/mypad?userColor=%2300ff00

Sanitize the given color value to ensure that it's a valid css value
(could be any supported CSS color format -- #fff, rgba(), "red", etc).

Shortly after rejoining a pad, the server responds with a USER_NEWINFO
message which may contain an old color value; however, this message
arrives after we have set and sent the new color value to the server.
To avoid this race condition, if the query parameter has been set,
ignore the color value in a USER_NEWINFO message which matches our user
ID.