For anyone else trying to do the same, you can simplify the nodes a tad:
And if you need to preserve transparency: