在实体化中更改原色 css

Change primary color in materialize css

我正在尝试使用 kong 仪表板 (https://github.com/PGBI/kong-dashboard)。我想通过使用另一个 SCSS 文件来更改使用 GULP JS 实现的原色。我不想更改由 bower 或 npm 拉取的 _variables.scss。

有什么想法吗?

可以使用 $mdThemingProvider 在 angular 的 .config 中更改原色,这里是一个示例

$mdThemingProvider.theme("default")
        .primaryPalette('grey', {
            'default': '600', // by default use shade 400 from the pink palette for primary intentions
            'hue-1': '100', // use shade 100 for the <code>md-hue-1</code> class
            'hue-2': '600', // use shade 600 for the <code>md-hue-2</code> class
            'hue-3': 'A100' // use shade A100 for the <code>md-hue-3</code> class
        })

https://material.angularjs.org/latest/Theming/03_configuring_a_theme

你的应用程序的所有颜色都可以在那里设置

我添加了添加您自己的原色的功能。提交了拉取请求并被接受。只需在 app.scss 中设置原色即可。