skip to content

// macos app

Gauge

Pixel-precise rulers, guides, a measuring tape, a color sampler and a loupe over the whole macOS desktop.

A native macOS overlay that gives every display physical-pixel rulers and persistent guides, measures any region or any two points, reads the color under the pointer and magnifies it, while every click outside a tool passes straight through to the app underneath.

source
// square13/22
year
2026
type
macos app
group
macos apps

//in plain words

When you build a screen, things need to line up and be the right size, but the ruler in one app cannot reach into another. Gauge draws see-through rulers and guide lines over the whole Mac screen, measures any distance, picks up the colour under the pointer and magnifies pixels, so you can check any app against any mockup.

for designers and front-end developers checking that things line up

the problem

//01the problem

Ruler tools live inside one browser tab or one design app, so you cannot line up a native window against a design mockup, or measure the gap between two things that belong to different programs.

how it works

//02how it works

  1. 01

    Real pixels

    Tick labels respect each screen's backing scale factor, so 100 means 100 actual display pixels on any screen. Guides are stored in physical pixels per display, and a small core library owns every point-to-pixel conversion and the measurement math, so 17 unit tests cover it without a screen.

  2. 02

    Out of the way

    Transparent, non-activating panels sit over each display. They ignore mouse events except on the two ruler strips while guide placement is on, and while measure, crosshair, sampler or loupe owns the pointer. Everything else clicks through.

  3. 03

    Measure, then take it with you

    Drag a box for width by height, or Option-drag two points for distance and angle. Measurements stay held on screen, click one to remove it, and the size copies in any of five formats including CSS, with optional position and aspect-ratio badges.

  4. 04

    Read the screen itself

    The color sampler reads the pixel under the pointer as hex and RGB through ScreenCaptureKit, excluding Gauge's own windows from the capture. The loupe magnifies the same feed with a pixel grid, the exact coordinate and its color.

  5. 05

    Guides that stay put

    Guides survive a restart, get numbered V1, H1 from their sorted position rather than a stored name, can be placed at an exact pixel from the settings, and are listed with counts in a remove window with select all and remove selected.

screens

//03screens

  1. Rulers, guides and a measurement: Numbered guides sit on the page's content edges, button row and card row, and the middle card measures 664 by 352 physical pixels.
    01Rulers, guides and a measurementNumbered guides sit on the page's content edges, button row and card row, and the middle card measures 664 by 352 physical pixels.
  2. Crosshair: Full-screen lines through the pointer with a live pixel readout, here on the corner of the secondary button.
    02CrosshairFull-screen lines through the pointer with a live pixel readout, here on the corner of the secondary button.
  3. Loupe: The anti-aliased edge of a headline letter, magnified with a pixel grid, the exact coordinate and its colour.
    03LoupeThe anti-aliased edge of a headline letter, magnified with a pixel grid, the exact coordinate and its colour.
  4. Color sampler: The sRGB colour under the pointer as hex and RGB; a click copies it in the format chosen in settings.
    04Color samplerThe sRGB colour under the pointer as hex and RGB; a click copies it in the format chosen in settings.
  5. Menu and settings: Every tool and its shortcut in the menu bar, next to the measure settings with their copy formats and badges.
    05Menu and settingsEvery tool and its shortcut in the menu bar, next to the measure settings with their copy formats and badges.
  6. Guides: Place a guide at an exact pixel, nudge any guide with its stepper, or select guides by display and remove them.
    06GuidesPlace a guide at an exact pixel, nudge any guide with its stepper, or select guides by display and remove them.

measured

//04measured

6
tools in one overlay
rulers, guides, measure, crosshair, color sampler and loupe
5
clipboard formats
dimensions, plain, with units, css and with position
1.1 MB
release binary
arm64, built on 3 nov 2026; no dependencies outside the system frameworks
0
permissions for the core tools
screen recording only for the sampler and loupe

decisions

//05decisions

  1. 01

    chose ScreenCaptureKit for the sampler and loupe

    over the older CoreGraphics capture calls

    The legacy APIs only return the desktop on current macOS, so the colour under a window came back wrong. ScreenCaptureKit returns the real composite and can exclude Gauge's own overlays, at the cost of a Screen Recording prompt for those two tools only.

  2. 02

    chose an explicit sRGB capture read through CoreGraphics

    over the capture's default output

    By default the captured image carries no colour space, and reading it as sRGB lifted the dark channels: a #0EA5E9 button sampled as #5FB4EA. Asking for sRGB and colour-matching the one pixel in CoreGraphics reads it as #17A6E9, within rounding.

  3. 03

    chose Carbon hot keys for the global shortcuts

    over an event tap

    RegisterEventHotKey works without Accessibility permission, which keeps the install to a single open command. While a tool is active its panel takes keyboard focus without switching apps, so Esc, Delete and Command C reach Gauge with no Input Monitoring and never leak into the app underneath.

  4. 04

    chose guide numbers derived from position

    over stored names

    Deleting or moving a guide would leave gaps or stale names. Sorting at render time keeps V1 the leftmost guide whatever happened before.

try it

//06try it

  1. //build and run in xcode

    git clone https://github.com/KhaledSaeed18/gauge && cd gauge && open Package.swift

    xcode 16 or later, macos 14 or later

  2. //or assemble an app bundle from the terminal

    ./Scripts/make-app.sh && open Build/Gauge.app

highlights

//07highlights

  • Rulers, guides, measure, crosshair, color sampler and loupe on every display
  • Six global shortcuts without Accessibility permission
  • Two-point measurement with distance and angle
  • Copy a size as dimensions, plain, units, CSS or with position
  • Pure Swift Package Manager project, Swift 6 language mode

built with

  • Swift
  • AppKit
  • SwiftUI
  • ScreenCaptureKit

on githubgauge

stars
1
license
MIT
language
Swift
last push
nov 3, 2026

printings

//08printings

  1. First commit

    The menu bar shell, the physical-pixel ruler overlay and a build workflow.

  2. Measure and crosshair

    Guide numbering, selective removal, separate axis colours, multiple global hot keys and a settings sidebar.

  3. Color sampler and loupe

    Two-point lines, copy formats, exact-pixel guides, a tested geometry core and the switch to ScreenCaptureKit.

  4. Hands-on test pass

    Every tool driven on two displays and nine bugs fixed: a blank window at launch, keys leaking into other apps, washed-out sampled colours, an ignored start-hidden setting and a clipped settings pane among them.

questions

//09questions

Does Gauge need Screen Recording permission?
Only for the color sampler and the loupe, which read the screen through ScreenCaptureKit. Grant it once in Privacy and Security, then reopen Gauge; clicking the notice those tools show opens that pane. A copy you build yourself is signed ad hoc, so remove and grant it again after a rebuild. Rulers, guides, measure and crosshair work without it.
Does the overlay block my clicks?
No, except on the two ruler strips while guide placement is on, and while measure, crosshair, sampler or loupe is active. Toggle the tool off and the desktop is click-through again.
Do guides survive a restart?
Yes. They are saved per display in physical pixels. Measurements are kept for the session only.
Is there a signed download?
Not yet. Build it from the Swift package in Xcode, or run the bundled script that assembles and ad hoc signs an app from a release build. It runs on Apple Silicon and Intel Macs on macOS 14 or later.

related sheets

//10related sheets

//11contact

Say hello.I read everything.

Email is the fastest way to reach me. For anything that needs a conversation, book a call.

to

name
Khaled Saeed
country
Lebanon