Giter Club home page Giter Club logo

eyedropper's Introduction

Part of GNOME Circle maintenance-status

Eyedropper

Eyedropper

Pick and format colors.

Main Page

More screenshots

Status page

Customize the shown formats (Dark UI)

Customize the shown formats (Light UI)

Generate Color Palettes

Features

  • Pick a Color
  • Enter a color in Hex-Format
  • Parse RGB/RGBA/ARGB Hex-Colors
  • View colors in formats
  • Customize which formats appear as well as their order
  • Generate a palette of different shades

Available formats

  • Name (includes W3C color sets, GNOME Palette and xkcd color survey)
  • Hex
  • RGB
  • HSL
  • HSV
  • CMYK
  • XYZ
  • CIELAB
  • HWB
  • CIELCh/HCL
  • LMS
  • Hunter Lab

When should I use this? And when not?

This application is geared towards advanced users (developers, designers, etc…), who not only need to pick a color but also modify or view it in different formats. For simply picking a color on Gnome, the color-picker extension is far better suited.

Installation

Flatpak

Download on Flathub

Nightly Flatpak

⚠️ The nightly flatpak may contain bugs or unexpected behaviour.

Download the latest artifact from the CI.

Contributing

Contributors are expected to follow the GNOME Code of Conduct.

Any contributions you make are greatly appreciated. For major changes, please open an issue first to discuss what you would like to change.

To contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Translation

Translations are a great way to contribute. This project uses the GNU gettext for translations. If you want to learn more, visit the translator section.

You can either contribute translations using Weblate, or manually using programs like Poedit or Gtranslator.

After finishing the translations, add the translated language code into the LINGUAS file. Then follow the above steps to create a pull request. Please also state in the description if you are willing to maintain the translation.

Building

See this general guide for building the project using GNOME Builder.

Alternatively use this VS Code Extension for working inside VS Code.

Credits

A huge thanks to these projects who served either as an inspiration or as code examples on how to use gtk-rs.

eyedropper's People

Contributors

alexmelman88 avatar bertob avatar brandleesee avatar ciro-mota avatar clonewith avatar daudix avatar finefindus avatar fkinoshita avatar flipflop97 avatar github-actions[bot] avatar gregorni avatar ingrownmink4 avatar kbdharun avatar kianmeng avatar lumingzh avatar milotype avatar monsterobserver avatar phaerrax avatar pisekpiskovec avatar rene-coty avatar renner0e avatar shayan418 avatar swyknox avatar tuba2 avatar weblate avatar yakushabb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eyedropper's Issues

Removed duplicates from history

Imagine you select a sequence of colours. And by accident or without knowledge you pick a colour twice or thrice, which easily happens when colours are very similar.

To illustrate the problem with duplicates in the history:

Bildschirmfoto vom 2022-12-26 20-22-47

The green and red in the history are listed twice, but are the exact same values.

I think that only keeping the most recent occurrence of the colour in the history would be a good idea. But I am not 100% sure. Some people might use the order of the history to remember the context where they took the colour.

Maybe some other users of the software could chime in.

Blender Color Copy/Paste Support

Is your feature request related to a problem? Please describe.
I'm trying to integrate Eyedropper into my workflow with Blender by directly pasting colors to Blender (i.e. hovering the cursor over a cursor and pressing ctrl+v), but I get the following error: Paste expected 4 numbers, formatted: '[n, n, n, n]'

Describe the solution you'd like
Blender except the following color format: [r, g, b, a] where the components are normalized (0.0 <= r, g, b, a <= 1.0) and the color space is Linear RGB, for example 50% gray is [0.214041, 0.214041, 0.214041, 1.000000]. I think the easiest way to allow for this would be to add a Linear RGB color format, preferably with [r, g, b, a] as the default to be compatible with blender out of the box.

Describe alternatives you've considered
You can copy as hex, open the color picker, select the hex tab and paste it there. Also a recent new version of Blender let you pick colors from the screen directly with the color picker tool, but it's only available on windows currently.

Information

  • OS: Archlinux
  • Desktop Environment: Hyprland
  • GTK-Theme/Adwaita-Style: N/A
  • Version: 1.0.0 (Flatpak)

UI: CIE illuminants dropdown does not fit it's content

