Thread HEX Zahlen für HTML-Farbcodes ausgeben (20 answers)
Opened by format_c at 2005-01-19 10:15

renee
 2005-01-19 10:48
#50840 #50840
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
use strict;

open RGB,'<','c:/cygwin/usr/X11R6/lib/X11/rgb.txt' or die $!;
while (my $line = <RGB>) {
next if $line =~ m/^\s*$/;
next if $line =~ m/^(?:!|#)/;
my ($r,$g,$b,$name) = $line =~ m/(\d+)\s+(\d+)\s+(\d+)\s+(.*)/;
printf "#%02X%02X%02X\t%s\n",$r,$g,$b,$name;
}
close RGB;


Einfach noch ne 0 vor jede 2...\n\n

<!--EDIT|renee|1106124567-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread HEX Zahlen für HTML-Farbcodes ausgeben