I already implement the solution without using the color property, is this the correct way of doing it, and is there another more efficient solution that existed?
Your solution is correct. Actually any of the four special keywords will work in this example (“unset”, “initial”, “inherit” or “revert”). I recently explained why to another user if you want to have a look: