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 Request: Add way of getting all the color presentations in a specific range of a document in the vscode API #144036

Open
Markos-Th09 opened this issue Feb 27, 2022 · 6 comments
Assignees
Labels
api editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality
Milestone

Comments

@Markos-Th09
Copy link

Markos-Th09 commented Feb 27, 2022

I would be really nice if it was possible to do such a thing because it is really easy to conflict with the bulitin color picker and ColorPresenations from other extension leading in a result like this
Example of duplicate color pickers
To avoid something like this there could be a way in the vscode api to get all the ColorPresentations in a specific range in a document and then conditionally display the one from the extension. I can't seem to find any way to do it with the current functions provided by the api

@sandy081 sandy081 assigned aeschli and unassigned sandy081 Feb 28, 2022
@aeschli aeschli assigned rebornix and unassigned aeschli Feb 28, 2022
@rebornix rebornix added editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality labels Mar 3, 2022
@kikyous
Copy link

kikyous commented Aug 25, 2022

I want this, currently I use regex to find all color in a range for my extension.
https://github.com/kikyous/vscode-css-action

@Markos-Th09
Copy link
Author

any work on this? it has been a while since I opened the issue

@sangnguyen696969
Copy link

Yes

@rebornix rebornix removed their assignment Dec 14, 2022
@jeronimoek
Copy link

jeronimoek commented Feb 18, 2023

Hi! Is there any workaround for this?
I thought of a few options, but without any success.

  1. Disable the Vscode default color provider. (Issue #34341)
    Problem: This also disables any extension color provider

  2. Ignore colors processed by the Vscode default color provider (inside provideDocumentColors)
    Problem: I didn't find any way to get such info

  3. (Partial solution) At least provide extra presentations to the colors already detected by the Vscode default color provider (using only provideColorPresentations)
    Problem: This doesn't seem to work

@Markos-Th09
Copy link
Author

Markos-Th09 commented Feb 18, 2023

unfortunately this issue seems to be abandoned or way back on the backlog and I haven’t found any workaround since then

@Markos-Th09 Markos-Th09 changed the title Feature Request: Add way way of getting all the color presentations in a specific range of a document in the vscode API Feature Request: Add way of getting all the color presentations in a specific range of a document in the vscode API Mar 2, 2023
@aiday-mar aiday-mar self-assigned this Mar 3, 2023
@LatenPath
Copy link

Its will be done if we can turn-off VSCode built-in color provider without affect others extensions :(

@aiday-mar aiday-mar added the api label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

10 participants