[docs] Document and exposes colorManipulator helpers
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
In recent beta’s it looks like a lot of nice simplifications have been made to the theme palette approach. However, there is one thing which is unclear to me. In my old code, I was able to have logic like this:
theme.palette.primary[200]
The closest thing I seem to have now is to use colorManipulator.lighten
and darken
, passing in a relative value as the “coefficient” e.g.
lighten(theme.palette.primary.main, 0.25)
Is this the “right” approach to use now? If so, the docs should probably describe the best way to use these methods, and typical values of the coefficient value to achieve various shades in the source palette. For example, is it true to say that, assuming primary.main
is the equivalent of primary[500]
before, then primary[200]
would now be achieved via a coefficient of 0.4, since 200/500=0.4
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
[docs] Document and exposes colorManipulator helpers #10789
The closest thing I seem to have now is to use colorManipulator.lighten and darken , passing in a relative value as the "coefficient"...
Read more >Use document outlines, summaries, & rulers - Google Support
You can structure your Google Doc with the “document outline” feature. The outline detects and lists headings from your text to help organize...
Read more >Introduction | Google Docs
Create documentation in bulk; Generate invoices or contracts. Overview of the API. The documents resource provides methods you use to invoke the Docs...
Read more >How to use Google Docs
Google Docs is a cloud-based word processor. Word processors are tools that can help you create and revise digital documents.
Read more >Google Docs Beginner Tutorial - YouTube
Google Docs Beginner TutorialExercise Files : https://bit.ly/3vLqpItWho it's for: This course is designed for anyone who needs a free, ...
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
@rocketraman There are no official alternatives to the
theme.palette.primary[200]
style. You can always use thecolor[200]
style when using an official Material Design color.Right now, the
colorManipulator
helper functions are considered a private API, they aren’t exposed in the index nor documented. Should we make it a public API? I don’t know. Color manipulation isn’t our core mission, maybe there is better open source solution out there. But at the same time, ours are stable and haven’t changed in a long time. So why not.You can find some shared pain points with #10499.
@oliviertassinari Did you mean #13039, or did you mean to close #13039 for #10789 (this issue)?