Create a table of color schemes. The table can be created empty and manually filled or it can be created with a list of valid color schemes AND the specification for the default active scheme.
(self, scheme_list=None, default_scheme='')
| 133 | active_colors -> actual color table of the active scheme""" |
| 134 | |
| 135 | def __init__(self, scheme_list=None, default_scheme=''): |
| 136 | """Create a table of color schemes. |
| 137 | |
| 138 | The table can be created empty and manually filled or it can be |
| 139 | created with a list of valid color schemes AND the specification for |
| 140 | the default active scheme. |
| 141 | """ |
| 142 | |
| 143 | # create object attributes to be set later |
| 144 | self.active_scheme_name = '' |
| 145 | self.active_colors = None |
| 146 | |
| 147 | if scheme_list: |
| 148 | if default_scheme == '': |
| 149 | raise ValueError('you must specify the default color scheme') |
| 150 | for scheme in scheme_list: |
| 151 | self.add_scheme(scheme) |
| 152 | self.set_active_scheme(default_scheme) |
| 153 | |
| 154 | def copy(self): |
| 155 | """Return full copy of object""" |
nothing calls this directly
no test coverage detected