Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ jobs:
echo
printf '\e[0;31mred\e[0;1;31mbright red\e[0m' | ./ansi2html -b -p vga
echo
- name: run tests
timeout-minutes: 1
run: |
make run-tests
- name: "Compress for ${{matrix.arch}} [with iTerm2 palettes]"
timeout-minutes: 1
run: |
Expand Down
9 changes: 4 additions & 5 deletions scripts/iterm2-color-schemes.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
for my $line (@lines) {
if ($line =~ m!^[*][.](color\d+|foreground|background):\s*[#]([a-fA-F0-9]{6})!) {
my ($k, $v) = ($1, $2);
my ($r, $g, $b) = $v =~ m!(..)(..)(..)!;
$spec->{$k} = [ map { hex } $r, $g, $b ];
$spec->{$k} = "0x\U$v";
}
}
my @undefined;
Expand All @@ -64,11 +63,11 @@
$c_contents .= "// $file: $name -> $base\n";
$c_contents .= "struct ansi_color_palette $real_var_name = {\n";
$c_contents .= " \"$name\",\n";
$c_contents .= sprintf " {0x%02X, 0x%02X, 0x%02X},\n", @{ $spec->{background} };
$c_contents .= sprintf " {0x%02X, 0x%02X, 0x%02X},\n", @{ $spec->{foreground} };
$c_contents .= sprintf " {.rgb = %s},\n", $spec->{background};
$c_contents .= sprintf " {.rgb = %s},\n", $spec->{foreground};
for (0..15) {
$c_contents .= " {\n" if ($_ == 0);
$c_contents .= sprintf " {0x%02X, 0x%02X, 0x%02X},\n", @{ $spec->{"color$_"} };
$c_contents .= sprintf " {.rgb = %s},\n", $spec->{"color$_"};
$c_contents .= " },\n" if ($_ == 7 || $_ == 15);
$c_contents .= " {\n" if ($_ == 7);
}
Expand Down
Loading
Loading