In my limited testing the code below should work for Edit mode
.cm-hmd-list-indent > .cm-tab:nth-child(1)::after{
border-right-color: red;
}
.cm-hmd-list-indent > .cm-tab:nth-child(2)::after{
border-right-color: yellow;
}
.cm-hmd-list-indent > .cm-tab:nth-child(3)::after{
border-right-color: blue;
}
.cm-hmd-list-indent > .cm-tab:nth-child(4)::after{
border-right-color: green;
}
This is for 4 levels, you can copy and modify the nth-child(1) in the selector to add more levels down.
For preview mode lines, this should work,
.markdown-preview-view ul ul::before{
border-left-color: red ;
}
.markdown-preview-view ul ul ul::before{
border-left-color: yellow;
}
.markdown-preview-view ul ul ul ul::before{
border-left-color: blue;
}
.markdown-preview-view ul ul ul ul ul::before{
border-left-color: green;
}
In this case, to add more levels, you’d need to add one more ul each level down in the selector.