(define (script-fu-colorize-all-layers image drawable hue saturation lightness)
    
	(gimp-image-undo-group-start image)
	
	(map (lambda (x) (gimp-colorize x hue saturation lightness)) (vector->list (cadr (gimp-image-get-layers image))))	
	
	(gimp-displays-flush)
	(gimp-image-undo-group-end image)		
 
)

(script-fu-register "script-fu-colorize-all-layers"        		    
  "Colorize-all-layers"
  "Instructions"
  "Graechan"
  "Graechan - http://gimpchat.com"
  "2012"
  "RGB*"
  SF-IMAGE      "image"      0
  SF-DRAWABLE   "drawable"   0
  SF-ADJUSTMENT _"Hue" '(180 0 356 1 10 0 0)
  SF-ADJUSTMENT _"Saturation" '(50 0 100 1 10 0 0)
  SF-ADJUSTMENT _"Lightness" '(0 -100 100 1 10 0 0)
)

(script-fu-menu-register "script-fu-colorize-all-layers" "<Image>/Temp/")	