The middle part is the secret.
You crochet a middle part (or knit a middle part) as broad as the scarf to be.
Then from that middle part you chain freely, to the length desired (about half the length of the finished item)
If you crocheted, in every sc, you attach a new color and chain for as long as you want.
You repeat this for the other side.
(I did a variation by picking up stitches on the other side (before knitting, do this row: sc, ch3, sc in next, ch3, repeat; pick up every ch3 with knitting needle) and knitting for a bit, then switching back to crochet)
For this scarf, on one side, the chains dangle freely. On the other side, I have attached them twice, with transversal chain. I think it's visible on the pictures.