To add a new color, first define the CSS variables for all of the variations of the color at the root. For example, to add a new color called favorite , we can define the following variables:
But when I try to reference it like below, nothing is changing: <ion-item color="me-contrast" lines="none">
To verify that I was able to use the variable values correctly, I tried to use <ion-item color="primary-contrast" lines="none">, and that changed color as expected.
Each color consists of the following properties: a base , contrast , shade , and tint . The base and contrast colors also require a rgb property which is the same color, just in rgb format. See The Alpha Problem for an explanation of why the rgb property is also needed.