This is going to seem like a very odd question, but I have the following problem:
As you can see, when the image is a darker colour, the pagination doesn't show clearly.
I want to change the pagination colour dependant on the image colour beneath.
Is this possible with rgb/css? Alternately with Javascript?
I suggest you make a different design approach rather than using JS. Try adding a border
with light shade of grey that will work in every background. See this demo: