Код:
.palette-small {
display: flex;
}
.palette-box:nth-of-type(-1n+2) .palette-small {
flex-direction: column;
}
.palette-box:nth-of-type(1) .palette-small {
justify-content: center;
}
.palette-box:nth-of-type(1) .palette-small .color-3 {
order: -1;
}
.palette-box:nth-of-type(1) .palette-small .color-5 {
order: -1;
}
.palette-box:nth-of-type(1) .palette-small .color-3 {
align-self: center;
}
.palette-box:nth-of-type(1) .palette-small .color-4 {
align-self: center;
}
.palette-box:nth-of-type(2) .palette-small .color-1 {
order: -1;
align-self: flex-start;
}
.palette-box:nth-of-type(2) .palette-small .color-4 {
align-self: flex-start;
}
.palette-box:nth-of-type(2) .palette-small .color-2 {
order: 2;
align-self: flex-end;
}
.palette-box:nth-of-type(2) .palette-small .color-6 {
order: 1;
align-self: flex-end;
}
.palette-box:nth-of-type(3) .palette-small {
justify-content: space-between;
}
.palette-box:nth-of-type(3) .palette-small .part {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.palette-box:nth-of-type(4) .palette-small {
justify-content: space-between;
}
.palette-box:nth-of-type(4) .palette-small div:nth-child(1) {
display: flex;
}
.palette-box:nth-of-type(4) .palette-small div:nth-child(2) {
display: flex;
justify-content: space-between;
flex-direction: column-reverse;