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: named function to parse table data
[sheet.git]
/
termcol.inc.pl
diff --git
a/termcol.inc.pl
b/termcol.inc.pl
index eef6a8b0b0c96d1f39c66f7ac370e8e9975abb12..d4741edae96e012b7e6f4617b74768d1681b2d0e 100644
(file)
--- a/
termcol.inc.pl
+++ b/
termcol.inc.pl
@@
-1,6
+1,6
@@
use strict;
use 5.010;
use strict;
use 5.010;
-use Shiar_Sheet::Colour '1.0
2
';
+use Shiar_Sheet::Colour '1.0
5
';
+{
html => {
+{
html => {
@@
-149,8
+149,8
@@
use Shiar_Sheet::Colour '1.02';
}
# convert to rgb
}
# convert to rgb
- $y
*= 255 /
32;
- $_
= $_ * 127.5 + 128
for $u, $v;
+ $y
/=
32;
+ $_
/= 2
for $u, $v;
Shiar_Sheet::Colour->newyuv($y, $u, $v)->rgb48;
} qw(
0 32 10+5 20-5 12+2 16-2 8+0 24-0
Shiar_Sheet::Colour->newyuv($y, $u, $v)->rgb48;
} qw(
0 32 10+5 20-5 12+2 16-2 8+0 24-0
@@
-163,8
+163,7
@@
use Shiar_Sheet::Colour '1.02';
name => 'MSX',
list => [ map {
my ($y, @c) = split /;/;
name => 'MSX',
list => [ map {
my ($y, @c) = split /;/;
- $y *= 255;
- $_ = ($_ - .47) / .53 * 127.5 + 128 for @c;
+ $_ = ($_ - .47) / .53 / 2 for @c;
Shiar_Sheet::Colour->newyuv($y, @c)->rgb48;
} qw(
0.00;0.47;0.47 0.00;0.47;0.47 0.53;0.20;0.07 0.67;0.27;0.17
Shiar_Sheet::Colour->newyuv($y, @c)->rgb48;
} qw(
0.00;0.47;0.47 0.00;0.47;0.47 0.53;0.20;0.07 0.67;0.27;0.17