An accessible color palette is built and checked from the start against WCAG’s contrast ratio requirements for both text and non-text elements, and it avoids using color as the sole way to communicate information, such as marking required form fields only in red, which a person with a red-green color vision deficiency may not reliably distinguish.
Retrofitting an existing brand palette for accessibility after the fact is far more disruptive than building contrast requirements into the palette from the beginning, which is why accessible color choices are best made during initial brand and design system work rather than left for a later remediation pass.