Expression for a progress bar if exceeds...?

Please see Wiki - how to post code on this forum.
That allows you to post the code in a readable format as shown below. This in turn reveals some strange syntax and redundant ( ) occurrences.

{[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:10}
  / {[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:11.value} 
  * 100
  if(
      (
        ({Root Container.Progress Bar.value} > 100, 
          color(255, 0, 0),
          if({Root Container.Progress Bar.value} == 100, 
            color(0, 0, 255), 
            color(0, 255, 0)
        )
      )
    )
  )
)

Can you explain your expression logic?