I want to use Color Tool for picking colors that will be used in App. After selecting Primary
and Secondary
colors and exporting for Android, the output includes:
<resources>
...
<color name="primaryLightColorBlue">#534bae</color>
</resources>
But when I try to use that in styles like this:
<style name="Blue" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
...
<item name="primaryLightColor">@color/primaryLightColorBlue</item>
</style>
I encounter with this error:
cannot resolve symbol "primaryLightColor"
Also I tried colorPrimaryLight
attribute as it is described here:
<item name="colorPrimaryLight">@color/primaryLightColorBlue</item>
But again I encounter an error:
Cannot resolve symbol 'colorPrimaryLight'
What is correct attribute corresponding to the primaryLightColor
?
You are trying to set/override the value
primaryLightColor
forTheme.MaterialComponents.DayNight.DarkActionBar
That Theme doesn't have that attribute, Take a look at this answer https://stackoverflow.com/a/47506269/7968986
So to answer what else you should use:
colorPrimary
for the light one andcolorPrimaryDark
for any "non-light" one