Review of "Color Picker" version 2

Details Page Preview

Simple color picker for GNOME Shell For support, please report any issues via the homepage link below.

Extension Homepage
https://github.com/tuberry/color-picker

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

grroot posted a review
Hello, Andy Holmes. Would you please help me if you have the time? I have some trouble with the 'PickColor' api (https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/screenshot.js#L263) of gnome shell. The `invocation.return_value()` is confusing, I mean I have no idea how to get that returned value. ``` const Screenshot = imports.ui.main.shellDBusService._screenshotService; Screenshot.PickColorAsync(); // I am not sure did I invoke it correctly, and the preview cursor didn't appear when clicking (https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/screenshot.js#L548) ``` Many thanks for your help all the time.
andyholmes active
That class that you're linking to is actually a service GNOME Shell exports on DBus for external programs to use. It seems to be a wrapper around the C library class `Shell.Screenshot`. The documentation for that is in our GJS docs (at https://gjs-docs.gnome.org/shell01/shell.screenshot). I think you want to try using that API directly, although you can probably look at how GNOME Shell uses that class for guidance. It looks like what you need to do is create a `Shell.Screenshot` object, take a screenshot, then pick a color out of that screenshot at a particular (x,y) coordinate. Hope that helps I've never really used that API before :)