git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
termcol: amstrad cpc palette (27-colour hsv)
[sheet.git]
/
termcol.plp
diff --git
a/termcol.plp
b/termcol.plp
index 04b6e6e64533f5cad2adedee7531950fd0fff397..4f97abae5cbdb0bc44bc0807c62e6ba5d9818b08 100644
(file)
--- a/
termcol.plp
+++ b/
termcol.plp
@@
-221,6
+221,16
@@
for my $term (@termlist) {
}
print "</table>\n\n";
}
}
print "</table>\n\n";
}
+
+if (exists $get{v}) {
+ print "<table class=mapped>\n";
+ print "<caption>Amstrad CPC</caption>\n";
+ print coltable_hsv(3, sub {
+ $_[2] + 3 * ($_[0] + 3 * $_[1]),
+ map { $_ && $_ * 127 + 1 } @_
+ });
+ print "</table>\n\n";
+}
:></div>
<hr>
:></div>
<hr>
@@
-238,7
+248,7
@@
sub coltable_hsv {
my %greymap; # name => value
my @colmap; # saturation => value => hue => [name, r,g,b]
my %greymap; # name => value
my @colmap; # saturation => value => hue => [name, r,g,b]
- my $offset = 16;
+ my $offset = 16
* ($dim > 3)
;
for my $r (0 .. $dim - 1) {
for my $g (0 .. $dim - 1) {
for my $r (0 .. $dim - 1) {
for my $g (0 .. $dim - 1) {