From 233051875b0eb7466612156fbe7c5d7b33e6ddc4 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 8 Sep 2006 15:09:10 +0200 Subject: [PATCH] Bring around both colors, since multiple combinations can have the same base color. --- shell/Owner.py | 2 +- shell/conf/Profile.py | 8 +- sugar/canvas/Colors.py | 1125 ++++++++++++++++++------------------- sugar/canvas/IconColor.py | 38 +- tools/hex-colors-to-dict | 7 +- 5 files changed, 593 insertions(+), 587 deletions(-) diff --git a/shell/Owner.py b/shell/Owner.py index b99cc3a5..b6590589 100644 --- a/shell/Owner.py +++ b/shell/Owner.py @@ -43,7 +43,7 @@ class ShellOwner(object): def announce(self): # Create and announce our presence color = conf.get_profile().get_color() - props = { 'color': color.get_fill_color() } + props = { 'color': color.to_string() } self._service = self._pservice.register_service(self._nick, PRESENCE_SERVICE_TYPE, properties=props) print "Owner '%s' using port %d" % (self._nick, self._service.get_port()) diff --git a/shell/conf/Profile.py b/shell/conf/Profile.py index ecc4aba0..ced73cf2 100644 --- a/shell/conf/Profile.py +++ b/shell/conf/Profile.py @@ -18,9 +18,9 @@ class _Profile: if cp.has_option('Buddy', 'NickName'): self._nick_name = cp.get('Buddy', 'NickName') if cp.has_option('Buddy', 'Color'): - fill_color = cp.get('Buddy', 'Color') - if IconColor.is_valid(fill_color): - self._color = IconColor.IconColor(fill_color) + color = cp.get('Buddy', 'Color') + if IconColor.is_valid(color): + self._color = IconColor.IconColor(color) def _ensure_dirs(self): try: @@ -50,7 +50,7 @@ class _Profile: section = 'Buddy' cp.add_section(section) cp.set(section, 'NickName', self._nick_name) - cp.set(section, 'Color', self._color.get_fill_color()) + cp.set(section, 'Color', self._color.to_string()) fileobject = open(self._get_config_path(), 'w') cp.write(fileobject) diff --git a/sugar/canvas/Colors.py b/sugar/canvas/Colors.py index cd09179c..8a8f815a 100644 --- a/sugar/canvas/Colors.py +++ b/sugar/canvas/Colors.py @@ -1,563 +1,562 @@ -table = { -'white' : 'black' , \ -'#75C228' : '#0C3A0C', \ -'#C2B00C' : '#3A333A', \ -'#F09C23' : '#472E47', \ -'#F8975E' : '#680268', \ -'#F391B3' : '#610A61', \ -'#C29CFD' : '#4F0C4F', \ -'#7DB0FA' : '#331133', \ -'#0CBDF0' : '#113511', \ -'#35C2C0' : '#073807', \ -'#2BC78C' : '#193819', \ -'#75C228' : '#075707', \ -'#C2B00C' : '#5E455E', \ -'#F09C23' : '#6E3D6E', \ -'#F8975E' : '#941194', \ -'#F391B3' : '#8F0C8F', \ -'#C29CFD' : '#701770', \ -'#7DB0FA' : '#451945', \ -'#0CBDF0' : '#0C4C0C', \ -'#35C2C0' : '#1C511C', \ -'#2BC78C' : '#145414', \ -'#75C228' : '#3A6E3A', \ -'#C2B00C' : '#785C78', \ -'#F09C23' : '#AB3DAB', \ -'#F8975E' : '#C217C2', \ -'#F391B3' : '#B817B8', \ -'#C29CFD' : '#A114A1', \ -'#7DB0FA' : '#4A424A', \ -'#0CBDF0' : '#266826', \ -'#35C2C0' : '#356835', \ -'#2BC78C' : '#216E21', \ -'#75C228' : '#308C30', \ -'#C29CFD' : '#308C30', \ -'#35C2C0' : '#308C30', \ -'#F09C23' : '#308C30', \ -'#C2B00C' : '#997599', \ -'#7DB0FA' : '#997599', \ -'#2BC78C' : '#997599', \ -'#F8975E' : '#997599', \ -'#F09C23' : '#C25EC2', \ -'#0CBDF0' : '#C25EC2', \ -'#75C228' : '#C25EC2', \ -'#F391B3' : '#C25EC2', \ -'#F8975E' : '#F517F5', \ -'#35C2C0' : '#F517F5', \ -'#C2B00C' : '#F517F5', \ -'#C29CFD' : '#F517F5', \ -'#F391B3' : '#E32BE3', \ -'#2BC78C' : '#E32BE3', \ -'#F09C23' : '#E32BE3', \ -'#7DB0FA' : '#E32BE3', \ -'#C29CFD' : '#C71EC7', \ -'#75C228' : '#C71EC7', \ -'#F8975E' : '#C71EC7', \ -'#0CBDF0' : '#C71EC7', \ -'#7DB0FA' : '#576E57', \ -'#C2B00C' : '#576E57', \ -'#F391B3' : '#576E57', \ -'#35C2C0' : '#576E57', \ -'#0CBDF0' : '#118511', \ -'#F09C23' : '#118511', \ -'#C29CFD' : '#118511', \ -'#2BC78C' : '#118511', \ -'#35C2C0' : '#2E872E', \ -'#F8975E' : '#2E872E', \ -'#7DB0FA' : '#2E872E', \ -'#75C228' : '#2E872E', \ -'#2BC78C' : '#0F8A0F', \ -'#F391B3' : '#0F8A0F', \ -'#0CBDF0' : '#0F8A0F', \ -'#C2B00C' : '#0F8A0F', \ -'#0C3A19' : '#3A6E3A', \ -'#4F0C73' : '#3A6E3A', \ -'#073838' : '#3A6E3A', \ -'#472E17' : '#3A6E3A', \ -'#0C3A19' : '#308C30', \ -'#0C3A19' : '#66A366', \ -'#0C3A19' : '#75C275', \ -'#0C3A19' : '#38E838', \ -'#0C3A19' : '#97FA97', \ -'#3A3307' : '#785C78', \ -'#331194' : '#785C78', \ -'#193828' : '#785C78', \ -'#680211' : '#785C78', \ -'#3A3307' : '#997599', \ -'#3A3307' : '#AB91AB', \ -'#3A3307' : '#C2B0C2', \ -'#3A3307' : '#D1CFD1', \ -'#3A3307' : '#F0EBF0', \ -'#472E17' : '#AB3DAB', \ -'#113547' : '#AB3DAB', \ -'#0C3A19' : '#AB3DAB', \ -'#610A45' : '#AB3DAB', \ -'#472E17' : '#C25EC2', \ -'#472E17' : '#EB73EB', \ -'#472E17' : '#F09CF0', \ -'#472E17' : '#F8C2F8', \ -'#472E17' : '#F3E3F3', \ -'#680211' : '#C217C2', \ -'#073838' : '#C217C2', \ -'#3A3307' : '#C217C2', \ -'#4F0C73' : '#C217C2', \ -'#680211' : '#F517F5', \ -'#680211' : '#F863F8', \ -'#680211' : '#F897F8', \ -'#680211' : '#FDBAFD', \ -'#680211' : '#F3E1F3', \ -'#610A45' : '#B817B8', \ -'#193828' : '#B817B8', \ -'#472E17' : '#B817B8', \ -'#331194' : '#B817B8', \ -'#610A45' : '#E32BE3', \ -'#610A45' : '#F85CF8', \ -'#610A45' : '#F391F3', \ -'#610A45' : '#F8B8F8', \ -'#610A45' : '#FDD9FD', \ -'#4F0C73' : '#A114A1', \ -'#0C3A19' : '#A114A1', \ -'#680211' : '#A114A1', \ -'#113547' : '#A114A1', \ -'#4F0C73' : '#C71EC7', \ -'#4F0C73' : '#C76EC7', \ -'#4F0C73' : '#C29CC2', \ -'#4F0C73' : '#DEBADE', \ -'#4F0C73' : '#EBDEEB', \ -'#331194' : '#4A424A', \ -'#3A3307' : '#4A424A', \ -'#610A45' : '#4A424A', \ -'#073838' : '#4A424A', \ -'#331194' : '#576E57', \ -'#331194' : '#359735', \ -'#331194' : '#7DB07D', \ -'#331194' : '#AECCAE', \ -'#331194' : '#E1E3E1', \ -'#113547' : '#266826', \ -'#472E17' : '#266826', \ -'#4F0C73' : '#266826', \ -'#193828' : '#266826', \ -'#113547' : '#118511', \ -'#113547' : '#3A9E3A', \ -'#113547' : '#0CBD0C', \ -'#113547' : '#51DC51', \ -'#113547' : '#D4E6D4', \ -'#073838' : '#356835', \ -'#680211' : '#356835', \ -'#331194' : '#356835', \ -'#0C3A19' : '#356835', \ -'#073838' : '#2E872E', \ -'#073838' : '#47A147', \ -'#073838' : '#35C235', \ -'#073838' : '#17E317', \ -'#073838' : '#61FA61', \ -'#193828' : '#216E21', \ -'#610A45' : '#216E21', \ -'#113547' : '#216E21', \ -'#3A3307' : '#216E21', \ -'#193828' : '#0F8A0F', \ -'#193828' : '#23A823', \ -'#193828' : '#2BC72B', \ -'#193828' : '#40E340', \ -'#193828' : '#91FA91', \ -'#07571E' : '#308C30', \ -'#7017A3' : '#308C30', \ -'#1C514F' : '#308C30', \ -'#6E3D1E' : '#308C30', \ -'#07571E' : '#66A366', \ -'#07571E' : '#75C275', \ -'#07571E' : '#38E838', \ -'#07571E' : '#97FA97', \ -'#5E4505' : '#997599', \ -'#4519D7' : '#997599', \ -'#145435' : '#997599', \ -'#94111C' : '#997599', \ -'#5E4505' : '#AB91AB', \ -'#5E4505' : '#C2B0C2', \ -'#5E4505' : '#D1CFD1', \ -'#5E4505' : '#F0EBF0', \ -'#6E3D1E' : '#C25EC2', \ -'#0C4C70' : '#C25EC2', \ -'#07571E' : '#C25EC2', \ -'#8F0C51' : '#C25EC2', \ -'#6E3D1E' : '#EB73EB', \ -'#6E3D1E' : '#F09CF0', \ -'#6E3D1E' : '#F8C2F8', \ -'#6E3D1E' : '#F3E3F3', \ -'#94111C' : '#F517F5', \ -'#1C514F' : '#F517F5', \ -'#5E4505' : '#F517F5', \ -'#7017A3' : '#F517F5', \ -'#94111C' : '#F863F8', \ -'#94111C' : '#F897F8', \ -'#94111C' : '#FDBAFD', \ -'#94111C' : '#F3E1F3', \ -'#8F0C51' : '#E32BE3', \ -'#145435' : '#E32BE3', \ -'#6E3D1E' : '#E32BE3', \ -'#4519D7' : '#E32BE3', \ -'#8F0C51' : '#F85CF8', \ -'#8F0C51' : '#F391F3', \ -'#8F0C51' : '#F8B8F8', \ -'#8F0C51' : '#FDD9FD', \ -'#7017A3' : '#C71EC7', \ -'#07571E' : '#C71EC7', \ -'#94111C' : '#C71EC7', \ -'#0C4C70' : '#C71EC7', \ -'#7017A3' : '#C76EC7', \ -'#7017A3' : '#C29CC2', \ -'#7017A3' : '#DEBADE', \ -'#7017A3' : '#EBDEEB', \ -'#4519D7' : '#576E57', \ -'#5E4505' : '#576E57', \ -'#8F0C51' : '#576E57', \ -'#1C514F' : '#576E57', \ -'#4519D7' : '#359735', \ -'#4519D7' : '#7DB07D', \ -'#4519D7' : '#AECCAE', \ -'#4519D7' : '#E1E3E1', \ -'#0C4C70' : '#118511', \ -'#6E3D1E' : '#118511', \ -'#7017A3' : '#118511', \ -'#145435' : '#118511', \ -'#0C4C70' : '#3A9E3A', \ -'#0C4C70' : '#0CBD0C', \ -'#0C4C70' : '#51DC51', \ -'#0C4C70' : '#D4E6D4', \ -'#1C514F' : '#2E872E', \ -'#94111C' : '#2E872E', \ -'#4519D7' : '#2E872E', \ -'#07571E' : '#2E872E', \ -'#1C514F' : '#47A147', \ -'#1C514F' : '#35C235', \ -'#1C514F' : '#17E317', \ -'#1C514F' : '#61FA61', \ -'#145435' : '#0F8A0F', \ -'#8F0C51' : '#0F8A0F', \ -'#0C4C70' : '#0F8A0F', \ -'#5E4505' : '#0F8A0F', \ -'#145435' : '#23A823', \ -'#145435' : '#2BC72B', \ -'#145435' : '#40E340', \ -'#145435' : '#91FA91', \ -'#75C228' : '#97FA97', \ -'#C29CFD' : '#97FA97', \ -'#35C2C0' : '#97FA97', \ -'#F09C23' : '#97FA97', \ -'#C2B00C' : '#F0EBF0', \ -'#7DB0FA' : '#F0EBF0', \ -'#2BC78C' : '#F0EBF0', \ -'#F8975E' : '#F0EBF0', \ -'#F09C23' : '#F3E3F3', \ -'#0CBDF0' : '#F3E3F3', \ -'#75C228' : '#F3E3F3', \ -'#F391B3' : '#F3E3F3', \ -'#F8975E' : '#F3E1F3', \ -'#35C2C0' : '#F3E1F3', \ -'#C2B00C' : '#F3E1F3', \ -'#C29CFD' : '#F3E1F3', \ -'#F391B3' : '#FDD9FD', \ -'#2BC78C' : '#FDD9FD', \ -'#F09C23' : '#FDD9FD', \ -'#7DB0FA' : '#FDD9FD', \ -'#C29CFD' : '#EBDEEB', \ -'#75C228' : '#EBDEEB', \ -'#F8975E' : '#EBDEEB', \ -'#0CBDF0' : '#EBDEEB', \ -'#7DB0FA' : '#E1E3E1', \ -'#C2B00C' : '#E1E3E1', \ -'#F391B3' : '#E1E3E1', \ -'#35C2C0' : '#E1E3E1', \ -'#0CBDF0' : '#D4E6D4', \ -'#F09C23' : '#D4E6D4', \ -'#C29CFD' : '#D4E6D4', \ -'#2BC78C' : '#D4E6D4', \ -'#35C2C0' : '#61FA61', \ -'#F8975E' : '#61FA61', \ -'#7DB0FA' : '#61FA61', \ -'#75C228' : '#61FA61', \ -'#2BC78C' : '#91FA91', \ -'#F391B3' : '#91FA91', \ -'#0CBDF0' : '#91FA91', \ -'#C2B00C' : '#91FA91', \ -'#75C228' : '#0C3A0C', \ -'#C2B00C' : '#3A333A', \ -'#F09C23' : '#472E47', \ -'#F8975E' : '#680268', \ -'#F391B3' : '#610A61', \ -'#C29CFD' : '#4F0C4F', \ -'#7DB0FA' : '#331133', \ -'#0CBDF0' : '#113511', \ -'#35C2C0' : '#073807', \ -'#2BC78C' : '#193819', \ -'#75C228' : '#075707', \ -'#C2B00C' : '#5E455E', \ -'#F09C23' : '#6E3D6E', \ -'#F8975E' : '#941194', \ -'#F391B3' : '#8F0C8F', \ -'#C29CFD' : '#701770', \ -'#7DB0FA' : '#451945', \ -'#0CBDF0' : '#0C4C0C', \ -'#35C2C0' : '#1C511C', \ -'#2BC78C' : '#145414', \ -'#75C228' : '#3A6E3A', \ -'#C2B00C' : '#785C78', \ -'#F09C23' : '#AB3DAB', \ -'#F8975E' : '#C217C2', \ -'#F391B3' : '#B817B8', \ -'#C29CFD' : '#A114A1', \ -'#7DB0FA' : '#4A424A', \ -'#0CBDF0' : '#266826', \ -'#35C2C0' : '#356835', \ -'#2BC78C' : '#216E21', \ -'#75C228' : '#308C30', \ -'#C29CFD' : '#308C30', \ -'#35C2C0' : '#308C30', \ -'#F09C23' : '#308C30', \ -'#C2B00C' : '#997599', \ -'#7DB0FA' : '#997599', \ -'#2BC78C' : '#997599', \ -'#F8975E' : '#997599', \ -'#F09C23' : '#C25EC2', \ -'#0CBDF0' : '#C25EC2', \ -'#75C228' : '#C25EC2', \ -'#F391B3' : '#C25EC2', \ -'#F8975E' : '#F517F5', \ -'#35C2C0' : '#F517F5', \ -'#C2B00C' : '#F517F5', \ -'#C29CFD' : '#F517F5', \ -'#F391B3' : '#E32BE3', \ -'#2BC78C' : '#E32BE3', \ -'#F09C23' : '#E32BE3', \ -'#7DB0FA' : '#E32BE3', \ -'#C29CFD' : '#C71EC7', \ -'#75C228' : '#C71EC7', \ -'#F8975E' : '#C71EC7', \ -'#0CBDF0' : '#C71EC7', \ -'#7DB0FA' : '#576E57', \ -'#C2B00C' : '#576E57', \ -'#F391B3' : '#576E57', \ -'#35C2C0' : '#576E57', \ -'#0CBDF0' : '#118511', \ -'#F09C23' : '#118511', \ -'#C29CFD' : '#118511', \ -'#2BC78C' : '#118511', \ -'#35C2C0' : '#2E872E', \ -'#F8975E' : '#2E872E', \ -'#7DB0FA' : '#2E872E', \ -'#75C228' : '#2E872E', \ -'#2BC78C' : '#0F8A0F', \ -'#F391B3' : '#0F8A0F', \ -'#0CBDF0' : '#0F8A0F', \ -'#C2B00C' : '#0F8A0F', \ -'#0C3A19' : '#3A6E3A', \ -'#4F0C73' : '#3A6E3A', \ -'#073838' : '#3A6E3A', \ -'#472E17' : '#3A6E3A', \ -'#0C3A19' : '#308C30', \ -'#0C3A19' : '#66A366', \ -'#0C3A19' : '#75C275', \ -'#0C3A19' : '#38E838', \ -'#0C3A19' : '#97FA97', \ -'#3A3307' : '#785C78', \ -'#331194' : '#785C78', \ -'#193828' : '#785C78', \ -'#680211' : '#785C78', \ -'#3A3307' : '#997599', \ -'#3A3307' : '#AB91AB', \ -'#3A3307' : '#C2B0C2', \ -'#3A3307' : '#D1CFD1', \ -'#3A3307' : '#F0EBF0', \ -'#472E17' : '#AB3DAB', \ -'#113547' : '#AB3DAB', \ -'#0C3A19' : '#AB3DAB', \ -'#610A45' : '#AB3DAB', \ -'#472E17' : '#C25EC2', \ -'#472E17' : '#EB73EB', \ -'#472E17' : '#F09CF0', \ -'#472E17' : '#F8C2F8', \ -'#472E17' : '#F3E3F3', \ -'#680211' : '#C217C2', \ -'#073838' : '#C217C2', \ -'#3A3307' : '#C217C2', \ -'#4F0C73' : '#C217C2', \ -'#680211' : '#F517F5', \ -'#680211' : '#F863F8', \ -'#680211' : '#F897F8', \ -'#680211' : '#FDBAFD', \ -'#680211' : '#F3E1F3', \ -'#610A45' : '#B817B8', \ -'#193828' : '#B817B8', \ -'#472E17' : '#B817B8', \ -'#331194' : '#B817B8', \ -'#610A45' : '#E32BE3', \ -'#610A45' : '#F85CF8', \ -'#610A45' : '#F391F3', \ -'#610A45' : '#F8B8F8', \ -'#610A45' : '#FDD9FD', \ -'#4F0C73' : '#A114A1', \ -'#0C3A19' : '#A114A1', \ -'#680211' : '#A114A1', \ -'#113547' : '#A114A1', \ -'#4F0C73' : '#C71EC7', \ -'#4F0C73' : '#C76EC7', \ -'#4F0C73' : '#C29CC2', \ -'#4F0C73' : '#DEBADE', \ -'#4F0C73' : '#EBDEEB', \ -'#331194' : '#4A424A', \ -'#3A3307' : '#4A424A', \ -'#610A45' : '#4A424A', \ -'#073838' : '#4A424A', \ -'#331194' : '#576E57', \ -'#331194' : '#359735', \ -'#331194' : '#7DB07D', \ -'#331194' : '#AECCAE', \ -'#331194' : '#E1E3E1', \ -'#113547' : '#266826', \ -'#472E17' : '#266826', \ -'#4F0C73' : '#266826', \ -'#193828' : '#266826', \ -'#113547' : '#118511', \ -'#113547' : '#3A9E3A', \ -'#113547' : '#0CBD0C', \ -'#113547' : '#51DC51', \ -'#113547' : '#D4E6D4', \ -'#073838' : '#356835', \ -'#680211' : '#356835', \ -'#331194' : '#356835', \ -'#0C3A19' : '#356835', \ -'#073838' : '#2E872E', \ -'#073838' : '#47A147', \ -'#073838' : '#35C235', \ -'#073838' : '#17E317', \ -'#073838' : '#61FA61', \ -'#193828' : '#216E21', \ -'#610A45' : '#216E21', \ -'#113547' : '#216E21', \ -'#3A3307' : '#216E21', \ -'#193828' : '#0F8A0F', \ -'#193828' : '#23A823', \ -'#193828' : '#2BC72B', \ -'#193828' : '#40E340', \ -'#193828' : '#91FA91', \ -'#07571E' : '#308C30', \ -'#7017A3' : '#308C30', \ -'#1C514F' : '#308C30', \ -'#6E3D1E' : '#308C30', \ -'#07571E' : '#66A366', \ -'#07571E' : '#75C275', \ -'#07571E' : '#38E838', \ -'#07571E' : '#97FA97', \ -'#5E4505' : '#997599', \ -'#4519D7' : '#997599', \ -'#145435' : '#997599', \ -'#94111C' : '#997599', \ -'#5E4505' : '#AB91AB', \ -'#5E4505' : '#C2B0C2', \ -'#5E4505' : '#D1CFD1', \ -'#5E4505' : '#F0EBF0', \ -'#6E3D1E' : '#C25EC2', \ -'#0C4C70' : '#C25EC2', \ -'#07571E' : '#C25EC2', \ -'#8F0C51' : '#C25EC2', \ -'#6E3D1E' : '#EB73EB', \ -'#6E3D1E' : '#F09CF0', \ -'#6E3D1E' : '#F8C2F8', \ -'#6E3D1E' : '#F3E3F3', \ -'#94111C' : '#F517F5', \ -'#1C514F' : '#F517F5', \ -'#5E4505' : '#F517F5', \ -'#7017A3' : '#F517F5', \ -'#94111C' : '#F863F8', \ -'#94111C' : '#F897F8', \ -'#94111C' : '#FDBAFD', \ -'#94111C' : '#F3E1F3', \ -'#8F0C51' : '#E32BE3', \ -'#145435' : '#E32BE3', \ -'#6E3D1E' : '#E32BE3', \ -'#4519D7' : '#E32BE3', \ -'#8F0C51' : '#F85CF8', \ -'#8F0C51' : '#F391F3', \ -'#8F0C51' : '#F8B8F8', \ -'#8F0C51' : '#FDD9FD', \ -'#7017A3' : '#C71EC7', \ -'#07571E' : '#C71EC7', \ -'#94111C' : '#C71EC7', \ -'#0C4C70' : '#C71EC7', \ -'#7017A3' : '#C76EC7', \ -'#7017A3' : '#C29CC2', \ -'#7017A3' : '#DEBADE', \ -'#7017A3' : '#EBDEEB', \ -'#4519D7' : '#576E57', \ -'#5E4505' : '#576E57', \ -'#8F0C51' : '#576E57', \ -'#1C514F' : '#576E57', \ -'#4519D7' : '#359735', \ -'#4519D7' : '#7DB07D', \ -'#4519D7' : '#AECCAE', \ -'#4519D7' : '#E1E3E1', \ -'#0C4C70' : '#118511', \ -'#6E3D1E' : '#118511', \ -'#7017A3' : '#118511', \ -'#145435' : '#118511', \ -'#0C4C70' : '#3A9E3A', \ -'#0C4C70' : '#0CBD0C', \ -'#0C4C70' : '#51DC51', \ -'#0C4C70' : '#D4E6D4', \ -'#1C514F' : '#2E872E', \ -'#94111C' : '#2E872E', \ -'#4519D7' : '#2E872E', \ -'#07571E' : '#2E872E', \ -'#1C514F' : '#47A147', \ -'#1C514F' : '#35C235', \ -'#1C514F' : '#17E317', \ -'#1C514F' : '#61FA61', \ -'#145435' : '#0F8A0F', \ -'#8F0C51' : '#0F8A0F', \ -'#0C4C70' : '#0F8A0F', \ -'#5E4505' : '#0F8A0F', \ -'#145435' : '#23A823', \ -'#145435' : '#2BC72B', \ -'#145435' : '#40E340', \ -'#145435' : '#91FA91', \ -'#75C228' : '#97FA97', \ -'#C29CFD' : '#97FA97', \ -'#35C2C0' : '#97FA97', \ -'#F09C23' : '#97FA97', \ -'#C2B00C' : '#F0EBF0', \ -'#7DB0FA' : '#F0EBF0', \ -'#2BC78C' : '#F0EBF0', \ -'#F8975E' : '#F0EBF0', \ -'#F09C23' : '#F3E3F3', \ -'#0CBDF0' : '#F3E3F3', \ -'#75C228' : '#F3E3F3', \ -'#F391B3' : '#F3E3F3', \ -'#F8975E' : '#F3E1F3', \ -'#35C2C0' : '#F3E1F3', \ -'#C2B00C' : '#F3E1F3', \ -'#C29CFD' : '#F3E1F3', \ -'#F391B3' : '#FDD9FD', \ -'#2BC78C' : '#FDD9FD', \ -'#F09C23' : '#FDD9FD', \ -'#7DB0FA' : '#FDD9FD', \ -'#C29CFD' : '#EBDEEB', \ -'#75C228' : '#EBDEEB', \ -'#F8975E' : '#EBDEEB', \ -'#0CBDF0' : '#EBDEEB', \ -'#7DB0FA' : '#E1E3E1', \ -'#C2B00C' : '#E1E3E1', \ -'#F391B3' : '#E1E3E1', \ -'#35C2C0' : '#E1E3E1', \ -'#0CBDF0' : '#D4E6D4', \ -'#F09C23' : '#D4E6D4', \ -'#C29CFD' : '#D4E6D4', \ -'#2BC78C' : '#D4E6D4', \ -'#35C2C0' : '#61FA61', \ -'#F8975E' : '#61FA61', \ -'#7DB0FA' : '#61FA61', \ -'#75C228' : '#61FA61', \ -'#2BC78C' : '#91FA91', \ -'#F391B3' : '#91FA91', \ -'#0CBDF0' : '#91FA91', \ -'#C2B00C' : '#91FA91', \ -} +colors = [ +['#75C228', '#0C3A0C'], \ +['#C2B00C', '#3A333A'], \ +['#F09C23', '#472E47'], \ +['#F8975E', '#680268'], \ +['#F391B3', '#610A61'], \ +['#C29CFD', '#4F0C4F'], \ +['#7DB0FA', '#331133'], \ +['#0CBDF0', '#113511'], \ +['#35C2C0', '#073807'], \ +['#2BC78C', '#193819'], \ +['#75C228', '#075707'], \ +['#C2B00C', '#5E455E'], \ +['#F09C23', '#6E3D6E'], \ +['#F8975E', '#941194'], \ +['#F391B3', '#8F0C8F'], \ +['#C29CFD', '#701770'], \ +['#7DB0FA', '#451945'], \ +['#0CBDF0', '#0C4C0C'], \ +['#35C2C0', '#1C511C'], \ +['#2BC78C', '#145414'], \ +['#75C228', '#3A6E3A'], \ +['#C2B00C', '#785C78'], \ +['#F09C23', '#AB3DAB'], \ +['#F8975E', '#C217C2'], \ +['#F391B3', '#B817B8'], \ +['#C29CFD', '#A114A1'], \ +['#7DB0FA', '#4A424A'], \ +['#0CBDF0', '#266826'], \ +['#35C2C0', '#356835'], \ +['#2BC78C', '#216E21'], \ +['#75C228', '#308C30'], \ +['#C29CFD', '#308C30'], \ +['#35C2C0', '#308C30'], \ +['#F09C23', '#308C30'], \ +['#C2B00C', '#997599'], \ +['#7DB0FA', '#997599'], \ +['#2BC78C', '#997599'], \ +['#F8975E', '#997599'], \ +['#F09C23', '#C25EC2'], \ +['#0CBDF0', '#C25EC2'], \ +['#75C228', '#C25EC2'], \ +['#F391B3', '#C25EC2'], \ +['#F8975E', '#F517F5'], \ +['#35C2C0', '#F517F5'], \ +['#C2B00C', '#F517F5'], \ +['#C29CFD', '#F517F5'], \ +['#F391B3', '#E32BE3'], \ +['#2BC78C', '#E32BE3'], \ +['#F09C23', '#E32BE3'], \ +['#7DB0FA', '#E32BE3'], \ +['#C29CFD', '#C71EC7'], \ +['#75C228', '#C71EC7'], \ +['#F8975E', '#C71EC7'], \ +['#0CBDF0', '#C71EC7'], \ +['#7DB0FA', '#576E57'], \ +['#C2B00C', '#576E57'], \ +['#F391B3', '#576E57'], \ +['#35C2C0', '#576E57'], \ +['#0CBDF0', '#118511'], \ +['#F09C23', '#118511'], \ +['#C29CFD', '#118511'], \ +['#2BC78C', '#118511'], \ +['#35C2C0', '#2E872E'], \ +['#F8975E', '#2E872E'], \ +['#7DB0FA', '#2E872E'], \ +['#75C228', '#2E872E'], \ +['#2BC78C', '#0F8A0F'], \ +['#F391B3', '#0F8A0F'], \ +['#0CBDF0', '#0F8A0F'], \ +['#C2B00C', '#0F8A0F'], \ +['#0C3A19', '#3A6E3A'], \ +['#4F0C73', '#3A6E3A'], \ +['#073838', '#3A6E3A'], \ +['#472E17', '#3A6E3A'], \ +['#0C3A19', '#308C30'], \ +['#0C3A19', '#66A366'], \ +['#0C3A19', '#75C275'], \ +['#0C3A19', '#38E838'], \ +['#0C3A19', '#97FA97'], \ +['#3A3307', '#785C78'], \ +['#331194', '#785C78'], \ +['#193828', '#785C78'], \ +['#680211', '#785C78'], \ +['#3A3307', '#997599'], \ +['#3A3307', '#AB91AB'], \ +['#3A3307', '#C2B0C2'], \ +['#3A3307', '#D1CFD1'], \ +['#3A3307', '#F0EBF0'], \ +['#472E17', '#AB3DAB'], \ +['#113547', '#AB3DAB'], \ +['#0C3A19', '#AB3DAB'], \ +['#610A45', '#AB3DAB'], \ +['#472E17', '#C25EC2'], \ +['#472E17', '#EB73EB'], \ +['#472E17', '#F09CF0'], \ +['#472E17', '#F8C2F8'], \ +['#472E17', '#F3E3F3'], \ +['#680211', '#C217C2'], \ +['#073838', '#C217C2'], \ +['#3A3307', '#C217C2'], \ +['#4F0C73', '#C217C2'], \ +['#680211', '#F517F5'], \ +['#680211', '#F863F8'], \ +['#680211', '#F897F8'], \ +['#680211', '#FDBAFD'], \ +['#680211', '#F3E1F3'], \ +['#610A45', '#B817B8'], \ +['#193828', '#B817B8'], \ +['#472E17', '#B817B8'], \ +['#331194', '#B817B8'], \ +['#610A45', '#E32BE3'], \ +['#610A45', '#F85CF8'], \ +['#610A45', '#F391F3'], \ +['#610A45', '#F8B8F8'], \ +['#610A45', '#FDD9FD'], \ +['#4F0C73', '#A114A1'], \ +['#0C3A19', '#A114A1'], \ +['#680211', '#A114A1'], \ +['#113547', '#A114A1'], \ +['#4F0C73', '#C71EC7'], \ +['#4F0C73', '#C76EC7'], \ +['#4F0C73', '#C29CC2'], \ +['#4F0C73', '#DEBADE'], \ +['#4F0C73', '#EBDEEB'], \ +['#331194', '#4A424A'], \ +['#3A3307', '#4A424A'], \ +['#610A45', '#4A424A'], \ +['#073838', '#4A424A'], \ +['#331194', '#576E57'], \ +['#331194', '#359735'], \ +['#331194', '#7DB07D'], \ +['#331194', '#AECCAE'], \ +['#331194', '#E1E3E1'], \ +['#113547', '#266826'], \ +['#472E17', '#266826'], \ +['#4F0C73', '#266826'], \ +['#193828', '#266826'], \ +['#113547', '#118511'], \ +['#113547', '#3A9E3A'], \ +['#113547', '#0CBD0C'], \ +['#113547', '#51DC51'], \ +['#113547', '#D4E6D4'], \ +['#073838', '#356835'], \ +['#680211', '#356835'], \ +['#331194', '#356835'], \ +['#0C3A19', '#356835'], \ +['#073838', '#2E872E'], \ +['#073838', '#47A147'], \ +['#073838', '#35C235'], \ +['#073838', '#17E317'], \ +['#073838', '#61FA61'], \ +['#193828', '#216E21'], \ +['#610A45', '#216E21'], \ +['#113547', '#216E21'], \ +['#3A3307', '#216E21'], \ +['#193828', '#0F8A0F'], \ +['#193828', '#23A823'], \ +['#193828', '#2BC72B'], \ +['#193828', '#40E340'], \ +['#193828', '#91FA91'], \ +['#07571E', '#308C30'], \ +['#7017A3', '#308C30'], \ +['#1C514F', '#308C30'], \ +['#6E3D1E', '#308C30'], \ +['#07571E', '#66A366'], \ +['#07571E', '#75C275'], \ +['#07571E', '#38E838'], \ +['#07571E', '#97FA97'], \ +['#5E4505', '#997599'], \ +['#4519D7', '#997599'], \ +['#145435', '#997599'], \ +['#94111C', '#997599'], \ +['#5E4505', '#AB91AB'], \ +['#5E4505', '#C2B0C2'], \ +['#5E4505', '#D1CFD1'], \ +['#5E4505', '#F0EBF0'], \ +['#6E3D1E', '#C25EC2'], \ +['#0C4C70', '#C25EC2'], \ +['#07571E', '#C25EC2'], \ +['#8F0C51', '#C25EC2'], \ +['#6E3D1E', '#EB73EB'], \ +['#6E3D1E', '#F09CF0'], \ +['#6E3D1E', '#F8C2F8'], \ +['#6E3D1E', '#F3E3F3'], \ +['#94111C', '#F517F5'], \ +['#1C514F', '#F517F5'], \ +['#5E4505', '#F517F5'], \ +['#7017A3', '#F517F5'], \ +['#94111C', '#F863F8'], \ +['#94111C', '#F897F8'], \ +['#94111C', '#FDBAFD'], \ +['#94111C', '#F3E1F3'], \ +['#8F0C51', '#E32BE3'], \ +['#145435', '#E32BE3'], \ +['#6E3D1E', '#E32BE3'], \ +['#4519D7', '#E32BE3'], \ +['#8F0C51', '#F85CF8'], \ +['#8F0C51', '#F391F3'], \ +['#8F0C51', '#F8B8F8'], \ +['#8F0C51', '#FDD9FD'], \ +['#7017A3', '#C71EC7'], \ +['#07571E', '#C71EC7'], \ +['#94111C', '#C71EC7'], \ +['#0C4C70', '#C71EC7'], \ +['#7017A3', '#C76EC7'], \ +['#7017A3', '#C29CC2'], \ +['#7017A3', '#DEBADE'], \ +['#7017A3', '#EBDEEB'], \ +['#4519D7', '#576E57'], \ +['#5E4505', '#576E57'], \ +['#8F0C51', '#576E57'], \ +['#1C514F', '#576E57'], \ +['#4519D7', '#359735'], \ +['#4519D7', '#7DB07D'], \ +['#4519D7', '#AECCAE'], \ +['#4519D7', '#E1E3E1'], \ +['#0C4C70', '#118511'], \ +['#6E3D1E', '#118511'], \ +['#7017A3', '#118511'], \ +['#145435', '#118511'], \ +['#0C4C70', '#3A9E3A'], \ +['#0C4C70', '#0CBD0C'], \ +['#0C4C70', '#51DC51'], \ +['#0C4C70', '#D4E6D4'], \ +['#1C514F', '#2E872E'], \ +['#94111C', '#2E872E'], \ +['#4519D7', '#2E872E'], \ +['#07571E', '#2E872E'], \ +['#1C514F', '#47A147'], \ +['#1C514F', '#35C235'], \ +['#1C514F', '#17E317'], \ +['#1C514F', '#61FA61'], \ +['#145435', '#0F8A0F'], \ +['#8F0C51', '#0F8A0F'], \ +['#0C4C70', '#0F8A0F'], \ +['#5E4505', '#0F8A0F'], \ +['#145435', '#23A823'], \ +['#145435', '#2BC72B'], \ +['#145435', '#40E340'], \ +['#145435', '#91FA91'], \ +['#75C228', '#97FA97'], \ +['#C29CFD', '#97FA97'], \ +['#35C2C0', '#97FA97'], \ +['#F09C23', '#97FA97'], \ +['#C2B00C', '#F0EBF0'], \ +['#7DB0FA', '#F0EBF0'], \ +['#2BC78C', '#F0EBF0'], \ +['#F8975E', '#F0EBF0'], \ +['#F09C23', '#F3E3F3'], \ +['#0CBDF0', '#F3E3F3'], \ +['#75C228', '#F3E3F3'], \ +['#F391B3', '#F3E3F3'], \ +['#F8975E', '#F3E1F3'], \ +['#35C2C0', '#F3E1F3'], \ +['#C2B00C', '#F3E1F3'], \ +['#C29CFD', '#F3E1F3'], \ +['#F391B3', '#FDD9FD'], \ +['#2BC78C', '#FDD9FD'], \ +['#F09C23', '#FDD9FD'], \ +['#7DB0FA', '#FDD9FD'], \ +['#C29CFD', '#EBDEEB'], \ +['#75C228', '#EBDEEB'], \ +['#F8975E', '#EBDEEB'], \ +['#0CBDF0', '#EBDEEB'], \ +['#7DB0FA', '#E1E3E1'], \ +['#C2B00C', '#E1E3E1'], \ +['#F391B3', '#E1E3E1'], \ +['#35C2C0', '#E1E3E1'], \ +['#0CBDF0', '#D4E6D4'], \ +['#F09C23', '#D4E6D4'], \ +['#C29CFD', '#D4E6D4'], \ +['#2BC78C', '#D4E6D4'], \ +['#35C2C0', '#61FA61'], \ +['#F8975E', '#61FA61'], \ +['#7DB0FA', '#61FA61'], \ +['#75C228', '#61FA61'], \ +['#2BC78C', '#91FA91'], \ +['#F391B3', '#91FA91'], \ +['#0CBDF0', '#91FA91'], \ +['#C2B00C', '#91FA91'], \ +['#75C228', '#0C3A0C'], \ +['#C2B00C', '#3A333A'], \ +['#F09C23', '#472E47'], \ +['#F8975E', '#680268'], \ +['#F391B3', '#610A61'], \ +['#C29CFD', '#4F0C4F'], \ +['#7DB0FA', '#331133'], \ +['#0CBDF0', '#113511'], \ +['#35C2C0', '#073807'], \ +['#2BC78C', '#193819'], \ +['#75C228', '#075707'], \ +['#C2B00C', '#5E455E'], \ +['#F09C23', '#6E3D6E'], \ +['#F8975E', '#941194'], \ +['#F391B3', '#8F0C8F'], \ +['#C29CFD', '#701770'], \ +['#7DB0FA', '#451945'], \ +['#0CBDF0', '#0C4C0C'], \ +['#35C2C0', '#1C511C'], \ +['#2BC78C', '#145414'], \ +['#75C228', '#3A6E3A'], \ +['#C2B00C', '#785C78'], \ +['#F09C23', '#AB3DAB'], \ +['#F8975E', '#C217C2'], \ +['#F391B3', '#B817B8'], \ +['#C29CFD', '#A114A1'], \ +['#7DB0FA', '#4A424A'], \ +['#0CBDF0', '#266826'], \ +['#35C2C0', '#356835'], \ +['#2BC78C', '#216E21'], \ +['#75C228', '#308C30'], \ +['#C29CFD', '#308C30'], \ +['#35C2C0', '#308C30'], \ +['#F09C23', '#308C30'], \ +['#C2B00C', '#997599'], \ +['#7DB0FA', '#997599'], \ +['#2BC78C', '#997599'], \ +['#F8975E', '#997599'], \ +['#F09C23', '#C25EC2'], \ +['#0CBDF0', '#C25EC2'], \ +['#75C228', '#C25EC2'], \ +['#F391B3', '#C25EC2'], \ +['#F8975E', '#F517F5'], \ +['#35C2C0', '#F517F5'], \ +['#C2B00C', '#F517F5'], \ +['#C29CFD', '#F517F5'], \ +['#F391B3', '#E32BE3'], \ +['#2BC78C', '#E32BE3'], \ +['#F09C23', '#E32BE3'], \ +['#7DB0FA', '#E32BE3'], \ +['#C29CFD', '#C71EC7'], \ +['#75C228', '#C71EC7'], \ +['#F8975E', '#C71EC7'], \ +['#0CBDF0', '#C71EC7'], \ +['#7DB0FA', '#576E57'], \ +['#C2B00C', '#576E57'], \ +['#F391B3', '#576E57'], \ +['#35C2C0', '#576E57'], \ +['#0CBDF0', '#118511'], \ +['#F09C23', '#118511'], \ +['#C29CFD', '#118511'], \ +['#2BC78C', '#118511'], \ +['#35C2C0', '#2E872E'], \ +['#F8975E', '#2E872E'], \ +['#7DB0FA', '#2E872E'], \ +['#75C228', '#2E872E'], \ +['#2BC78C', '#0F8A0F'], \ +['#F391B3', '#0F8A0F'], \ +['#0CBDF0', '#0F8A0F'], \ +['#C2B00C', '#0F8A0F'], \ +['#0C3A19', '#3A6E3A'], \ +['#4F0C73', '#3A6E3A'], \ +['#073838', '#3A6E3A'], \ +['#472E17', '#3A6E3A'], \ +['#0C3A19', '#308C30'], \ +['#0C3A19', '#66A366'], \ +['#0C3A19', '#75C275'], \ +['#0C3A19', '#38E838'], \ +['#0C3A19', '#97FA97'], \ +['#3A3307', '#785C78'], \ +['#331194', '#785C78'], \ +['#193828', '#785C78'], \ +['#680211', '#785C78'], \ +['#3A3307', '#997599'], \ +['#3A3307', '#AB91AB'], \ +['#3A3307', '#C2B0C2'], \ +['#3A3307', '#D1CFD1'], \ +['#3A3307', '#F0EBF0'], \ +['#472E17', '#AB3DAB'], \ +['#113547', '#AB3DAB'], \ +['#0C3A19', '#AB3DAB'], \ +['#610A45', '#AB3DAB'], \ +['#472E17', '#C25EC2'], \ +['#472E17', '#EB73EB'], \ +['#472E17', '#F09CF0'], \ +['#472E17', '#F8C2F8'], \ +['#472E17', '#F3E3F3'], \ +['#680211', '#C217C2'], \ +['#073838', '#C217C2'], \ +['#3A3307', '#C217C2'], \ +['#4F0C73', '#C217C2'], \ +['#680211', '#F517F5'], \ +['#680211', '#F863F8'], \ +['#680211', '#F897F8'], \ +['#680211', '#FDBAFD'], \ +['#680211', '#F3E1F3'], \ +['#610A45', '#B817B8'], \ +['#193828', '#B817B8'], \ +['#472E17', '#B817B8'], \ +['#331194', '#B817B8'], \ +['#610A45', '#E32BE3'], \ +['#610A45', '#F85CF8'], \ +['#610A45', '#F391F3'], \ +['#610A45', '#F8B8F8'], \ +['#610A45', '#FDD9FD'], \ +['#4F0C73', '#A114A1'], \ +['#0C3A19', '#A114A1'], \ +['#680211', '#A114A1'], \ +['#113547', '#A114A1'], \ +['#4F0C73', '#C71EC7'], \ +['#4F0C73', '#C76EC7'], \ +['#4F0C73', '#C29CC2'], \ +['#4F0C73', '#DEBADE'], \ +['#4F0C73', '#EBDEEB'], \ +['#331194', '#4A424A'], \ +['#3A3307', '#4A424A'], \ +['#610A45', '#4A424A'], \ +['#073838', '#4A424A'], \ +['#331194', '#576E57'], \ +['#331194', '#359735'], \ +['#331194', '#7DB07D'], \ +['#331194', '#AECCAE'], \ +['#331194', '#E1E3E1'], \ +['#113547', '#266826'], \ +['#472E17', '#266826'], \ +['#4F0C73', '#266826'], \ +['#193828', '#266826'], \ +['#113547', '#118511'], \ +['#113547', '#3A9E3A'], \ +['#113547', '#0CBD0C'], \ +['#113547', '#51DC51'], \ +['#113547', '#D4E6D4'], \ +['#073838', '#356835'], \ +['#680211', '#356835'], \ +['#331194', '#356835'], \ +['#0C3A19', '#356835'], \ +['#073838', '#2E872E'], \ +['#073838', '#47A147'], \ +['#073838', '#35C235'], \ +['#073838', '#17E317'], \ +['#073838', '#61FA61'], \ +['#193828', '#216E21'], \ +['#610A45', '#216E21'], \ +['#113547', '#216E21'], \ +['#3A3307', '#216E21'], \ +['#193828', '#0F8A0F'], \ +['#193828', '#23A823'], \ +['#193828', '#2BC72B'], \ +['#193828', '#40E340'], \ +['#193828', '#91FA91'], \ +['#07571E', '#308C30'], \ +['#7017A3', '#308C30'], \ +['#1C514F', '#308C30'], \ +['#6E3D1E', '#308C30'], \ +['#07571E', '#66A366'], \ +['#07571E', '#75C275'], \ +['#07571E', '#38E838'], \ +['#07571E', '#97FA97'], \ +['#5E4505', '#997599'], \ +['#4519D7', '#997599'], \ +['#145435', '#997599'], \ +['#94111C', '#997599'], \ +['#5E4505', '#AB91AB'], \ +['#5E4505', '#C2B0C2'], \ +['#5E4505', '#D1CFD1'], \ +['#5E4505', '#F0EBF0'], \ +['#6E3D1E', '#C25EC2'], \ +['#0C4C70', '#C25EC2'], \ +['#07571E', '#C25EC2'], \ +['#8F0C51', '#C25EC2'], \ +['#6E3D1E', '#EB73EB'], \ +['#6E3D1E', '#F09CF0'], \ +['#6E3D1E', '#F8C2F8'], \ +['#6E3D1E', '#F3E3F3'], \ +['#94111C', '#F517F5'], \ +['#1C514F', '#F517F5'], \ +['#5E4505', '#F517F5'], \ +['#7017A3', '#F517F5'], \ +['#94111C', '#F863F8'], \ +['#94111C', '#F897F8'], \ +['#94111C', '#FDBAFD'], \ +['#94111C', '#F3E1F3'], \ +['#8F0C51', '#E32BE3'], \ +['#145435', '#E32BE3'], \ +['#6E3D1E', '#E32BE3'], \ +['#4519D7', '#E32BE3'], \ +['#8F0C51', '#F85CF8'], \ +['#8F0C51', '#F391F3'], \ +['#8F0C51', '#F8B8F8'], \ +['#8F0C51', '#FDD9FD'], \ +['#7017A3', '#C71EC7'], \ +['#07571E', '#C71EC7'], \ +['#94111C', '#C71EC7'], \ +['#0C4C70', '#C71EC7'], \ +['#7017A3', '#C76EC7'], \ +['#7017A3', '#C29CC2'], \ +['#7017A3', '#DEBADE'], \ +['#7017A3', '#EBDEEB'], \ +['#4519D7', '#576E57'], \ +['#5E4505', '#576E57'], \ +['#8F0C51', '#576E57'], \ +['#1C514F', '#576E57'], \ +['#4519D7', '#359735'], \ +['#4519D7', '#7DB07D'], \ +['#4519D7', '#AECCAE'], \ +['#4519D7', '#E1E3E1'], \ +['#0C4C70', '#118511'], \ +['#6E3D1E', '#118511'], \ +['#7017A3', '#118511'], \ +['#145435', '#118511'], \ +['#0C4C70', '#3A9E3A'], \ +['#0C4C70', '#0CBD0C'], \ +['#0C4C70', '#51DC51'], \ +['#0C4C70', '#D4E6D4'], \ +['#1C514F', '#2E872E'], \ +['#94111C', '#2E872E'], \ +['#4519D7', '#2E872E'], \ +['#07571E', '#2E872E'], \ +['#1C514F', '#47A147'], \ +['#1C514F', '#35C235'], \ +['#1C514F', '#17E317'], \ +['#1C514F', '#61FA61'], \ +['#145435', '#0F8A0F'], \ +['#8F0C51', '#0F8A0F'], \ +['#0C4C70', '#0F8A0F'], \ +['#5E4505', '#0F8A0F'], \ +['#145435', '#23A823'], \ +['#145435', '#2BC72B'], \ +['#145435', '#40E340'], \ +['#145435', '#91FA91'], \ +['#75C228', '#97FA97'], \ +['#C29CFD', '#97FA97'], \ +['#35C2C0', '#97FA97'], \ +['#F09C23', '#97FA97'], \ +['#C2B00C', '#F0EBF0'], \ +['#7DB0FA', '#F0EBF0'], \ +['#2BC78C', '#F0EBF0'], \ +['#F8975E', '#F0EBF0'], \ +['#F09C23', '#F3E3F3'], \ +['#0CBDF0', '#F3E3F3'], \ +['#75C228', '#F3E3F3'], \ +['#F391B3', '#F3E3F3'], \ +['#F8975E', '#F3E1F3'], \ +['#35C2C0', '#F3E1F3'], \ +['#C2B00C', '#F3E1F3'], \ +['#C29CFD', '#F3E1F3'], \ +['#F391B3', '#FDD9FD'], \ +['#2BC78C', '#FDD9FD'], \ +['#F09C23', '#FDD9FD'], \ +['#7DB0FA', '#FDD9FD'], \ +['#C29CFD', '#EBDEEB'], \ +['#75C228', '#EBDEEB'], \ +['#F8975E', '#EBDEEB'], \ +['#0CBDF0', '#EBDEEB'], \ +['#7DB0FA', '#E1E3E1'], \ +['#C2B00C', '#E1E3E1'], \ +['#F391B3', '#E1E3E1'], \ +['#35C2C0', '#E1E3E1'], \ +['#0CBDF0', '#D4E6D4'], \ +['#F09C23', '#D4E6D4'], \ +['#C29CFD', '#D4E6D4'], \ +['#2BC78C', '#D4E6D4'], \ +['#35C2C0', '#61FA61'], \ +['#F8975E', '#61FA61'], \ +['#7DB0FA', '#61FA61'], \ +['#75C228', '#61FA61'], \ +['#2BC78C', '#91FA91'], \ +['#F391B3', '#91FA91'], \ +['#0CBDF0', '#91FA91'], \ +['#C2B00C', '#91FA91'], \ +] diff --git a/sugar/canvas/IconColor.py b/sugar/canvas/IconColor.py index 042e27ad..8babea0d 100644 --- a/sugar/canvas/IconColor.py +++ b/sugar/canvas/IconColor.py @@ -2,25 +2,33 @@ import random from sugar.canvas import Colors -def is_valid(fill_color): - return Colors.table.has_key(fill_color) +def _parse_string(color_string): + if color_string == 'white': + return ['#4f4f4f', 'white'] + + splitted = color_string.split(',') + if len(splitted) == 2: + return [splitted[0], splitted[1]] + else: + return None + +def is_valid(color_string): + return (_parse_string(color_string) != None) class IconColor: - def __init__(self, fill_color=None): - if fill_color == None: - n = int(random.random() * (len(Colors.table) - 1)) - fill_color = Colors.table.keys()[n] + def __init__(self, color_string=None): + if color_string == None or not is_valid(color_string): + n = int(random.random() * (len(Colors.colors) - 1)) + [self._fill, self._stroke] = Colors.colors[n] else: - if fill_color[0] == '#': - fill_color = fill_color.upper() - else: - fill_color = fill_color.lower() - if not Colors.table.has_key(fill_color): - raise RuntimeError("Specified fill color %s is not allowed." % fill_color) - self._fill_color = fill_color + [self._fill, self._stroke] = _parse_string(color_string) def get_stroke_color(self): - return Colors.table[self._fill_color] + return self._stroke def get_fill_color(self): - return self._fill_color + return self._fill + + def to_string(self): + return '%s,%s' % (self._fill, self._stroke) + diff --git a/tools/hex-colors-to-dict b/tools/hex-colors-to-dict index 68073ab2..babb4836 100755 --- a/tools/hex-colors-to-dict +++ b/tools/hex-colors-to-dict @@ -2,16 +2,15 @@ import sys -result = 'table = {\n' -result += '\'white\' : \'black\' , \\\n' +result = 'colors = [\n' hex_file = open(sys.argv[1], 'r') for line in hex_file.readlines(): [ stroke, fill ] = line.split() - result += '\'#%s\' : \'#%s\', \\\n' % (fill, stroke) + result += '[\'#%s\', \'#%s\'], \\\n' % (fill, stroke) -result += '}' +result += ']' hex_file.close()