Imported Upstream version 3.2.2
[debian/gnuradio] / grc / gui / Colors.py
1 """
2 Copyright 2008 Free Software Foundation, Inc.
3 This file is part of GNU Radio
4
5 GNU Radio Companion is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 GNU Radio Companion is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
18 """
19
20 import pygtk
21 pygtk.require('2.0')
22 import gtk
23
24 _COLORMAP = gtk.gdk.colormap_get_system() #create all of the colors
25 def get_color(color_code): return _COLORMAP.alloc_color(color_code, True, True)
26
27 HIGHLIGHT_COLOR = get_color('#00FFFF')
28 BORDER_COLOR = get_color('black')
29 #flow graph color constants
30 FLOWGRAPH_BACKGROUND_COLOR = get_color('#FFF9FF')
31 #block color constants
32 BLOCK_ENABLED_COLOR = get_color('#F1ECFF')
33 BLOCK_DISABLED_COLOR = get_color('#CCCCCC')
34 #connection color constants
35 CONNECTION_ENABLED_COLOR = get_color('black')
36 CONNECTION_DISABLED_COLOR = get_color('#999999')
37 CONNECTION_ERROR_COLOR = get_color('red')