Is it possible to create a custom template for different card colors?

Yes, you can assign particular card field layouts - card templates - to specific card colors.

When you switch over to a particular card type below the default template, you can remove or reorder some fields for that card type. That way, different card types will use different fields or will show a different order of fields. It’s a good way to make various job types demand different types of information. Another card type being edited

Please note, that the default template is your baseline here.
For any card type to have a specific field on it, it first needs to be enabled in the default template. From the fields selected for the default template, you can then remove some for the specific card types.

On the below images, you can see two different card templates in use on the same board at the same time. Different card templates in use on one board - Card 1 Different card templates in use on one board - Card 2