A sample lightning web component that handles chosing text color based upon a background color.
- Add brainJs.min.js to your Salesforce Org's static resources with the name "brain." https://unpkg.com/[email protected]/dist/brain-browser.min.js
- Deploy the component colorContrastExample to your org.
- Place the component on a page or within another exposed lightning web component.