A cross-platform screen pixel measurement tool that allows you to measure distances between any two points on your screen and displays the result in all HTML/CSS supported units.
- Screen-wide Measurement: Measure pixels anywhere on your screen (browser, desktop, any application)
- Multi-Monitor Support: Select which monitor to capture on multi-monitor setups
- All HTML/CSS Units: Instantly converts pixel measurements to all CSS length units
- Live Preview: See distance in real-time as you move the cursor
- Configurable Settings: Adjust DPI and base font size for accurate conversions
- Resizable Window: Customize the application window size to your preference
| OS | Status | Notes |
|---|---|---|
| Linux | Fully Supported | Primary development platform |
| macOS | Should Work | Requires screenshot tool (e.g., screencapture) |
| Windows | Not Tested | May require modifications |
| Protocol | Status | Screenshot Tool | Notes |
|---|---|---|---|
| Wayland (GNOME) | Fully Supported | gnome-screenshot |
Recommended for GNOME desktop |
| Wayland (wlroots) | Supported | grim |
For Sway, Hyprland, etc. |
| X11 | Fully Supported | scrot, gnome-screenshot |
Works with any X11 desktop |
| XWayland | Supported | gnome-screenshot, grim |
Hybrid environments |
| Unit | Description |
|---|---|
px |
Pixels (absolute) |
pt |
Points (1pt = 1/72 inch) |
pc |
Picas (1pc = 12pt) |
em |
Relative to element font-size |
rem |
Relative to root font-size |
% |
Percentage of screen width |
vw |
1% of viewport width |
vh |
1% of viewport height |
vmin |
1% of smaller viewport dimension |
vmax |
1% of larger viewport dimension |
cm |
Centimeters |
mm |
Millimeters |
in |
Inches |
Q |
Quarter-millimeters |
ch |
Width of "0" character |
ex |
Height of "x" character |
- Python 3.6+
- Tkinter (usually included with Python)
- Pillow (
pip install pillow)
For Wayland (GNOME):
# Fedora/RHEL
sudo dnf install gnome-screenshot
# Ubuntu/Debian
sudo apt install gnome-screenshotFor Wayland (wlroots-based compositors):
# Fedora/RHEL
sudo dnf install grim
# Ubuntu/Debian
sudo apt install grim
# Arch
sudo pacman -S grimFor X11:
# Fedora/RHEL
sudo dnf install scrot
# Ubuntu/Debian
sudo apt install scrot
# Arch
sudo pacman -S scrot# Clone the repository
git clone https://github.com/tatlilimon/point2point.git
cd point2point
# Install Python dependencies
pip install pillow
# Make executable (optional)
chmod +x pixel_measure.py
# Create a command alias (optional)
mkdir -p ~/.local/bin
ln -sf $(pwd)/pixel_measure.py ~/.local/bin/point2point
# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.local/bin:$PATH"python3 pixel_measure.pyOr if you created the alias:
point2point- Launch the application
- Click "Start Measuring"
- If you have multiple monitors, select which one to capture
- Click the first point on the screenshot
- Move cursor to see live distance preview
- Click the second point
- View measurements in all CSS units
Press ESC at any time to cancel measurement.
| Setting | Default | Description |
|---|---|---|
| Screen DPI | 96 | Adjust for accurate physical unit conversions (cm, mm, in) |
| Base font size | 16px | Reference font size for em/rem calculations |
Point2Point automatically detects all connected monitors and their positions. When you click "Start Measuring":
- A dialog appears listing all detected monitors with their:
- Name (e.g., DP-1, HDMI-1, eDP-1)
- Resolution (e.g., 1920x1080)
- Position (x, y coordinates)
- Select a specific monitor or "All Monitors (Full Desktop)"
- The screenshot will be cropped to the selected monitor
- Ensure you have a screenshot tool installed (
gnome-screenshot,grim, orscrot) - On Wayland,
gnome-screenshotis recommended for GNOME desktop - Check terminal output for error messages
- Install
xrandr(usually pre-installed on most Linux systems) - For wlroots-based compositors, install
wlr-randr
- This may happen on some Wayland compositors
- Try using "All Monitors" option instead of a specific monitor
Contributions are welcome! Please feel free to submit a Pull Request.
GPL-3.0 license