def get(self, directive_or_id: Union[int, str]) -> Optional[ColorCollection]: final = directive_or_id if isinstance(final, str): final = get_id(_get_dir(final, "color")) return search.get(self, id=final)
def set_easing(self, directive: str) -> Object: """Set ``easing`` of ``self`` according to the directive, e.g. ``sine_in_out``.""" self.edit(easing=get_id(_get_dir(directive, "easing"), ret_enum=True)) return self
def set_id(self, directive: str) -> ColorChannel: """Set ColorID of ``self`` according to the directive, e.g. ``BG`` or ``color:bg``.""" self.edit(id=get_id(_get_dir(directive, "color"))) return self
def set_z_layer(self, directive: str) -> Object: """Set ``z_layer`` of ``self`` according to the directive, e.g. ``layer:t1`` or ``b3``.""" self.edit(z_layer=get_id(_get_dir(directive, "layer"), ret_enum=True)) return self