} elseif (substr($def, 0, 3) === 'bg:') {
            if (is_numeric($color = substr($def, 3)) && $color <= 256) {
                return $this->escape("48;5;" . $color);
            } elseif (isset(static::$bgColors[$color])) {
                return $this->escape(static::$bgColors[$color]);