<div class="wrapper">
<div class="item">Primary</div>
<div class="item">On Primary</div>
<div class="item">Surface1</div>
<div class="item">Surface2</div>
<div class="item">Surface3</div>
<div class="item">Surface4</div>
<div class="item">Shadow</div>
</div>
<pre class="language-css">
<code>
:root {
--primary-hue: 250;
--primary-saturation: 100%;
--primary-lightness: 90%;
--primary-dim: hsl(
var(--primary-hue) calc(var(--primary-saturation) / 1.5)
calc(var(--primary-lightness) / 3.5)
);
--on-primary-dim: hsl(var(--primary-hue) 35% 90%);
--surface1-dim: hsl(var(--primary-hue) 40% 20%);
--surface2-dim: hsl(var(--primary-hue) 40% 25%);
--surface3-dim: hsl(var(--primary-hue) 30% 30%);
--surface4-dim: hsl(var(--primary-hue) 30% 35%);
--surface-shadow-dim: var(--primary-hue) 40% 10%;
--shadow-strength-dim: 0.25;
}
</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-dim: hsl(
var(--primary-hue) calc(var(--primary-saturation) / 1.5)
calc(var(--primary-lightness) / 3.5)
);
--on-primary-dim: hsl(var(--primary-hue) 35% 90%);
--surface1-dim: hsl(var(--primary-hue) 40% 20%);
--surface2-dim: hsl(var(--primary-hue) 40% 25%);
--surface3-dim: hsl(var(--primary-hue) 30% 30%);
--surface4-dim: hsl(var(--primary-hue) 30% 35%);
--surface-shadow-dim: var(--primary-hue) 40% 10%;
--shadow-strength-dim: 0.25;
}
.wrapper {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
.item {
width: 20vmin;
margin: 0 auto;
aspect-ratio: 1 / 1;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
color: var(--on-primary-dim);
}
.item:nth-child(1) {
background-color: var(--primary-dim);
}
.item:nth-child(2) {
background-color: var(--on-primary-dim);
color: #000;
}
.item:nth-child(3) {
background-color: var(--surface1-dim);
}
.item:nth-child(4) {
background-color: var(--surface2-dim);
}
.item:nth-child(5) {
background-color: var(--surface3-dim);
}
.item:nth-child(6) {
background-color: var(--surface4-dim);
}
.item:nth-child(7) {
background-color: hsl(var(--surface-shadow-dim) / var(--shadow-strength-dim));
}