question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Hues in html elements from defined color palette

See original GitHub issue

Feature request

  1. There should be way to use the hues defined in palette theme.
  2. Provision to add color into html element from material design swatches (similar to md-color of previous version of angular material).

What is the expected behavior?

$app-primary: mat-palette($mat-grey, 500, 50, 900); In html element, I should be able to use hues defined in my palette (above) something like color="primary mat-hue-2".

What is the current behavior?

I am able just to use color=“primary”, there is no way of using hues from defined palette/material design swatches.

What is the use-case or motivation for changing an existing behavior?

If we can get something similar of what angular material have: <p md-colors="{background: 'purple-600'}> all the material design color swatches can be used directly through “md-color” attribute.

Which versions of Angular, Material, OS, browsers are affected?

Angular: 4.0.2 Material: 2.0.0-beta.3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
willshowellcommented, May 2, 2017

@ajaysattikar in some places (possibly just progress bars - see #4088), they are used as the lighter and darker hues for components. Otherwise, you can consume those colors while theming your own components:

@import 'my-theme-partial'

$primary: map-get($theme, primary);

.light-bg {
  background-color: mat-color($primary, lighter);
}
.dark-bg {
  background-color: mat-color($primary, darker);
}
0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Hues in html elements from defined color palette #4297
I am able just to use color="primary", there is no way of using hues from defined palette/material design swatches. What is the use-case...
Read more >
Applying color to HTML elements using CSS - MDN Web Docs
Hue defines the actual color based on the position along a circular color wheel representing the colors of the visible spectrum.
Read more >
Color Hues - W3Schools
Hue is just another word for color. Simply put: Each position around the color wheel represents a different hue: #ff0000. #ff8000 ...
Read more >
Creating Color Themes With Custom Properties, HSL, and a ...
Here's an example of a simplified color palette for a specific hue: HTML; SCSS. Result; Skip Results Iframe.
Read more >
Color in HTML
Colors in HTML · a color name. · a color number, such as "#FF0000", "#FFFFFF" (those are red and white).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found