BTW, you should use "encodeURIComponent/decodeURIComponent" not "encodeURI" because your colors contain the character "#" which is not escaped with "encodeURI" and has special meaning in a full URL, e.g. www.examples.com/foo#anchor
So your param URLs are valid and your system works but the browser is interpreting the URLs in weird ways.