@@ -550,7 +550,7 @@ protected function supportsColors(): bool
 
     protected function dumpLine(int $depth, bool $endOfValue = false): void
     {
-        if ($this->colors) {
+        if ($this->colors ??= $this->supportsColors()) {
             $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line);
         }
         parent::dumpLine($depth);