Recommend this page to a friend! |
![]() |
Info | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2025-03-03 (5 days ago) ![]() | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
ypsilonpicker-php 1 | MIT/X Consortium ... | 7.4 | PHP 5, Graphics, Tools, GUI, Console |
Description | Author | |
This package can pick a color of any point on a screen. |
Authors: ChatGPT by OpenAI & Engin Ypsilon by class:Parent()
Ypsilon Picker is a simple terminal-based color picker for Wayland-based GNOME desktops. Click anywhere on the screen and instantly retrieve the RGB and HEX values of the selected color.
Ypsilon Picker is a lightweight PHP script (~50 lines of code) that requires no dependencies beyond GNOME. You can run it directly or set up a shortcut for convenience.
Clone this repository into your local <ins>bin</ins> directory (or another preferred location):
mkdir -p ~/bin/ypsilonpicker-php
cd ~/bin/ypsilonpicker-php
git clone https://github.com/eypsilon/ypsilonpicker-php.git .
chmod +x YpsilonPicker.php
Simply run:
~/bin/ypsilonpicker-php/YpsilonPicker.php
__Example output after selection__
Click anywhere on the screen to pick a color...
RGB: 23 20 33
HEX: #171421
HEX copied to clipboard!
\* If wl-clipboard
is installed, the HEX value is automatically copied to your clipboard:
sudo apt install wl-clipboard
*1. Create a Bash Alias (for CLI users)*
To shorten the command, add this alias to your <ins>.bashrc</ins> or <ins>.zshrc</ins>:
# sudo nano ~/.bash_aliases
alias ypick="~/bin/ypsilonpicker-php/YpsilonPicker.php"
# Reload your shell
source ~/.bashrc
# or source ~/.zshrc
Now, simply type ypick
in the terminal to launch it! ??
*2. Create a Desktop Launcher (for GUI users)*
If you want to launch Ypsilon Picker from your application menu, create a <ins>.desktop</ins> file.
# Do NOT use `sudo` to avoid permission issues
nano ~/.local/share/applications/ypsilonpicker.desktop
[Desktop Entry]
Name=Ypsilon Picker
Comment=Pick colors from the screen
Exec=gnome-terminal --geometry=60x12+100+100 -- bash -c "php ~/bin/ypsilonpicker-php/YpsilonPicker.php; exec bash"
Icon=preferences-color
Terminal=true
Type=Application
Categories=Utility;
Ctrl+o
, then Enter
, then Ctrl-x
).
Now, you can search for "Ypsilon Picker" in your application menu and run it like a boss! ?
Ensure correct ownership (only needed if you used sudo
when creating the file):
sudo chown $USER:$USER ~/.local/share/applications/ypsilonpicker.desktop
Mark the file as trusted (to avoid untrusted application warnings):
gio set ~/.local/share/applications/ypsilonpicker.desktop metadata::trusted true
Update the desktop database (if the launcher doesn?t appear):
update-desktop-database ~/.local/share/applications/
If you prefer a Bash script instead of PHP, use this:
#!/bin/bash
# Ypsilon Picker (Bash)
echo "Click anywhere on the screen to pick a color..."
sleep 0.5
output=$(gdbus call --session --dest org.gnome.Shell.Screenshot --object-path /org/gnome/Shell/Screenshot --method org.gnome.Shell.Screenshot.PickColor)
colors=($(echo $output | grep -o "[0-9\.]*"))
LC_NUMERIC=C
for ((i = 0; i < ${#colors[@]}; i++)); do
colors[$i]=$(echo "${colors[$i]} * 255" | bc | awk '{printf "%.0f\n", $1}')
done
echo "RGB: ${colors[0]} ${colors[1]} ${colors[2]}"
printf "HEX: #%02x%02x%02x\n" "${colors[0]}" "${colors[1]}" "${colors[2]}"
Just save it as ypsilonpicker.sh
, make it executable, and run it:
chmod +x ypsilonpicker.sh
./ypsilonpicker.sh
> 2. Alternative: GNOME Shell extension version
<!-- Tags for searchability -->
Tags: Color-Picker
Wayland-Color-Picker
Linux-Color-Picker
GNOME-Color-Picker
CLI-Color-Picker
RGB-Hex-Extractor
PHP-Terminal-Tool
Open-Source-Color-Picker
![]() |
File | Role | Description |
---|---|---|
![]() ![]() |
Lic. | License text |
![]() ![]() |
Doc. | Documentation |
![]() |
Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.