From the contributor
How to use this sample
Summary
This sample demonstrates how to dynamically add colored pills to lookup columns. If you have a lookup column with more than 10 options or a lookup column that can have additional items added, managing the pill colors can be time-consuming. This format will calculate a color, background, and border color based on the length of the lookup value and the lookupId.

View requirements
This code can be applied to any lookup column
Sample
| Solution | Author(s) |
|---|---|
| generic-dynamic-colored-pills.json | Larry Pfaff |
Version history
| Version | Date | Comments |
|---|---|---|
| 1.0 | July 17, 2024 | Initial release |
| 1.1 | September 12, 2025 | Sample Updates |
Disclaimer
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.