sugar-toolkit-gtk3/sugar/graphics/iconcolor.py
2007-02-07 16:55:22 +01:00

614 lines
16 KiB
Python

# Copyright (C) 2006, Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import random
_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'], \
]
def _parse_string(color_string):
if color_string == 'white':
return ['#ffffff', '#414141']
elif color_string == 'insensitive':
return ['#ffffff', '#e2e2e2']
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, color_string=None):
if color_string == None or not is_valid(color_string):
n = int(random.random() * (len(_colors) - 1))
[self._stroke, self._fill] = _colors[n]
else:
[self._stroke, self._fill] = _parse_string(color_string)
def get_stroke_color(self):
return self._stroke
def get_fill_color(self):
return self._fill
def to_string(self):
return '%s,%s' % (self._stroke, self._fill)