def section_color(self, lang=None): """Return the color of the post's section.""" slug = self.section_slug(lang) if slug in self.config['POSTS_SECTION_COLORS'](lang): return self.config['POSTS_SECTION_COLORS'](lang)[slug] base = self.config['THEME_COLOR'] return utils.colorize_str_from_base_color(slug, base)
def section_color(self, lang=None): """Return the color of the post's section.""" slug = self.section_slug(lang) if slug in self.config['POSTS_SECTION_COLORS'](lang): return self.config['POSTS_SECTION_COLORS'](lang)[slug] base = self.config['THEME_COLOR'] return utils.colorize_str_from_base_color(slug, base)