lt; 4) Then
            rR = Min
            rG = rR - (h - 4) * (Max - Min)
         Else
            rG = Min
            rR = (h - 4) * (Max - Min) + rG
         End If
         
      End If
            
   End If
   r = rR * 255: g = rG * 255: b = rB * 255
End Sub
Private Function Maximum(rR As Single, rG As Single, rB As Single) As Single
   If (rR &gt; rG) Then
      If (rR &gt; rB) Then
         Maximum = rR
      Else
         Maximum = rB
      End If
   Else
      If (rB &gt; rG) Then
         Ma