-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make it possible to generate CSS/SCSS variables out of tint and shades #38
Comments
Hey @aranoe, thanks for the detailed write-up. This seems like a more-specific version of #30, and based on the thumb-ups from that issue, it looks like there's a demand for some solution. It might be smarter to add a simple "export palette" function, one that just gives you a list of all the hex colors that appear on the screen after submitting the form, without the fine-tuned controls for variable naming and the amount of tints/shades – at least initially. That proposition is essentially an entirely new tool/form within the application, which is OK, but also adds a lot of complexity. Take a look at the simple export function at the bottom of https://materialpalettes.com and let me know if you think that solves your problem to any reasonable degree. |
I do agree with you on the complexity part, it's very specific to a certain problem (CSS/SCSS). To cover the general use case adding this export feature does make more sense.
That would defintely improve the current situation with probably not too much effort involved. On a side note: |
Hi @aranoe, so you're saying the export dialog appears editable (it shouldn't appear that way), and that you'd prefer to copy/paste portions of the JSON text and not all of it at once? I don't use JSON in my daily life so I never considered those options. All that development was done by another contributor, and it seemed OK to me when I approved. If you'd like, please make an issue on that project, or - if you're able and willing - even a PR with the changes you'd suggest. As far as this issue goes, I may close this issue in favor of #30 and continue to build off that request. Thoughts welcome. |
Yes, that's what I mean. It's fine how it is there, I just wanted to emphasize, that if you add the feature on this page you could make it even better UX-wise. |
Problem
If you want to use the generated colors as variables (CSS/SCSS) in your code base, you have to copy every single value one by one and paste it in correct place.
Solution
Make it possible to create CSS/SCSS variables from tint and shades.
Might be related to this: #30
Would especially be useful in combination with this feature: #32
How could it work?
Define the color, name for your variable and the amount of tint and shades to be generated. Hit "generate variables" button.
Example
Color:
#00a870
Name:
accent-color
Amount of tint and shades:
9
Result CSS-Variables
Result SCSS-Variables
Happy to discuss how the prefix numbers (in this case:
100-900
) should determined and how the range of colors should be calculated.The text was updated successfully, but these errors were encountered: