Thanks I got a code 1 issue with the script although I got it sorted by changing the version to the newest! :)

I will have a further look on the script, now at least it is working and that's is a good beginning, Thanks!

\version "2.22.1"

#(use-modules (srfi srfi-1))

#(define (color-list? x)
   (and (list? x)
        (every color? x)))

#(define-markup-command (alternate-colors layout props colors text)
                        (color-list? string?)
   (let* ((chars (string->list text))
          (atomic-strings (map string chars)))
     (interpret-markup layout props
       (make-concat-markup
         (map make-with-color-markup
              (apply circular-list colors)
              atomic-strings)))))

\markup \alternate-colors #'("red" "blue" "green") "abcdefg"

Reply via email to