I am wondering if is there any efficient way to create a custom shape like this, where I can change the color of each segment?
The best thing you can use is Flutter Shape Maker
Fun Fact: If you know some basics how to draw, it will be fun! It can generate the custom clipper code for you!
Reference Video 1 (Basic and Old)
Been using for some production based application, and working very nicely