Repository: archlinux/archinstall

Issue:
Avoid setting a black color if possible on `archinstall.log` output
On transparent terminals this causes a very ugly look.
It's most likely readable, but it doesn't look very clean or professional.

avoid setting `bg=` all together and default to the background color of the terminal.
I think the `fg` colors shouldn't be less visible in this case, we mostly use high contrast white or high contrast green/red for indicating states.

This is the crook: https://github.com/Torxed/archinstall/blob/master/archinstall/lib/output.py#L88
Avoid setting a black color if possible on `archinstall.log` output
On transparent terminals this causes a very ugly look.
It's most likely readable, but it doesn't look very clean or professional.

avoid setting `bg=` all together and default to the background color of the terminal.
I think the `fg` colors shouldn't be less visible in this case, we mostly use high contrast white or high contrast green/red for indicating states.

This is the crook: https://github.com/Torxed/archinstall/blob/master/archinstall/lib/output.py#L88


Discussion:

Resolving patch:
diff --git a/archinstall/lib/output.py b/archinstall/lib/output.py
--- a/archinstall/lib/output.py
+++ b/archinstall/lib/output.py
@@ -88,7 +88,7 @@ def log(*args, **kwargs):
 	# Attempt to colorize the output if supported
 	# Insert default colors and override with **kwargs
 	if supports_color():
-		kwargs = {'bg' : 'black', 'fg': 'white', **kwargs}
+		kwargs = {'fg': 'white', **kwargs}
 		string = stylize_output(string, **kwargs)
 
 	# If a logfile is defined in storage,
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -22,7 +22,7 @@ def get_password(prompt="Enter a password: "):
 	while (passwd := getpass.getpass(prompt)):
 		passwd_verification = getpass.getpass(prompt='And one more time for verification: ')
 		if passwd != passwd_verification:
-			log(' * Passwords did not match * ', bg='black', fg='red')
+			log(' * Passwords did not match * ', fg='red')
 			continue
 
 		if len(passwd.strip()) <= 0:
@@ -54,7 +54,7 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri
 		if not new_user and forced:
 			# TODO: make this text more generic?
 			#       It's only used to create the first sudo user when root is disabled in guided.py
-			log(' * Since root is disabled, you need to create a least one (super) user!', bg='black', fg='red')
+			log(' * Since root is disabled, you need to create a least one (super) user!', fg='red')
 			continue
 		elif not new_user and not forced:
 			raise UserError("No superuser was created.")
@@ -108,7 +108,6 @@ def ask_to_configure_network():
 					log(
 						"You need to enter a valid IP in IP-config mode.",
 						level=LOG_LEVELS.Warning,
-						bg='black',
 						fg='red'
 					)
 
diff --git a/examples/guided.py b/examples/guided.py
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -176,7 +176,6 @@ def ask_user_questions():
 			if not imported._prep_function():
 				archinstall.log(
 					' * Profile\'s preparation requirements was not fulfilled.',
-					bg='black',
 					fg='red'
 				)
 				exit(1)


Test patch: