Color,picker,php

Ron 10/11/2016 0

Color picker in PHP

PHP
<? 

for ($red_channel=0;$red_channel<=15;$red_channel=$red_channel 3) 
{ 
    for ($green_channel=0;$green_channel<=15;$green_channel=$green_channel 3) 
    { 
        for ($blue_channel=0;$blue_channel<=15;$blue_channel=$blue_channel 3) 
        { 
            $red_channel_value=dechex($red_channel).dechex($red_channel); 
            $green_channel_value=dechex($green_channel).dechex($green_channel);     
            $blue_channel_value=dechex($blue_channel).dechex($blue_channel); 
            @$index_pointer  ;     
            $hex_values_table[$index_pointer]=$red_channel_value.$green_channel_value.$blue_channel_value; 
        } 
    } 
} 
$index_pointer=1; 
echo "<table>"; 
for ($x=1;$x<=15;$x  ) 
{ 
    echo "<tr>"; 
    for ($y=1;$y<=15;$y  ) 
    { 
        $display_value=@$hex_values_table[$index_pointer]; 
        if (!$display_value)$display_value="ffffff"; 
        echo "<a href='colorselect.php?color=$display_value' alt='$display_value'  title='$display_value'><td  title='$display_value' alt='$display_value' style='cursor:pointer;cursor:hand;' width=20px height=20px alt='$display_value' bgcolor=$display_value></td></a>"; 
        $index_pointer  ; 
    } 
    echo"</tr>"; 
} 

echo "</table>";     

if (@$link_submitted_value=@$_REQUEST['color']) echo "You have selected:<br> Hexadecimal Color [$link_submitted_value]<table><tr><td width=356px height=25px bgcolor=$link_submitted_value></td></tr></table>";; 
     
?>
 

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments