Here's a clip file for the mask if people want to play with it. It takes a little experimenting with to get used to, and I'd strongly recommend using a preview shader while tweaking the numbers in the colour adjust nodes for the final output. For the reference colour, I'd suggest using either a light or dark variant of the reference colour which will make it a bit easier to use the lightness mask.
Screengab shows how I've connected it up. Input is a convert colour to vector node. I haven't included it in the clip as it would most likely lead to unnecessary duplication of that node.
I usually build up my procedural colours from dark to light, so on this case I'm using the lightness mask to differentiate between tones, and the colour mask to control the total distribution of the parent shader.