@@ -355,6 +355,7 @@ def _create_label_group(
355355 font ,
356356 scale ,
357357 height_adjustment ,
358+ background_color = None ,
358359 color = 0xFFFFFF ,
359360 width_adjustment = 2 ,
360361 line_spacing = 0.75 ,
@@ -365,7 +366,12 @@ def _create_label_group(
365366 font = load_font (font , text )
366367
367368 create_label_group = displayio .Group (scale = scale )
368- create_label = self ._label .Label (font , text = text , line_spacing = line_spacing )
369+ create_label = self ._label .Label (
370+ font ,
371+ text = text ,
372+ line_spacing = line_spacing ,
373+ background_color = background_color ,
374+ )
369375 _ , _ , width , _ = create_label .bounding_box
370376 create_label .x = (self .display .width // (width_adjustment * scale )) - width // 2
371377 create_label .y = int (self .display .height * (height_adjustment / scale ))
@@ -447,6 +453,8 @@ def show_business_card(
447453 name_string = None ,
448454 name_scale = 1 ,
449455 name_font = terminalio .FONT ,
456+ font_color = 0xFFFFFF ,
457+ font_background_color = None ,
450458 email_string_one = None ,
451459 email_scale_one = 1 ,
452460 email_font_one = terminalio .FONT ,
@@ -489,24 +497,30 @@ def show_business_card(
489497 name_group = self ._create_label_group (
490498 text = name_string ,
491499 font = name_font ,
500+ color = font_color ,
492501 scale = name_scale ,
493502 height_adjustment = 0.73 ,
503+ background_color = font_background_color ,
494504 )
495505 business_card_label_groups .append (name_group )
496506 if email_string_one :
497507 email_one_group = self ._create_label_group (
498508 text = email_string_one ,
499509 font = email_font_one ,
510+ color = font_color ,
500511 scale = email_scale_one ,
501512 height_adjustment = 0.84 ,
513+ background_color = font_background_color ,
502514 )
503515 business_card_label_groups .append (email_one_group )
504516 if email_string_two :
505517 email_two_group = self ._create_label_group (
506518 text = email_string_two ,
507519 font = email_font_two ,
520+ color = font_color ,
508521 scale = email_scale_two ,
509522 height_adjustment = 0.91 ,
523+ background_color = font_background_color ,
510524 )
511525 business_card_label_groups .append (email_two_group )
512526
0 commit comments