<?PHP function negativeHexColor ( $strHexColor ) { $iColor = hexdec ( substr ( $strHexColor, 1 ) ); return sprintf ( '#%06x', $iColor ^ 0xffffff ); } ?>
<?PHP $strHexColor = negativeHexColor ( '#bb2222' ); print ( $strHexColor ); ?>