Integrate new colors table
This commit is contained in:
parent
7abb2f7387
commit
8d27527fd9
@ -1,14 +1,14 @@
|
||||
import os
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
from sugar.canvas.IconColor import IconColor
|
||||
from sugar.canvas import IconColor
|
||||
from sugar import env
|
||||
|
||||
class _Profile:
|
||||
def __init__(self,):
|
||||
self._path = env.get_profile_path()
|
||||
self._nick_name = None
|
||||
self._color = None
|
||||
self._color = IconColor.IconColor()
|
||||
|
||||
self._ensure_dirs()
|
||||
|
||||
@ -18,10 +18,9 @@ class _Profile:
|
||||
if cp.has_option('Buddy', 'NickName'):
|
||||
self._nick_name = cp.get('Buddy', 'NickName')
|
||||
if cp.has_option('Buddy', 'Color'):
|
||||
self._color = IconColor(cp.get('Buddy', 'Color'))
|
||||
|
||||
if self._color == None:
|
||||
self.set_color(IconColor())
|
||||
fill_color = cp.get('Buddy', 'Color')
|
||||
if IconColor.is_valid(fill_color):
|
||||
self._color = IconColor.IconColor(fill_color)
|
||||
|
||||
def _ensure_dirs(self):
|
||||
try:
|
||||
|
563
sugar/canvas/Colors.py
Normal file
563
sugar/canvas/Colors.py
Normal file
@ -0,0 +1,563 @@
|
||||
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', \
|
||||
}
|
@ -1,125 +1,26 @@
|
||||
import random
|
||||
|
||||
class IconColor:
|
||||
__colors_dict = {
|
||||
'white' : 'black' , \
|
||||
'#66A531' : '#3D6E1C', \
|
||||
'#C96FF4' : '#3D6E1C', \
|
||||
'#AD9329' : '#7A5E21', \
|
||||
'#3698FD' : '#7A5E21', \
|
||||
'#EC7414' : '#AD3E19', \
|
||||
'#3DA0C6' : '#AD3E19', \
|
||||
'#F96564' : '#C3191D', \
|
||||
'#48A39B' : '#C3191D', \
|
||||
'#F85DA3' : '#BA1876', \
|
||||
'#26AA65' : '#BA1876', \
|
||||
'#C96FF4' : '#A116C8', \
|
||||
'#66A531' : '#A116C8', \
|
||||
'#3698FD' : '#4B44FB', \
|
||||
'#AD9329' : '#4B44FB', \
|
||||
'#3DA0C6' : '#276986', \
|
||||
'#EC7414' : '#276986', \
|
||||
'#48A39B' : '#366B68', \
|
||||
'#F96564' : '#366B68', \
|
||||
'#26AA65' : '#236F52', \
|
||||
'#F85DA3' : '#236F52', \
|
||||
'#77C32B' : '#318D34', \
|
||||
'#C39EFD' : '#318D34', \
|
||||
'#C2B10D' : '#9A7617', \
|
||||
'#7DB2FB' : '#9A7617', \
|
||||
'#F19D24' : '#C45F18', \
|
||||
'#0FBEF1' : '#C45F18', \
|
||||
'#F89760' : '#F71717', \
|
||||
'#36C2C0' : '#F71717', \
|
||||
'#F393B5' : '#E42D8E', \
|
||||
'#2DC78E' : '#E42D8E', \
|
||||
'#C39EFD' : '#C820FB', \
|
||||
'#77C32B' : '#C820FB', \
|
||||
'#7DB2FB' : '#576EF8', \
|
||||
'#C2B10D' : '#576EF8', \
|
||||
'#0FBEF1' : '#1485AC', \
|
||||
'#F19D24' : '#1485AC', \
|
||||
'#36C2C0' : '#2F8882', \
|
||||
'#F89760' : '#2F8882', \
|
||||
'#2DC78E' : '#108C64', \
|
||||
'#F393B5' : '#108C64', \
|
||||
'#3AE93B' : '#66A531', \
|
||||
'#DFBCFA' : '#66A531', \
|
||||
'#D3CF34' : '#AD9329', \
|
||||
'#AECCF7' : '#AD9329', \
|
||||
'#F9C216' : '#EC7414', \
|
||||
'#52DCEE' : '#EC7414', \
|
||||
'#FDBB98' : '#F96564', \
|
||||
'#18E3C4' : '#F96564', \
|
||||
'#F8B9C6' : '#F85DA3', \
|
||||
'#41E586' : '#F85DA3', \
|
||||
'#DFBCFA' : '#C96FF4', \
|
||||
'#3AE93B' : '#C96FF4', \
|
||||
'#AECCF7' : '#3698FD', \
|
||||
'#D3CF34' : '#3698FD', \
|
||||
'#52DCEE' : '#3DA0C6', \
|
||||
'#F9C216' : '#3DA0C6', \
|
||||
'#18E3C4' : '#48A39B', \
|
||||
'#FDBB98' : '#48A39B', \
|
||||
'#41E586' : '#26AA65', \
|
||||
'#F8B9C6' : '#26AA65', \
|
||||
'#3AE93B' : '#3D6E1C', \
|
||||
'#DFBCFA' : '#3D6E1C', \
|
||||
'#D3CF34' : '#7A5E21', \
|
||||
'#AECCF7' : '#7A5E21', \
|
||||
'#F9C216' : '#AD3E19', \
|
||||
'#52DCEE' : '#AD3E19', \
|
||||
'#FDBB98' : '#C3191D', \
|
||||
'#18E3C4' : '#C3191D', \
|
||||
'#F8B9C6' : '#BA1876', \
|
||||
'#41E586' : '#BA1876', \
|
||||
'#DFBCFA' : '#A116C8', \
|
||||
'#3AE93B' : '#A116C8', \
|
||||
'#AECCF7' : '#4B44FB', \
|
||||
'#D3CF34' : '#4B44FB', \
|
||||
'#52DCEE' : '#276986', \
|
||||
'#F9C216' : '#276986', \
|
||||
'#18E3C4' : '#366B68', \
|
||||
'#FDBB98' : '#366B68', \
|
||||
'#41E586' : '#236F52', \
|
||||
'#F8B9C6' : '#236F52', \
|
||||
'#98FC88' : '#318D34', \
|
||||
'#EDDFFD' : '#318D34', \
|
||||
'#F0EB10' : '#9A7617', \
|
||||
'#E2E4EF' : '#9A7617', \
|
||||
'#F3E3C9' : '#C45F18', \
|
||||
'#D5E8EF' : '#C45F18', \
|
||||
'#F3E1DE' : '#F71717', \
|
||||
'#63FCE9' : '#F71717', \
|
||||
'#FEDBEB' : '#E42D8E', \
|
||||
'#92FBB0' : '#E42D8E', \
|
||||
'#EDDFFD' : '#C820FB', \
|
||||
'#98FC88' : '#C820FB', \
|
||||
'#E2E4EF' : '#576EF8', \
|
||||
'#F0EB10' : '#576EF8', \
|
||||
'#D5E8EF' : '#1485AC', \
|
||||
'#F3E3C9' : '#1485AC', \
|
||||
'#63FCE9' : '#2F8882', \
|
||||
'#F3E1DE' : '#2F8882', \
|
||||
'#92FBB0' : '#108C64', \
|
||||
'#FEDBEB' : '#108C64', \
|
||||
}
|
||||
from sugar.canvas import Colors
|
||||
|
||||
def is_valid(fill_color):
|
||||
return Colors.table.has_key(fill_color)
|
||||
|
||||
class IconColor:
|
||||
def __init__(self, fill_color=None):
|
||||
if fill_color == None:
|
||||
n = int(random.random() * (len(self.__colors_dict) - 1))
|
||||
fill_color = self.__colors_dict.keys()[n]
|
||||
n = int(random.random() * (len(Colors.table) - 1))
|
||||
fill_color = Colors.table.keys()[n]
|
||||
else:
|
||||
if fill_color[0] == '#':
|
||||
fill_color = fill_color.upper()
|
||||
else:
|
||||
fill_color = fill_color.lower()
|
||||
if not self.__colors_dict.has_key(fill_color):
|
||||
if not Colors.table.has_key(fill_color):
|
||||
raise RuntimeError("Specified fill color %s is not allowed." % fill_color)
|
||||
self._fill_color = fill_color
|
||||
|
||||
def get_stroke_color(self):
|
||||
return self.__colors_dict[self._fill_color]
|
||||
return Colors.table[self._fill_color]
|
||||
|
||||
def get_fill_color(self):
|
||||
return self._fill_color
|
||||
|
@ -1,6 +1,7 @@
|
||||
sugardir = $(pythondir)/sugar/canvas
|
||||
sugar_PYTHON = \
|
||||
__init__.py \
|
||||
Colors.py \
|
||||
GridLayout.py \
|
||||
GridModel.py \
|
||||
GridWindow.py \
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
result = 'colors_dict = {\n'
|
||||
result = 'table = {\n'
|
||||
result += '\'white\' : \'black\' , \\\n'
|
||||
|
||||
hex_file = open(sys.argv[1], 'r')
|
||||
|
Loading…
Reference in New Issue
Block a user