nc_color color_manager::get_invert( const nc_color col ) const { const color_id id = color_to_id( col ); auto &entry = color_array[id]; return entry.invert_custom > 0 ? entry.invert_custom : entry.invert; }
nc_color color_manager::get_highlight( const nc_color color, const hl_enum bg ) const { const color_id id = color_to_id( color ); const color_struct &st = color_array[id]; const auto &hl = st.highlight; return hl[bg]; }
std::string color_manager::get_name(const nc_color color) const { color_id id = color_to_id( color ); for ( const auto& iter : name_map ) { if ( iter.second == id ) { return iter.first; } } return "c_unset"; }
static void config_ui(void) { struct conf_sec *ui, *colors; ui = fetch_section_first(NULL, "ui"); hftirc.conf.nickcolor = fetch_opt_first(ui, "false", "nick_color_enable").boolean; /* Colors section */ colors = fetch_section_first(ui, "colors"); hftirc.conf.tcolor = color_to_id(fetch_opt_first(colors, "blue", "color_theme").str); }