Fork me on GitHub

CCColor Simple and flexible color color conversion module for Raku Perl 6

CCColor

1
2
Simple and flexible color color conversion module for Raku Perl 6 , 
easy-to-use simple learning.

##

HEX Color (use CCColor)

colors

##

See test

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use CCColor;

my @list =
(
" #FFFEA963 ",
" #FF FE A9 63 ",
" #FF # FE # A9 # 63 ",
" #",
" #1",
" #123",
" #FFH",
" #FHF",
" #1234",
" #12345",
" #FFEE5",
" #FFEE56",
" #FFEE56A",
" #FFEE56AH",
" #FFEE56AA",
" #FFEE56AA11",
" #FFEE56AAFF11",
);

for @list -> $color {
my ($r, $g, $b, $a) = hex2rgba($color);
say "$r, $g, $b, $a";
}

Call test/test.p6

test

##

Local installation and unloading

1
2
zef install .
zef uninstall CCColor

##

Network install

1
2
zef update
zef install CCColor