code: def currentLineColor(
      self,
      countDistance,
      totalNrOfLines,
      trailFadePerc,
      minOpacity,
      color,
  ):
      if countDistance == 0:
          return color
  
      minAlphaF = minOpacity / 100.0
  
      distanceThreshold = ceil(
          (totalNrOfLines - 1) * trailFadePerc / 100.0
      )
      if countDistance > distanceThreshold:
          color.setAlphaF(minAlphaF)
  
      else:
          alphaDiff = self.mColor.alphaF() - minAlphaF
          gradient = alphaDiff / distanceThreshold + 1.0
          resultAlpha = color.alphaF() - gradient * countDistance
          resultAlpha = min(1.0, max(0.0, resultAlpha))
          color.setAlphaF(resultAlpha)
      return color
  
imports: from math import ceil
  from PyQt5.QtCore import *
  from PyQt5.QtGui import *
  from PyQt5.QtWidgets import *
label_desc: Use image node_id 8 for calling the Spinner obj's underlying member method code with example usage: obj.currentLineColor(countDistance, totalNrOfLines, trailFadePerc, minOpacity, color) and returns: color, color