/usr/share/perl5/EBox/ColourRange.pm is in zentyal-common 2.3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | # Copyright (C) 2008-2012 eBox Technologies S.L.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package EBox::ColourRange;
# Class: EBox::ColourRange
#
# This class is intended to return a range of colours in RGB
# which are similar and no kick in the head because of their
# combination
#
use strict;
use warnings;
my @colours = (
'000000', #black
'00BFFF', # deep sky blue
'5C4033', # dark brown
'2F4F2F', # dark green
'FF8C00', # dark orange
'FF1493', # deep pink
'9932CC', # darok orchid
'D9D919', # bright gold
'C0C0C0', # silver grey
'000080', # navy blue
'DEB887', # burlywood
'ADFF2F', # green yellow
'FF2400', # orange red
'FFB6C1', # light pink
'DDA0DD', # plum
'B8860B', # DarkGoldenrod
'856363', # green cooper
);
# Function: range
#
# Return a range of colours in RGB format.
#
# The number of colours is limited. So if you asked for more
# colours, a loop will be done and reuse the same colours again
#
# Parameters:
#
# n - Int the number of colours
#
# Returns:
#
# Array ref - the colours in the range, its number will 'n'
#
sub range
{
my ($n) = @_;
my @c;
while ($n > @colours) {
push @c, @colours;
$n = $n - @colours;
}
push @c, @colours[0 .. ($n -1)];
return \@c;
}
1;
|