#!/usr/bin/perl -w
# color_test.pl
# kubo@ees.hokudai.ac.jp
# DATE: 2003/01/16 18:35:22 +0900

use strict;
use Graphics::ColorObject;

my $table = "<table>\n";
for (my $hue = 0; $hue < 360; $hue += 20) {
	$table .= "\t<tr>\n";
	for my $val (qw(1.0 0.8)) {
		for my $sat (qw(1.0 0.5)) {
			my $color = Graphics::ColorObject
				->newHSV($hue, $sat, $val)->asHex;
			$table .= <<ENDTD;
		<td style=\"background-color: $color\">
			hue: $hue<br>
			sat: $sat<br>
			val: $val<br>
			RGB: $color
		</td>
ENDTD
		}
	}
	$table .= "\t</tr>\n";
}
$table .= "</table>\n";

print <<ENDHTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<title> Generate Colors by the Perl module `` Graphics::ColorObject''</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css">
	body {background-color: #ffffff}
	div {text-align: left}
	td {text-align: left; padding: 8px}
</style>
</head>
<body>
<div>generated by <a href="./color_test.pl">color_test.pl</a></div>
$table
</body>
</html>
ENDHTML
__END__
