# Path: ranger/gui/colorscheme.py
# class ColorScheme(object):
#     """This is the class that colorschemes must inherit from.
# 
#     it defines the get() method, which returns the color tuple
#     which fits to the given keys.
#     """
# 
#     @cached_function
#     def get(self, *keys):
#         """Returns the (fg, bg, attr) for the given keys.
# 
#         Using this function rather than use() will cache all
#         colors for faster access.
#         """
#         context = Context(keys)
#         color = self.use(context)
#         if len(color) != 3 or not all(isinstance(value, int) for value in color):
#             raise ValueError("Bad Value from colorscheme.  Need "
#                              "a tuple of (foreground_color, background_color, attribute).")
#         return color
# 
#     @cached_function
#     def get_attr(self, *keys):
#         """Returns the curses attribute for the specified keys
# 
#         Ready to use for curses.setattr()
#         """
#         fg, bg, attr = self.get(*flatten(keys))
#         return attr | color_pair(get_color(fg, bg))
# 
#     @staticmethod
#     def use(_):
#         """Use the colorscheme to determine the (fg, bg, attr) tuple.
# 
#         Override this method in your own colorscheme.
#         """
#         return (-1, -1, 0)


from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import default_colors, reverse, bold, BRIGHT

from __future__ import (absolute_import, division, print_function)



class Snow(ColorScheme):

    def use(self, context):
        fg, bg, attr = default_colors

        if context.reset:
            pass

        elif context.in_browser:
            if context.selected:
                attr = reverse
            if context.directory:
                attr |= bold
                fg += BRIGHT
            if context.line_number and not context.selected:
                attr |= bold
                fg += BRIGHT

        elif context.highlight:
            attr |= reverse

        elif context.in_titlebar and context.tab and context.good:
            attr |= reverse

        elif context.in_statusbar:

# Path: ranger/gui/colorscheme.py
# class ColorScheme(object):
#     """This is the class that colorschemes must inherit from.
# 
#     it defines the get() method, which returns the color tuple
#     which fits to the given keys.
#     """
# 
#     @cached_function
#     def get(self, *keys):
#         """Returns the (fg, bg, attr) for the given keys.
# 
#         Using this function rather than use() will cache all
#         colors for faster access.
#         """
#         context = Context(keys)
#         color = self.use(context)
#         if len(color) != 3 or not all(isinstance(value, int) for value in color):
#             raise ValueError("Bad Value from colorscheme.  Need "
#                              "a tuple of (foreground_color, background_color, attribute).")
#         return color
# 
#     @cached_function
#     def get_attr(self, *keys):
#         """Returns the curses attribute for the specified keys
# 
#         Ready to use for curses.setattr()
#         """
#         fg, bg, attr = self.get(*flatten(keys))
#         return attr | color_pair(get_color(fg, bg))
# 
#     @staticmethod
#     def use(_):
#         """Use the colorscheme to determine the (fg, bg, attr) tuple.
# 
#         Override this method in your own colorscheme.
#         """
#         return (-1, -1, 0)


# Path: ranger/colorschemes/snow.py
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import default_colors, reverse, bold, BRIGHT


from __future__ import (absolute_import, division, print_function)



class Snow(ColorScheme):

    def use(self, context):
        fg, bg, attr = default_colors

        if context.reset:
            pass

        elif context.in_browser:
            if context.selected:
                attr = reverse
            if context.directory:
                attr |= bold
                fg += BRIGHT
            if context.line_number and not context.selected:
                attr |= bold
                fg += BRIGHT

        elif context.highlight:
            attr |= reverse

        elif context.in_titlebar and context.tab and context.good:
            attr |= reverse

        elif context.in_statusbar:

            if context.loaded: