Testing Ionic 4 - Standard color names are not recognized
See original GitHub issueBug Report / Feature Request ???
Ionic Info
Run ionic info
from a terminal/cmd prompt and paste the output below.
4.0.0-alpha.11
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.” https://github.com/ionic-team/ionic/commit/b4976dd914e47c78a743a640f1221836498c2153
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?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Testing Ionic 4 - Standard color names are not recognized ...
Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below. ; Describe the Bug Using a standard color name...
Read more >Style or Change Default App Colors - Ionic Framework
Ionic has nine default colors that can be used to change the color of many components. Learn how to utilize Ionic CSS color...
Read more >'ionic' is not recognized as an internal or external command
Type cd\ now get into the npm path folder by cd <YourNpmPath>\npm install -g ionic@4; That's it . Now it is globally available...
Read more >Beginner's Guide to Ionic Angular Unit Testing (Part 1) - Enappd
We begin explaining unit testing for Ionic apps and setting up environment using Karma Server and Jasmine.Next Spec file, TestBed, Jasmine.
Read more >Unit testing an Ionic application with the Jest testing framework
For those who may be unaware a unit test involves testing the smallest possible piece of an application's code - typically a function...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can add new colors by creating classes that define them, for example with
yellow
it would be: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:
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.