# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass
# 
# Path: libxyz/ui/display.py
# def is_lowui_ge_0_9_9():
#     if hasattr(urwid, "VERSION") and urwid.VERSION >= (0, 9, 9):
#         return True
#     else:
#         return False


import copy
import re
from libxyz import const
from libxyz.exceptions import XYZValueError
from libxyz.ui.display import is_lowui_ge_0_9_9
#-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# XYZCommander 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 Public License for more details.
# You should have received a copy of the GNU Lesser Public License
# along with XYZCommander. If not, see <http://www.gnu.org/licenses/>.



class Color(object):
    """
    Base color
    """

    colors = {}
    ctype = u"base"

    def __init__(self, color):
        if not self.is_color_valid(color):

# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass
# 
# Path: libxyz/ui/display.py
# def is_lowui_ge_0_9_9():
#     if hasattr(urwid, "VERSION") and urwid.VERSION >= (0, 9, 9):
#         return True
#     else:
#         return False


# Path: libxyz/ui/colors.py
import copy
import re
from libxyz import const
from libxyz.exceptions import XYZValueError
from libxyz.ui.display import is_lowui_ge_0_9_9

#-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# XYZCommander 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 Public License for more details.
# You should have received a copy of the GNU Lesser Public License
# along with XYZCommander. If not, see <http://www.gnu.org/licenses/>.



class Color(object):
    """
    Base color
    """

    colors = {}
    ctype = u"base"

    def __init__(self, color):
        if not self.is_color_valid(color):

            raise XYZValueError(_(u"Invalid %s color: %s") % \