-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Testing Ionic 4 - Standard color names are not recognized #14857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can add new colors by creating classes that define them, for example with
You could use our color generator to auto generate some of these values here: https://beta.ionicframework.com/docs/theming/color-generator/ We have some documentation on the different layers that make up a color and why they're needed here: https://beta.ionicframework.com/docs/theming/advanced/#color-language The documentation does need to be updated to include the new way of adding a color though. Example for yellow:
|
@brandyscarney Great! Thanks for the note. I will play with this and check the docs. |
@brandyscarney How can I reference the base/contrast... colors with vars? I want to test the color presentation effects more thoroughly. |
Thanks for the issue! At this time we are not going to be adding this functionality to the See this forum post for ways to reference the added color's base/contrast: https://forum.ionicframework.com/t/ionic-4-how-to-get-color-values-from-element-styled-with-color-directive/145458 I also created an issue to document that here: ionic-team/ionic-docs#159 For future theming questions, please ask on the forum as it will help other people out, as well. Thanks! 🙂 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report / Feature Request ???
Ionic Info
Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug
Using a standard color name does not work for a component
Steps to Reproduce

Related Code
https://github.com/peterennis/ae-svg-components/blob/master/src/index.html#L34-L37
Expected Behavior
Use known names (preferred) or hex codes
Ref: https://en.wikipedia.org/wiki/Web_colors
Additional Context
This commit refers to "The color to use from your application's color palette."
b4976dd
I would like to use named colors in my component.
It may be necessary to extend Ionic theming.
Where is a good place to start?
The text was updated successfully, but these errors were encountered: