Feature: Multiple colors in themes and automatic mapping
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
It would be great to be able to pass in a single color to md-palette() and automatically generate the map, as well as using more colors for brands with >3 main colors.
What is the current behavior?
Theming is limited to three built-in colors, and you have to create your own map to customize with brand colors.
What are the steps to reproduce?
Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
What is the use-case or motivation for changing an existing behavior?
Many developers will want to customize the built-in colors, and may want to extend to more than 3 colors.
Which versions of Angular, Material, OS, browsers are affected?
All
Is there anything else we should know?
Take a look at Ionic Framework's theming, which allows you to pass in an unlimited number of colors.
I am finding it difficult to use material2, because my organization has very specific brand colors that I am trying to match.
I agree, I really need to be able to define more than 3 colors !
There's no algorithm for generating such map, the ux guys that are working on the material design spec handpicked (and i'm not kidding) each color.
if you want your own palette you can create a scss variable like this one and pass it to the md-palette mixin
Yeah I know there isn't a real algorithm, but perhaps a mock algorithm that is close to the MD spec is in order.
There's really no simple way to compute a range of colors and contrast colors from a single point in the spectrum and be sure that the result looks good. It's something a machine learning algorithm could probably handle, but not something we could handle in scss :wink:
Our current thinking is that it's not too burdensome to create a palette matching the format of our's: https://github.com/angular/material2/blob/master/src/lib/core/theming/_palette.scss
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.