Skip to content

Theming: get current theme colors  #9069

@Wykks

Description

@Wykks

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

Equivalent to https://material.angularjs.org/latest/api/service/$mdColors#mdcolors-getthemecolor-expression

What is the current behavior?

There is no proper way to get the current theme color.

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

It's needed when you cannot use css, for example in canvas, or if you control color transition from/to theme color / custom color using d3.js

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

Material 5.0.2

Is there anything else we should know?

There is a (ugly) workaround: create a theme service that add div with custom class to the dom and get the color.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions