[mapserver-users] color selection?
Puneet Kishor
pkishor at GeoAnalytics.com
Thu May 30 10:25:39 PDT 2002
or, in case you have Perl leanings...
==========
#!/usr/bin/perl
print<<HEADER;
Content-type: text/html
<html>
<head>
<title>Colorpicker</title>
<script>
function hexdec(f1) {
with(document.form) {
hex.value = hex.value.toUpperCase();
hexone = hex.value.substr(0,2);
hextwo = hex.value.substr(2,2);
hexthr = hex.value.substr(4,2);
decone = parseInt(hexone,16);
dectwo = parseInt(hextwo,16);
decthr = parseInt(hexthr,16);
rgb.value = decone + " " + dectwo + " " + decthr;
}
}
</script>
HEADER
@colbits = ("00", "33", "66", "99", "cc", "ff");
print "<table>";
for($i = 0; $i <= 5; $i++) {
print "<tr>";
$one = $colbits[$i];
for($j = 0; $j <= 5; $j++) {
$two = $colbits[$j];
for($k = 0; $k <= 5; $k++) {
$thr = $colbits[$k];
print "<td bgcolor='#$one$two$thr' height='10' width='8'
onmouseover='document.form.hex.value=\"$one$two$thr\";
hexdec(this);'></td>";
}
}
print "</tr>";
}
print "</table><form name='form'>hex <input name='hex' type='text'><br>rgb
<input name='rgb' type='text'></form></body></html>";
===========
> -----Original Message-----
> From: Puneet Kishor
> Sent: Thursday, May 30, 2002 12:13 PM
> To: 'TCHaddad at cshore.com'; Robert W. Burgholzer
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: RE: [mapserver-users] color selection?
>
>
> <script>
> function hexdec(f1) {
> with(document.form) {
> hex.value = hex.value.toUpperCase();
> hexone = hex.value.substr(0,2);
> hextwo = hex.value.substr(2,2);
> hexthr = hex.value.substr(4,2);
> decone = parseInt(hexone,16);
> dectwo = parseInt(hextwo,16);
> decthr = parseInt(hexthr,16);
> document.form.rgb.value = decone + " " + dectwo + " " + decthr;
> }
> }
> </script>
>
> <?php
>
> $arColBits = array("00", "33", "66", "99", "cc", "ff");
>
> print "<table>";
> for($i = 0; $i <= 5; $i++) {
> echo "<tr>";
> $one = $arColBits[$i];
> for($j = 0; $j <= 5; $j++) {
> $two = $arColBits[$j];
> for($k = 0; $k <= 5; $k++) {
> $thr = $arColBits[$k];
> echo "<td bgcolor='#$one$two$thr' height='10' width='8'
> onmouseover='document.form.hex.value=\"$one$two$thr\";
> hexdec(this);'></td>";
> }
> }
> echo "</tr>";
> }
> print "</table>";
>
> print "<form name='form'>hex <input name='hex'
> type='text'><br>rgb <input name='rgb' type='text'></form>";
> ?>
>
>
>
> enjoy.
>
>
> pk/
>
>
>
> > -----Original Message-----
> > From: TCHaddad [mailto:TCHaddad at cshore.com]
> > Sent: Thursday, May 30, 2002 10:56 AM
> > To: Robert W. Burgholzer
> > Cc: mapserver-users at lists.gis.umn.edu
> > Subject: Re: [mapserver-users] color selection?
> >
> >
> >
> > not really an app, but I really like this site:
> >
> > http://users.rcn.com/giant.interport//COLOR/1ColorSpecifier.html
> >
> > TH
> >
> > ---------- Original Message ----------------------------------
> > From: "Robert W. Burgholzer" <rburghol at vt.edu>
> > Date: Sun, 01 Jul 2001 07:52:36 -0400
> >
> > >Does anyone have a hint as to a little "color picker"
> > application that
> > >one could use to help decide on the numbers needed for line and
> > >backgroiund colors? One that runs on a linux machine preferably??
> > >
> > >sorry for the triviality.
> > >
> > >Robert Burgholzer
> > >
> > >
> >
>
More information about the MapServer-users
mailing list