simple function to colorize an element on scroll