Hi, the new CIE illuminants list does not fit it's content properly. It's not showing longer strings.

To Reproduce
Steps to reproduce the behavior:

  1. Open Eyedropper.
  2. Go to Preferences
  3. Try to select something from "CIE standard observer"

Screenshots
eaeae
(Icons not important)

Information

  • OS: Ubuntu 22.04.1
  • Desktop Environment: Gnome 42
  • Icon Theme: Breeze theme from KDE desktop
  • GTK-Theme/Adwaita-Style: Adwaita
  • Eyedropper Version: From master branch (commit: ec993e1)

The line of strings: https://github.com/FineFindus/eyedropper/blob/master/data/resources/ui/preferences.ui#L50-L69

[AUR] "Failed to Pick a Color"

Similar to #6 and #16, but

  1. I've installed from AUR (eyedropper package)
  2. Happens on a DE (Cinnamon)

OS: EndeavourOS Linux x86_64
DE: Cinnamon
Version: eyedropper 0.6.0-1

1

Not sure if this should be reported here, since its an unofficial package. Please feel free to close it.

Crash after picking a color

Describe the bug
The application crashes after picking a color

To Reproduce
Steps to reproduce the behavior:

  1. Pick a color

Screenshots
If applicable, add screenshots to help explain your problem.

Eyedropper.mp4

Information

  • OS: Fedora 39
  • Desktop Environment: GNOME 45
  • GTK-Theme/Adwaita-Style: Adwaita
  • Version: git master
Debugging Information

The dialog isn't accessible without picking a color :p

Portuguese translation not working on Ubuntu 23.04

Although there's a Portuguese translation on the LINGUAS file and my system is in Brazilian Portuguese. The app itself is in English, and Gnome Software says there isn't a translation for my language.

I was available to translate the app for my language, but then I saw there's already one. Maybe the issue is happening because the LINGUAS file has a translation to Portuguese, not to Brazilian Portuguese. Or maybe there's a problem in the Flatpak integration with Ubuntu 23.04. I really don't know.

Screenshots
image
image

Information

  • OS: Ubuntu 23.04
  • Desktop Environment: Gnome 44.2
  • Version: 0.6.0

Distribute as AppImage

Is your feature request related to a problem? Please describe.

Currently I am using the AUR package and upgrading takes forever due to the compilation step. It also requires rust and ninja to be installed locally, which I otherwise not need and they take up a lot of space.

Describe the solution you'd like
It would be great if eyedropper would be offered as AppImage install, since that is much more consumer friendly.

Describe alternatives you've considered
Stick to AUR

Information

  • OS: Manjaro Linux
  • Desktop Environment: Gnome 42
  • GTK-Theme/Adwaita-Style: Adwaita
  • Version: [e.g. 0.1.0] 0.1.0

Show color screen by default, skipping placeholder view

Is your feature request related to a problem? Please describe.
Landing at this view on program startup is quire annoying since I find very useful introducing color codes for the palettes generation features provided by eyedropper
image

Describe the solution you'd like
An improved UX could be achieved by making the below view the default one
image

Describe alternatives you've considered
Provide a CLI flag for "jumping" directly to said preferred view on program startup

Additional context
Nothing to add.

Information

  • OS: Debian 12
  • Desktop Environment: KDE
  • GTK-Theme/Adwaita-Style: Adwaita
  • Version: 1.0.0 (Flatpak)

Flatpak version does not start on Pop-Os based on Ubuntu 22.04

I am using Pop-Os based on Ubuntu 22.04. I installed the Flatpak version, but the application does not start. When I run

flatpak run com.github.finefindus.eyedropper

I get the following error

(eyedropper:2): Gdk-WARNING **: 10:14:02.791: The program 'eyedropper' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 515 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I tried installing both using the software center of Pop-Os, which uses Flatpak for third-party applications and also via the command line

flatpak install eyedropper

I am using X window system.

Thanks in advance.

Color picker opening is too abrupt

Describe the bug
When going through various windows of the app, it's smooth most of the time, in the sense that opening windows animate, they don't just appear out of nowhere. This is not the case with the color picker window (the one that appears after clicking "+"). You can see that in the Screenshots section (although it is a WEBM).

To Reproduce
See the WEBM

Expected behavior
I'd expect the window picker opening to be animated just like all the other windows.

