Skip to content

Commit 0f50176

Browse files
committed
Do not color when all sigma diffs < 3
1 parent dd7439b commit 0f50176

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/powerfit_em/report.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,12 @@ def generated_table(solutions: list[dict[str, Any]]) -> str:
534534
)
535535
# Improve contrast by using white text on dark green backgrounds
536536
invert_text_color_indices = {30}
537+
coloring_threshold = 3
538+
all_solutions_below_threshold = solutions[-1]["sigma_dif"] < coloring_threshold
537539
for solution in solutions:
538540
sigma_dif = solution["sigma_dif"]
539541
style = ""
540-
if sigma_dif < 3:
542+
if sigma_dif < coloring_threshold and not all_solutions_below_threshold:
541543
gradient_index = floor(30 - 10 * sigma_dif)
542544
color = green_gradient[gradient_index]
543545
if gradient_index in invert_text_color_indices:

0 commit comments

Comments
 (0)