Nest has a compatibility checker where you can put in the colors of the wires you have and then find if it will work-

https://nest.com/works/