\version "2.14.2"

#(define ((my-callback . colors) grob)
   (let* ((orig (ly:grob-original grob))
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig)
                        '())))

     (define (helper colors siblings)
         (if (eq? (car siblings) grob)
             (car colors)
             (if (or (null? (cdr siblings))
                     (null? (cdr colors)))
                 '() ;; if not enough colors for pieces, revert to black
                 (helper (cdr colors) (cdr siblings)))))

    (if (pair? siblings)
        (helper colors siblings)
        (car colors))))

one = \relative c' {
 \once\override StaffGroup.SystemStartBracket #'color = #(my-callback red blue green black red)
 a1 \break
 a \break
 a \break
 a \break
 a \break
 a \break

}

two = \relative c' {
 c c c c c c
}


\new StaffGroup <<
 \new Staff \one
 \new Staff \two
 >>
