Here's a JavaScript array of 6 color codes transitioning from deep yellow to deep green (#008137):
const yellowToGreenColors = [
'#FFD700', // Deep Yellow
'#DAF7A6', // Light Yellow-Green
'#ADFF2F', // Yellow-Green
'#7CFC00', // Lawn Green
'#32CD32', // Lime Green
'#008137' // Deep Green
];
And here's a full HTML preview with the colors displayed:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Yellow to Green Color Progression</title>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
font-family: Arial, sans-serif;
}
.color-block {
width: 300px;
padding: 20px;
margin: 10px;
text-align: center;
font-weight: bold;
border: 1px solid #333;
}
</style>
</head>
<body>
<h1>Color Progression from Yellow to Deep Green</h1>
<script>
const yellowToGreenColors = [
'#FFD700', // Deep Yellow
'#DAF7A6', // Light Yellow-Green
'#ADFF2F', // Yellow-Green
'#7CFC00', // Lawn Green
'#32CD32', // Lime Green
'#008137' // Deep Green
];
function displayColors() {
yellowToGreenColors.forEach((color, index) => {
const div = document.createElement('div');
div.className = 'color-block';
div.style.backgroundColor = color;
div.style.color = index < 4 ? 'black' : 'white';
div.textContent = `${index}: ${color}`;
document.body.appendChild(div);
});
}
displayColors();
</script>
</body>
</html>
This array provides a smooth, gradual transition from deep yellow to deep green, with 6 distinct color codes. The HTML preview allows you to visually see the progression of colors.