Closed gadenbuie closed 3 years ago
Hi, I wasn't sure when modifying a template what best practices were but I've added an acknowledgment to the readme and am sorry for not doing that earlier. I'm a huge fan of your rsthemes package (Flat White has been my go-to theme the last few months) and I'd love to collaborate and find ways to contribute.
@lusignan That's great to hear and thanks for the acknowledgment!
For starters, I'd recommend checking out horizon-dark.R. It's a fairly clean example of how you can use rstheme()
to create a new theme while focusing almost entirely on the color palette. For development, comment out the lines for theme_path
and theme_as_sass
and whenever you run the function the theme will be reloaded live in RStudio. This makes iteration much easier.
Notice that the theme templates are written in SASS, so you can use SASS in rsthemes()
. For example, theme_palette
creates SASS variables for an unlimited number of colors that you can use throughout your theme — e.g. base00 = "#16161c"
can be referenced elsewhere as $base00
. You can also do things like blend colors with mix(<color1>, <color2>, <pct>%)
or make a color transparent with transparentize(<color>, 0.25)
.
When you've got everything how you want, you can uncomment theme_path
and theme_as_sass
and then PR the .R
and generated .sass
files into rsthemes. If you need help with that, just open an issue in rsthemes and I'll be happy to give advice.
Thanks again for the acknowledgement and the contribution to rsthemes!
Hi! First, I like these themes and I'm happy that my package and work has helped you customize your RStudio theme.
Considering that you built your theme using a compiled {rthemes} theme, I think it's reasonable to ask that you include a simple acknowledgement or link to rsthemes in this repo's README.
That said, I'm always open to contributions to rsthemes. I think collaboration would benefit us both. On the one hand, I've created an rstheme() function that makes it easier to focus on the color scheme and create a complete theme. On the other hand, I noticed that you've solved an issue that is currently still open for the parent theme because I haven't had time to address it.
In addition, if you were to contribute your color scheme to {rsthemes}, future improvements as I or others fix bugs or adapt to new RStudio versions will automatically make it into the themes generated from your color scheme. {rsthemes} also provides a consistent and easy mechanism for distributing and installing themes for users.
I'd be happy to help you through the process of adding a new color scheme if you choose that route. If you open an issue or PR in rsthemes, I'll work with you to help make the process smooth (you'd be the first theme contributor, so I'm sure there would be bumps here and there).
On the other hand, if you choose not to contribute your theme to rsthemes, please at least acknowledge the package. Thank you!