What are the potential pitfalls of passing color values with hash symbols in URLs for PHP scripts?

Passing color values with hash symbols in URLs for PHP scripts can potentially lead to issues with URL encoding and decoding. To avoid problems, it is recommended to encode the color value before passing it in the URL and decode it back in the PHP script.

// Encode the color value before passing it in the URL
$color = urlencode("#ff0000");

// Pass the color value in the URL
$url = "example.com/script.php?color=" . $color;

// Decode the color value in the PHP script
$color = urldecode($_GET['color']);