Here is a "manual" progress bar that you can increase by clicking a button to see how it changes color and size as it grows. Just remove the button and place with in your loop to do the same thing automatically.
Demo
HTML
<div class="progress-bar"></div>
<input type="button" id="increase" value="Increase" />
CSS
.progress-bar {
border: 1px solid black;
width: 5px;
height: 50px;
}
jQuery
$(document).on("click", "#increase", function () {
var currentWidth = $('.progress-bar').width();
currentWidth += 5;
$('.progress-bar').css('width', currentWidth + 'px');
if (currentWidth < 100) {
$('.progress-bar').css('background-color', 'red');
} else if (currentWidth < 200) {
$('.progress-bar').css('background-color', 'yellow');
} else {
$('.progress-bar').css('background-color', 'green');
}
});