Ah, of course, John! I got them mixed up.
In that case Chris, I think your color struct might fit quite nicely into a make-s32vector. I did not test the code below, but something like it might work:
(define-foreign-type color* s32vector
(lambda (a) (assert (= 4 (s32vector-length a))) a))
(define color s32vector)
(define (rgb-to-hsl color)
(let ((return (make-s32vector 3)))
((foreign-lambda*
void ((color input) (color output))
"rgb_to_hsl((struct color*)input, &output[0], &output[1], &output[2])") color return)
return))
(rgb-to-hsl (color 0 255 0 0)) ;; <-- should in theory return a
;; 3-element s32vector with your hue,
;; sat and lum.
Note the cast from s32vector (int*) to struct color*.
Cheers,
K.