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.

[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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Mar 24, 2018

@rocketraman There are no official alternatives to the theme.palette.primary[200] style. You can always use the color[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.

0reactions
mbrookescommented, Mar 14, 2019

@oliviertassinari Did you mean #13039, or did you mean to close #13039 for #10789 (this issue)?

Read more comments on GitHub >

github_iconTop 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 >

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