From b5ce91794564a100a51fa16631946cf9bce7f201 Mon Sep 17 00:00:00 2001 From: Sherman Siu Date: Sat, 11 Oct 2025 17:35:42 -0400 Subject: [PATCH] Use new colored API --- spatialmath/baseposematrix.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spatialmath/baseposematrix.py b/spatialmath/baseposematrix.py index c798c817..b7b77695 100644 --- a/spatialmath/baseposematrix.py +++ b/spatialmath/baseposematrix.py @@ -23,7 +23,7 @@ # colored printing of matrices to the terminal # colored package has much finer control than colorama, but the latter is available by default with anaconda try: - from colored import fg, bg, attr + from colored import fore, back, style _colored = True # print('using colored output') @@ -926,12 +926,12 @@ def color(c, f): else: return f(c) - bgcol = color(self._bgcolor, bg) - trcol = color(self._transcolor, fg) + bgcol - rotcol = color(self._rotcolor, fg) + bgcol - constcol = color(self._constcolor, fg) + bgcol - indexcol = color(self._indexcolor[0], fg) + color(self._indexcolor[1], bg) - reset = attr(0) + bgcol = color(self._bgcolor, back) + trcol = color(self._transcolor, fore) + bgcol + rotcol = color(self._rotcolor, fore) + bgcol + constcol = color(self._constcolor, fore) + bgcol + indexcol = color(self._indexcolor[0], fore) + color(self._indexcolor[1], back) + reset = style(0) else: bgcol = "" trcol = ""