Colors should be an OS feature. On iOS and macOS you can remap colors globally and it works in all native apps. There are presets fire the common cases: red/green issues, color blindness etc and you can make your own. This has its limitations though eg if you are not able to distinguish at least 5 or so colors… any colors.
That's why you don't just use colour for identification. E.g. include a warning icon next to a button/element in addition to using a warning colour.