@@ -317,7 +317,14 @@ class TextPainter extends SchematicItemPainter {
317317 schtext . apply_at ( t . at ) ;
318318 schtext . apply_effects ( t . effects ) ;
319319
320- schtext . attributes . color = this . dim_if_needed ( this . theme . note ) ;
320+ const font_color = t . effects . font . color ;
321+ if ( font_color . is_transparent_black ) {
322+ // The color was not specified.
323+ const text_color = this . theme . note ;
324+ schtext . attributes . color = this . dim_if_needed ( text_color ) ;
325+ } else {
326+ schtext . attributes . color = this . dim_if_needed ( font_color ) ;
327+ }
321328
322329 this . gfx . state . push ( ) ;
323330 StrokeFont . default ( ) . draw (
@@ -347,22 +354,28 @@ class PropertyPainter extends SchematicItemPainter {
347354 color = this . theme . sheet_fields ;
348355 }
349356
350- switch ( p . name ) {
351- case "Reference" :
352- color = this . theme . reference ;
353- break ;
354- case "Value" :
355- color = this . theme . value ;
356- break ;
357- case "Sheet name" :
358- color = this . theme . sheet_name ;
359- break ;
360- case "Sheet file" :
361- color = this . theme . sheet_filename ;
362- break ;
363- }
357+ const font_color = p . effects . font . color ;
358+ if ( font_color . is_transparent_black ) {
359+ // The color was not specified.
360+ switch ( p . name ) {
361+ case "Reference" :
362+ color = this . theme . reference ;
363+ break ;
364+ case "Value" :
365+ color = this . theme . value ;
366+ break ;
367+ case "Sheet name" :
368+ color = this . theme . sheet_name ;
369+ break ;
370+ case "Sheet file" :
371+ color = this . theme . sheet_filename ;
372+ break ;
373+ }
364374
365- color = this . dim_if_needed ( color ) ;
375+ color = this . dim_if_needed ( color ) ;
376+ } else {
377+ color = this . dim_if_needed ( font_color ) ;
378+ }
366379
367380 const parent = p . parent as schematic_items . SchematicSymbol ;
368381 const transform = this . view_painter . current_symbol_transform ;
0 commit comments