<div class="colors">
<div class="item">Surface1</div>
<div class="item">Surface2</div>
<div class="item">Surface3</div>
<div class="item">Surface4</div>
</div>
<pre class="language-css"><code>
:root {
--primary-hue: 250;
--primary-saturation: 100%;
--primary-lightness: 90%;
--primary-light: hsl(
var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
);
--on-primary-light: hsl(var(--primary-hue) var(--primary-saturation) 10%);
--surface1-light: hsl(var(--primary-hue) 40% 90%);
--surface2-light: hsl(var(--primary-hue) 30% 99%);
--surface3-light: hsl(var(--primary-hue) 30% 92%);
--surface4-light: hsl(var(--primary-hue) 30% 85%);
}
</code></pre>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
font-family: "Exo", Arial, sans-serif;
background-color: #557;
padding: 20px;
display: grid;
gap: 10px;
place-content: center;
}
:root {
--primary-hue: 250;
--primary-saturation: 100%;
--primary-lightness: 90%;
--primary-light: hsl(
var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
);
--on-primary-light: hsl(var(--primary-hue) var(--primary-saturation) 10%);
--surface1-light: hsl(var(--primary-hue) 40% 90%);
--surface2-light: hsl(var(--primary-hue) 30% 99%);
--surface3-light: hsl(var(--primary-hue) 30% 92%);
--surface4-light: hsl(var(--primary-hue) 30% 85%);
}
.colors {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
.item {
width: 25vmin;
margin: 0 auto;
aspect-ratio: 1 / 1;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--primary-light);
color: var(--on-primary-light);
}
.item:nth-child(1) {
background-color: var(--surface1-light);
}
.item:nth-child(2) {
background-color: var(--surface2-light);
}
.item:nth-child(3) {
background-color: var(--surface3-light);
}
.item:nth-child(4) {
background-color: var(--surface4-light);
}