@@ -355,6 +355,7 @@ def _create_label_group(
355
355
font ,
356
356
scale ,
357
357
height_adjustment ,
358
+ background_color = None ,
358
359
color = 0xFFFFFF ,
359
360
width_adjustment = 2 ,
360
361
line_spacing = 0.75 ,
@@ -365,7 +366,7 @@ def _create_label_group(
365
366
font = load_font (font , text )
366
367
367
368
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 (font , text = text , line_spacing = line_spacing , background_color = background_color )
369
370
_ , _ , width , _ = create_label .bounding_box
370
371
create_label .x = (self .display .width // (width_adjustment * scale )) - width // 2
371
372
create_label .y = int (self .display .height * (height_adjustment / scale ))
@@ -447,6 +448,7 @@ def show_business_card(
447
448
name_string = None ,
448
449
name_scale = 1 ,
449
450
name_font = terminalio .FONT ,
451
+ background_color = None ,
450
452
email_string_one = None ,
451
453
email_scale_one = 1 ,
452
454
email_font_one = terminalio .FONT ,
@@ -491,6 +493,7 @@ def show_business_card(
491
493
font = name_font ,
492
494
scale = name_scale ,
493
495
height_adjustment = 0.73 ,
496
+ background_color = background_color ,
494
497
)
495
498
business_card_label_groups .append (name_group )
496
499
if email_string_one :
@@ -499,6 +502,7 @@ def show_business_card(
499
502
font = email_font_one ,
500
503
scale = email_scale_one ,
501
504
height_adjustment = 0.84 ,
505
+ background_color = background_color ,
502
506
)
503
507
business_card_label_groups .append (email_one_group )
504
508
if email_string_two :
@@ -507,6 +511,7 @@ def show_business_card(
507
511
font = email_font_two ,
508
512
scale = email_scale_two ,
509
513
height_adjustment = 0.91 ,
514
+ background_color = background_color ,
510
515
)
511
516
business_card_label_groups .append (email_two_group )
512
517
0 commit comments