@@ -452,6 +452,17 @@ void ffOptionsGenerateDisplayJsonConfig(FFOptionsDisplay* options, yyjson_mut_do
452452 yyjson_mut_obj_add_uint (doc , percent , "type" , options -> percentType );
453453 if (options -> percentNdigits != defaultOptions .percentNdigits )
454454 yyjson_mut_obj_add_uint (doc , percent , "ndigits" , options -> percentNdigits );
455+ {
456+ yyjson_mut_val * color = yyjson_mut_obj (doc );
457+ if (!ffStrbufEqual (& options -> percentColorGreen , & defaultOptions .percentColorGreen ))
458+ yyjson_mut_obj_add_strbuf (doc , color , "green" , & options -> percentColorGreen );
459+ if (!ffStrbufEqual (& options -> percentColorYellow , & defaultOptions .percentColorYellow ))
460+ yyjson_mut_obj_add_strbuf (doc , color , "yellow" , & options -> percentColorYellow );
461+ if (!ffStrbufEqual (& options -> percentColorRed , & defaultOptions .percentColorRed ))
462+ yyjson_mut_obj_add_strbuf (doc , color , "red" , & options -> percentColorRed );
463+ if (yyjson_mut_obj_size (color ) > 0 )
464+ yyjson_mut_obj_add_val (doc , percent , "color" , color );
465+ }
455466 if (yyjson_mut_obj_size (percent ) > 0 )
456467 yyjson_mut_obj_add_val (doc , obj , "percent" , percent );
457468 }
0 commit comments