I have got a task to set background color for each div with slightly different color of near.
The div is generating dynamically.So how can i set the background color with this div?

For eg: I have a starting color of **`#fdecbb`**

I need a related color of the above. May be I need 10 or less.

```
var x =parseInt($('#colorNo').val());
var y = $('#colorCode').val();
for(var i =1;i<x;i++)
{
    $('#hai').append($('<div class="colorcode">'+i+'</div>')); 
} 

```

The **CSS**

```
.colorcode
{
    background-color:#86173e;
    width:100px;
    height:100px;
    margin-top:10px;
}

```

The HTML

```
<div id="hai"><input type="text" value="5" id="colorNo"/><input type="text" value="#fdecbb" id="colorCode"/></div>

```

Demo :[**Fiddle**](http://jsfiddle.net/9nYvQ/1/)