# RefColorSync — auto-sync foreground color from a reference layer while you draw

**URL:** https://community.aseprite.org/t/refcolorsync-auto-sync-foreground-color-from-a-reference-layer-while-you-draw/28817
**Category:** Scripts & Extensions
**Created:** [September 18, 2026, 12:48pm UTC](https://community.aseprite.org/t/refcolorsync-auto-sync-foreground-color-from-a-reference-layer-while-you-draw/28817 "2026-09-18T12:48:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alalal\_68](https://community.aseprite.org/user_avatar/community.aseprite.org/alalal_68/32/28332_2.png) [@alalal\_68](https://community.aseprite.org/u/alalal_68)
#### Post date: [September 18, 2026, 12:48pm UTC](https://community.aseprite.org/t/refcolorsync-auto-sync-foreground-color-from-a-reference-layer-while-you-draw/28817/1 "2026-09-18T12:48:05Z")

</div>

**RefColorSync** is a free Aseprite extension that automatically updates your foreground color based on the pixel under your cursor on a reference layer — no more constantly switching to the eyedropper tool.

**How it works:**  
Move your cursor over your reference image while it sits on a named layer (e.g. “Reference”), and `app.fgColor` updates in real time. Hover → color updates → start painting immediately.

**Features:**

- 🎯 Real-time color sampling as you move the cursor
- 🗂 Configurable reference layer name (works with layers nested in groups)
- 🖼 Composite mode — sample from the final flattened image instead of a single layer
- 👻 Option to ignore transparent pixels so they don’t reset your color
- ⚡ Adjustable polling rate (15–40 Hz) to balance responsiveness and CPU usage
- 🎨 Full support for RGB, Indexed, and Grayscale color modes
- 💾 Settings persist between Aseprite sessions

**Limitations:**  
Aseprite’s Lua API doesn’t expose a hook for “during an active brush stroke,” so the color updates based on cursor position rather than mid-stroke. In practice it feels natural: hover → color updates → paint.

**Requirements:** Aseprite v1.3+ (uses the `app.editor` API). Works on Windows, macOS, and Linux.

**Download & source:**

> **[GitHub - alalal68-wq/RefColorSync.0.1: aseprite aseprite-extension pixel-art lua...](https://github.com/alalal68-wq/RefColorSync.0.1)**
>
> aseprite aseprite-extension pixel-art lua color-picker reference-layer digital-art tools

## Feedback, bug reports, and feature requests are very welcome!
