Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - All Colors Settings to be Inside the Workbench Color Customizations. #644

Closed
pouyakary opened this issue Aug 27, 2023 · 4 comments
Labels
depends on Depends on issues from VS Code enhancement

Comments

@pouyakary
Copy link

Hello, hope you're doing well.
Thanks for the amazing extension. I could not have wanted this more.

I have a color theme that has two variants, one for dark and one for light mode. It is so exciting that your extension lets me customize the colors, but I wished all the color settings were included in the workbench.colorCustomizations. If that were the case I could have done 2 things that could have been so cool for me.

  • The first was to specify the colors in my theme, so all my users could have the customizations matched to their themes once they had the two installed together.

  • I could have specified dark and light variants. I switch to dark light based on the sun and so if you included the settings it could have been so meaningful for me.

You already have 3 settings that are included in the workbench.colorCustomization. Can you please also move the following there?:

  • bookmarks.backgroundLineColor
  • bookmarks.gutterIconBorderColor
  • bookmarks.gutterIconFillColor

Again, this extension is such an amazing thing. I'm so happy that I found it today!
Thanks a lot !

@pouyakary pouyakary changed the title [FEATURE] - Bookmark Gutter Icon Color Settings to be Inside the Workbench Color Customizations. [FEATURE] - All Colors Settings to be Inside the Workbench Color Customizations. Aug 27, 2023
@pouyakary
Copy link
Author

To give you an example of how cool that could be, the dart-code extension provides a feature that displays a comment indicating the end of a widget, denoted as a comment. In my theme I could have colored these specially for these, in both light and dark variants:

And I wish I could have colored the bookmark for my theme for both the dark and light variants like these:

@alefragnani alefragnani added the depends on Depends on issues from VS Code label Apr 2, 2024
@alefragnani
Copy link
Owner

Hi @pouyakary ,

This is not yet possible, because there is no API available to extract the color from Themes, and I need the color in order ot create the icon on the fly. There is an issue in the VS Code repo (microsoft/vscode#32813) asking for that, but no ETA.

I'm subscibed to that issue, so any news I will be notified. In the meantime, I'm closing this issue,

Thanks for your undestanding.

@alefragnani alefragnani closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@pouyakary
Copy link
Author

I recently read the source of GitHub's Pull Request Extension on how they did it and it was really convenient: https://github.com/microsoft/vscode-pull-request-github/blob/main/package.json#L2721-L2731

You define a set of colors inside your package.json, and also give them a default value. Then a theme developer gets to define colors for that color you have defined and thus they can also support your extension on top of the normal colors the vscode has. The user as well can change the colors and even set them for different themes they have (like me for example for dark and light themes)

@alefragnani
Copy link
Owner

Yep, that's exacly how contributed colors works, and the Bookmarks extension uses it (

"id": "bookmarks.lineBackground",
) for some colors. The icon colors, on the other hand, can't use this approach, because the extension needs the hex value in runtime, and VS Code does not provide that, only a reference to a ThemeColor which is not useful to create the .svg file on the fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on Depends on issues from VS Code enhancement
Projects
None yet
Development

No branches or pull requests

2 participants