Screenshots

Kooha-2022-09-24-09-21-18.webm

You can see the difference between the first window popping up and the second one. The first one is animated, the second one is not.

Information

  • OS: [Fedora 36
  • Desktop Environment: Gnome 42
  • GTK-Theme/Adwaita-Style: default
  • Version: 0.3.1 (flathub)

Gnome 43 Runtime is End of Life

Describe the bug
Eyedropper uses the Gnome 43 flatpak runtime, which is now EOL.

Info: runtime org.gnome.Platform branch 43 is end-of-life, with reason:
   The GNOME 43 runtime is no longer supported as of September 20, 2023. Please ask your application developer to migrate to a supported platform.
Info: applications using this runtime:
   com.github.finefindus.eyedropper

It's very difficult to use the palettes generated by eyedropper

Is your feature request related to a problem? Please describe.
When I click on any of the generated colors, the picked color gets changed to the one at the end of the corresponding row.

For example, clicking on any of the analogous colors on the below example, changes the picked color to the generated maroon
image
image

Describe the solution you'd like
I'd like to be able to click on any of the colors and its hex code be copied to my clipboard.

Describe alternatives you've considered
The hex color could be shown inside a tooltip on mouse hover, a new eyedropper window could be opened with the selected color being set as the picker color. Anything that could make such a wonderful and useful feature (the palettes generation) actually usable.

Additional context
Nothing to add.

Information

  • OS: Debian 12
  • Desktop Environment: KDE
  • GTK-Theme/Adwaita-Style: Adwaita
  • Version: 1.0.0 (Flatpak)

Also list latest color on the right side?

I repeatedly got confused by the latest color not being listed on the right side.

Would be fine for me to hide the list on the right until there are two colors.

But removing the current color especially got confusing when selecting it from the list and then it disappears. That's usually not how lists of things work in GNOME.

@bertob you have an opinion?

bug: Border to the right

BTW: The template titles are swapped.

Screenshot from 2023-02-21 01-23-08

Hard to see with a white background but there is a border to the right. Probably from the hidden color list.

Feature: Launch hidden with global shortcut

I'm a designer and developer and as far as I know, there is really no eyedropper on the market that does this:

Launch hidden on startup > Ability to pick a color with a shortcut (only picker, no app GUI) > automatically copy to clipboard (with the pre-defined format I would set).

Think of it... This is the fastest, cleanest, and smoothest workflow anyone user can imagine. Actually, I didn't bother to tell developers this before but when I saw this tool, I thought it was almost the complete one I've ever seen. And hope you agree and make it possible.

Big thanks for your great work!

Not Working on SwayWM

Describe the bug
On Sway i get the notification "Failed to select a color" when trying to pick a color.

To Reproduce
Steps to reproduce the behavior:

  1. Click on "Pick a color"
  2. Click anywhere on the screen

Expected behavior
The color to be selected

Additional context
OS: Arch Linux x86_64
Kernel: 6.6.8-arch1-1
WM: sway
version: 1.0.0

Not sure if related but I am using the wlr screencast portal.

Magnifying glass effect on cursor

Would be really useful if the cursor had a zoomed preview of the area where you want to pick the color, like Firefox eyedropper.

This is how look Firefox eyedropper:
imagen

Information

  • OS: Fedora Workstation 38
  • Desktop Environment: Gnome 44
  • GTK-Theme/Adwaita-Style: Adwaita
  • Version: 0.6.0

Adobe Color style image-to-color picking utility

Describe the solution you'd like
It would be extremely useful to have the ability to extract, automatically or manually, a color palette from an image.

Upon launching eyedropper, the user might be able to which allowed the user to either paste in their image or otherwise select it in some way. Upon choosing an image, the user would be prompted with some selection tools and the corresponding palette below.

Would you be on board with having this sort of functionality within the app? I was thinking about trying to implement it. Let me know.

Additional context

Adobe Color
image
image

[Feature Request] Use AdwAboutWindow

Is your feature request related to a problem? Please describe.
Nope.

Describe the solution you'd like
Since this application uses libadwaita, imo it can use adwaboutwindow for more consistency.

Describe alternatives you've considered
Of course, not change it.

Additional context
Nope.

Information
Isn't related.

Add complete translation support

I would like to start translating the app (in French), but currently the translation support is not very comprehensive. There is a po folder but as long as there is no .pot file inside, translators will not be able to translate all the UI (e.g.: for now I can't translate the strings of the Preference window, nor the metainfo / app description etc.)...

Feat: pin colors/save history

Thank you for this application, it has become my default color selection application, there is a functionality which is to have a palette of previously saved colors, there are several ways to achieve this, one is to save the colors after opening the application, but I would like more to be able to pin to the colors I want to keep.

Add labels to history buttons

If you are taking a many colours that are similar but different, it might be hard to (re)find the correct colour within the history.

Adding labels (#hex representation) would help "power" users to refind a colour from history with fewer clicks.

Bildschirmfoto vom 2022-12-26 20-25-46

Because this feature would only help power users and increase the size of the history (in the GUI) quite a lot, it would be best to make this optional. Or enable it automatically, if the app detects that colours are too close to each other.

The picker cursor seems to have the wrong offsets

Describe the bug

The mouse cursor changes to the color picker icon after clicking the "Pick a Color" button.

I expect the color selection to match the exact location of the icon, i.e. the lower left corner. But actually, it will select the color in the upper left corner.

To Reproduce

I created a picture containing four colors in different areas.

color_test

Steps to reproduce the behavior:

  1. Click the "Pick a Color" button.
  2. Move the cursor to the center.
  3. Left-click the mouse and the red color will be selected.

Expected behavior

The blue color should be selected.

Screenshots

Before picking the color

screenshot1

After picking the color (notice that the mouse cursor actually points to the red area)

screenshot2

Information

  • OS: Kali Linux 2023.4
  • Desktop Environment: GNOME 45.0, X11
  • GTK-Theme/Adwaita-Style: Adwaita, default
  • Version: master branch(b75e8a2)
Debugging Information
Eyedropper: 1.0.0-b75e8a2
Profile: Devel
Backend: X11
OS:
 - Name: "GNOME"
 - Version: "Nightly (Flatpak runtime)"
Libraries:
 - GTK: 4.13.3
 - Libadwaita: 1.5.0

Sandbox: Flatpak Info:
 - Name: com.github.finefindus.eyedropper.Devel
 - Runtime: runtime/org.gnome.Sdk/x86_64/master
 - Runtime commit: 99e70916dd03193cb9e043b5e9ca7363229a5c4d29106f2a58acceadecb66fcb
 - Arch: x86_64
 - Flatpak Version: 1.14.4
 - Devel: true


Portal error: None

Colors scroll into nothingness

The bug
When you have selected enough colors for the list to the right to be scrollable, and you scroll down, the color previews disappear into nothingness.

To Reproduce

  1. Pick many colors, or hold down Ctrl+R
  2. Scroll down the color preview list
  3. See error

Expected behavior
There should be a separator like when you scroll down in the About page.

Screenshots
Skärmbild från 2023-06-14 11-32-44
Skärmbild från 2023-06-14 11-32-52

Differentiate entry from output

I find it very unsatisfactory that one line is an entry but the others are not. It feels so bad when clicking on them xD

@bertob you maybe have an idea for a tiny tiny bit of differentiation between the two types of rows?

ERROR eyedropper::window > Portal request didn't succeed: Other

Describe the bug
Failed to pick the color under Sway

To Reproduce
Steps to reproduce the behavior:
Try to pick any color under sway

Expected behavior
To get the color info

Information

OS: Arch Linux x86_64
Kernel: 5.15.80-1-lts
WM: sway
version: 0.4.0

Debugging Information
Eyedropper: 0.4.0
Profile: 
Backend: Wayland
Sandboxed: true

OS:
 - Name: "GNOME"
 - Version: "43 (Flatpak runtime)"
 - GTK_THEME: "Unset"
 - Theme: "Default"
 - IconTheme: "Adwaita"

Flatpak:
 - Name: com.github.finefindus.eyedropper
 - Runtime: runtime/org.gnome.Platform/x86_64/43
 - Runtime commit: 750f3ba756dae491001b55fb71617759b2e5de65de45a39c10532407faac0a11
 - Arch: x86_64
 - Flatpak Version: 1.15.1

Libraries:
 - GTK: 4.8.2
 - Libadwaita: 1.2.0


"Failed to pick a color"

When clicking on the eyedropper or pressing ctrl + p:
"Failed to pick a color" appears at the bottom of the window.

In the terminal:
ERROR eyedropper::window > Portal request didn't succeed: Other

This happens with flatpak and if built with gnome builder.

Only happens on window managers. Works fine on gnome.

  • Fedora 36
  • DWM, Hyprland

Set strings which shouldn't be translate as "read only" in Hosted Weblate

Is your feature request related to a problem? Please describe.
There are several source strings which don't need to be translated. For intsance:

#: data/com.github.finefindus.eyedropper.metainfo.xml.in.in:9 msgid "FineFindus" msgstr "FineFindus"
#: data/resources/ui/palette-window.blp:37 msgctxt "Palette format file name" msgid "PAL" msgstr "PAL"
#: data/resources/ui/preferences/preferences.blp:104 msgid "2°" msgstr "2°"
#: data/resources/ui/preferences/preferences.blp:105 msgid "10°" msgstr "10°"
#: src/widgets/preferences/preferences_window.rs:393 msgid "RGB" msgstr "RBG"
#: src/widgets/preferences/preferences_window.rs:394 msgid "HSL" msgstr "HSL"
#: src/widgets/preferences/preferences_window.rs:395 msgid "HSV" msgstr "HSV"
#: src/widgets/preferences/preferences_window.rs:396 msgid "CMYK" msgstr "CMYK"
#: src/widgets/preferences/preferences_window.rs:397 msgid "XYZ" msgstr "XYZ"
#: src/widgets/preferences/preferences_window.rs:398 msgid "CIELAB" msgstr "CIELAB"
#: src/widgets/preferences/preferences_window.rs:399 msgid "HWB" msgstr "HWB"
#: src/widgets/preferences/preferences_window.rs:400 msgid "CIELCh / HCL" msgstr "CIELCh / HCL"
#: src/widgets/preferences/preferences_window.rs:409 msgid "LMS" msgstr "LMS"
#: src/widgets/preferences/preferences_window.rs:411 msgid "Hunter Lab" msgstr "Hunter Lab"
#: src/widgets/preferences/preferences_window.rs:413 msgid "Oklab" msgstr "Oklab"
#: src/widgets/preferences/preferences_window.rs:414 msgid "Oklch" msgstr "Oklch"

Describe the solution you'd like
Set all strings which shouldn't be translate as read-only in Hosted Weblate! It radically reduces the number of strings which don't need to be translated.

"Failed to pick a color" on Mint 21.1 Cinnamon

Describe the bug
I installed Eyedropper on Mint 21.1 Cinnamon. It has a single button, Pick a Color. When I click it, I get the prompt "Failed to pick a color". See the screenshot below.

To Reproduce
Steps to reproduce the behavior:

  1. Install Eyedropper flatpak on Mint 21.1 Cinnamon using Mint's Software Manager.
  2. Start Eyedropper and click Pick a Color.
  3. The "Failed to pick a color" prompt occurs.

Expected behavior
I expected that the cursor would then let me pick a color.

Screenshots
Eyedropper

Information

  • OS: Mint 21.1
  • Desktop Environment: Cinnamon

As you can see above, there are no buttons except Pick a Color visible when I start Eyedropper. But as you suggested I can click Ctrl-R and get a random color. At that point, the hamburger menu becomes available. I clicked About Eyedropper ⇒ Troubleshooting ⇒ Debugging Information as requested and the dump is below. If I click the eyedropper icon after getting a random color, the same "Failed to pick a color" error occurs.

Debugging Information
Eyedropper: 0.6.0
Profile: 
Backend: X11
Sandboxed: true

OS:
 - Name: "GNOME"
 - Version: "43 (Flatpak runtime)"
 - GTK_THEME: "Unset"
 - Theme: "Default"
 - IconTheme: "Adwaita"

Flatpak:
 - Name: com.github.finefindus.eyedropper
 - Runtime: runtime/org.gnome.Platform/x86_64/43
 - Runtime commit: fc22585d44fa58c1bc99e1eb203c156c1a2aec27cfe795e62f5c72588ff91bec
 - Arch: x86_64
 - Flatpak Version: 1.12.7

Libraries:
 - GTK: 4.8.3
 - Libadwaita: 1.2.4

Portal error: Some(Portal(ZBus(MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.DBus.Error.UnknownMethod")))), Some("No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.86"))), reply-serial: 5, body: Signature("s") }))))

Additional context
Add any other context about the problem here.

Color history: Glitchy active state

The active state border on the color dots on the right has uneven padding, I'd try 2px all around. It should also have a border radius matching the color dot itself. Side note: Maybe the color dots would look nicer if they were circles? 🤔

Screenshot from 2023-10-02 19-51-51

Eyedropper 1.0.0 from Flathub, Fedora 39 Beta (Silverblue)

Feature Request: History

A history (automatic list with recently picket colours) is very important for users that need to pick several colours in sequence, e.g. to double-check if designs are in accordance with the colour palette of a project/company. Is such a feature planned? The Microsoft app that is listed as inspiration has such a feature.

To improve on the Microsoft design: I suggest that not only a list of coloured shapes is displayed, but additionally the colour is displayed in hex representation on top of it or next to it.

Flatpark or AUR version "Failed to pick a color" error when try to pick a color

Describe the bug
Application starts but when trying to select a color it shows an error.

To Reproduce
Steps to reproduce the behavior:

  1. Start the app
  2. Click the "Pick a color" button
  3. See error "Failed to pick a color".

Expected behavior
Click the "Pick a color" button and select a color.

Screenshots
Screenshot from 2023-06-27 13-34-38

Information

  • OS: Arcolinux
  • Desktop Environment: Gnome 44.2
  • GTK-Theme/Adwaita-Style: Adwaita, Dark
  • Version: 0.6.0

Additional context
Add any other context about the problem here.

Example: Start app from terminal

flatpak run com.github.finefindus.eyedropper
ERROR eyedropper::window > Portal request failed: org.freedesktop.zbus.Error: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop`

App installed from Flathub

Automatically copy top color format to clipboard

When I pick a color on my screen, I would like for the top color format to automatically be copied to my clipboard, so that I can quickly paste it into another application.

ie: In this example #083A5C would automatically be copied to my clipboard.

image

Rewrite color system

The Problem

The current way the color system works has a number of drawbacks:

  • Values are stored internally RGB as 3 u8, so conversion to and from a color is not lossless.
  • Setting up the color series requires a lot of boilerplate code
  • The parser and formatter for each color format are stored in different files, it would be better if they lived in the same place as the format itself.

Solutions

Switch to the palette crate

The crate provides an excellent color system that allows easy conversion between different formats. It also allows us to extend the system with our own types, which is necessary since it does not support everything, e.g. LMS is missing.

The problem with this approach is that gtk-rs does not allow generic types, and using something like RefCell<Box<dyn IntoColor>> (the recommended workaround) will not work because the IntoColor trait is not object safe.
A possible workaround might be to use an enum as a wrapper around the different color formats.

#[derive(Debug, Clone, Copy)]
pub enum ColorVariant {
    RGB(palette::Srgba),
    HSL(palette::Hsla),
    ...
}

This still requires quite a bit of boilerplate to convert the inner type.

TODO

  • Look at other possible solutions

Translation issues

Describe the bug

  1. In the section Translation in the README.md file on the project page at Github you state that one could use Weblate for translations. Unfortunately, the project is currently locked and translators can only suggest translations.

  2. I've looked through other langages and found out that they don't have the same number of translatable strings as defined in the current Eyedropper.pot file.
    For my Croatian translation I've used the current .pot file on your GitHub project page with the following information in the header: POT-Creation-Date: 2023-11-14 19:29+0000\n. The file has 146 translatable strings.

Some suggestions which might help improve the two above issues (btw. I'm not a programmer):

  • Update all existing .po files on GitHub with the current .pot file so they all have the same number of translatable strings. (Take a look at my section "SOULTION" below.)
  • Upload all those changed files to your project page at Weblate. (IMO, chances are way better that your project gets translated into even more languages at Weblate then through GitHub.)
  • Unlock the project on Weblate in order to enable translating.

SOLUTION:
If you want, I could:
a) update the .po files for currently existing languages with the current .pot file and keep all unused/old/orphaned strings (de, es, eu, fr, it, nl, ru). IMO useless because those strings are obsolete and keep the files larger then necessary.
b) update the .po files for currently existing languages with the current .pot file and remove all unused/old/orphaned strings (de, es, eu, fr, it, nl, ru). IMO better, because deleting those strings keep the files smaller.

If you agree with one of the above solution, I could send a new Pull Request with changes for the .po files.
Let me know if you would like me to help you out with one of the above mentioned solutions.

Just some observations and ideas, even though the project is in a trial period.
I hope they are helpfull :-)

Cheers,
Milo

Don't launch with an arbitrary `#2E3440` color, always show the current color in the sidebar to the right when there's more than two colors, and let me delete colors

I'm running the flatpak version from Flathub, on Fedora.
By default, the app launches like this, with color #2E3440:

Screenshot from 2022-10-21 21-08-13

This is a problem when I want to sample colors that actually are close to this, such as #002E41. I then basically can't tell stuff apart from your default color, and I can't clear/remove the default color. Additionally, when you click a color on the right it "swaps places" with the color details on the left, which then goes into the right, and it means the colors keep shifting around all the time, so if you have a couple of similar-looking colors it's absolutely impossible to keep track of because the list keeps being reordered.

Please have the app start with a blank slate with just a "Pick a color" button, then don't swap things around when I click them in the sidebar (they should rather act like tabs, functionally speaking) and if I made a mistake and picked the wrong color, let me right-click and delete it (or have a delete button in the color's details).

Failed to pick a color on Ubuntu 22.04

Describe the bug
I've installed eyedropper through flatpak on Ubuntu 22.04, run it, clicked on "picker" icon and got:

Failed to pick a color
at bottom of app's window.

To Reproduce
Steps to reproduce the behavior:

  1. Be on Ubuntu 22.04 with flatpak installed from default apt repos
  2. Execute flatpak install --user flathub com.github.finefindus.eyedropper
  3. Execute flatpak run com.github.finefindus.eyedropper
  4. Try to pick a color
  5. See error

Expected behavior
A color is picked from the screen.

Screenshots
image

Information

  • OS: Ubuntu 22.04
  • Desktop Environment: GNOME 42 (X11)
  • GTK-Theme/Adwaita-Style: Yaru-dark
  • Version: 0.1.0

Additional context
Add any other context about the problem here.

Mon 19 Sep 11:12:35 ➜ ~ flatpak run com.github.finefindus.eyedropper
ERROR eyedropper::window > Portal request failed: org.freedesktop.zbus.Error: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

Option to save palette not visible / clear to user

Describe the bug
Can't find the option to save color palettes for later use, or at least not as shown in the app screenshots on Gnome Apps

Screenshots
image
image

Information

  • OS: Fedora 39
  • Desktop Environment: Gnome 45
  • GTK-Theme/Adwaita-Style: Custom Theme
  • Version: 1.0.0

Additional context
Installed using flatpak

Colors very similar to window background blend in too much

Picking up colors too similar to the window background makes them difficult to know they're been saved in the palette at all. See screenshot for an extreme case: there are two saved colors there.
Schermata del 2023-03-22 08-48-07
I suggest having a light 2px border around them to make them stand out.

Missing icons in GNOME Builder

Compiling the latest code in GNOME Builder (on Fedora 37 / GNOME 43) I noticed that some icons were missing in the Preferences Window (see screenshot below).
Capture d’écran du 2022-12-17 14-12-39-min
(Previously all the icons of the 'General' tab were missing, but it seems to be ok now)

Does not launch on Ubuntu 23.04 (Lunar Lobster)

Describe the bug

I understand there is a similar PopOS issue open here, but mine seems different has only just recently started and used to work perfectly.

To Reproduce

Installed using flatpak, flatpak run gives the following:

flatpak run com.github.finefindus.eyedropper

(eyedropper:2): Gdk-WARNING **: 10:07:13.385: The program 'eyedropper' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 475 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Tried to run with: GDK_SYNCHRONIZE=1 like suggested, but doesn't give any more information

Expected behavior

Program starts up

Information

  • OS: Ubuntu Lunar Lobster
  • Desktop Environment: Gnome 44
  • GTK-Theme/Adwaita-Style: Yaru
  • Version: Latest Flatpak

Please do let me know if there is anything else I can provide

Many thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.