DEV Community

Subarna Maity
Subarna Maity Subscriber

Posted on

FarbeDex: a colour picker that only works outside (and never needs the internet)

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

I pick colours for a living, and almost all of them come from other screens: palette generators, screenshots, a hex code a client pasted into chat. Meanwhile the best palettes I've ever seen were outside my window the whole time. Moss on a wet wall. A late sky fading from peach to blue. Rust on a gate nobody has painted in years.

So I built FarbeDex, an Android app that turns what you see outside into colours you can keep.

It takes almost no time. Point your camera at the view, the sky, a cloud, even the clouds below you from a plane window, and tap once. The palette appears right away, with how much of the scene each colour covers. Pick your two favourites, Gemma names them a moment later, and your phone goes back in your pocket. You go back to the view.

Your favourites join a collection of 151 colours, from everyday greys to Mythical vivid violets, each one a little colour pal with its own face. And every catch hands you a palette you can drop straight into your next design.

Orboarding - colro lives outside

Most apps that get you outside give you a job: run this far, find this bird, finish this quest. FarbeDex gives you none. No checklist, no target, no streak. When something makes you stop and look, that's your catch.

And it all runs completely offline, with two open AI models living on your phone.

Demo

Home: your collection at a glance

Dashboard

Catch, then pick your two favourites

Top colors found

A Legendary reveal

Legendary Color Captured

Your FarbeDex fills up

FarbeDex View of Captured colors

Gemma naming colours in airplane mode
🎬 Demo video:
📱 APK: https://github.com/Dronzer2code/FarbeDex/releases/tag/v4.0

Code

FarbeDex

Catch real colours from real places. FarbeDex is an offline Android app for designers and front-end developers. You go outside, photograph a scene with the in-app camera, and FarbeDex extracts its palette and how much of the scene each colour covers. Every colour lands in the FarbeDex: a fixed index of 151 colour entries (#001–#151) that you complete over time.

Built for the DEV Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass.

Screenshots and demo video: TODO (added after the field test) APK download: TODO (GitHub release v1.0.0)

How it works

  1. Camera only. There is no way to import a picture. Live checks (hand-held motion, a fresh capture) and the Referee make sure a catch is a real outdoor scene, not a screen or a print.
  2. Deterministic colour maths. The photo is reduced to up to 7 colours with k-means in OKLab, and each colour's share of the scene…

How I Built It

The maths sees, the models judge and name

The biggest decision was what not to give to AI. Colour extraction is plain maths: k-means clustering in OKLab, a colour space built around how people perceive difference. The same photo always gives the same palette. Every colour lands in one of 151 entries: 7 neutrals plus 16 hue families × 3 lightness × 3 chroma bands.

I wanted the collection to be completable, so a test sweeps the whole sRGB cube and checks that all 151 entries can actually be reached. Rarity follows one idea, "how often does nature show this colour": greens and greys are everywhere, vivid blues and violets are not. That gives 42 Common, 42 Uncommon, 37 Rare, 21 Legendary and 9 Mythical.

The models do only what models are good at: judging a scene, and naming things.

Gemma 3 270M, the namer that fits in your pocket

The star of FarbeDex is Gemma 3 270M, running on the phone through llama.cpp as a 253 MB file. When you register colours, Gemma names each new one, gives the whole palette a one-word mood (COOL, EARTHY, SERENE…), and writes a one-line tip on using the palette in an interface.

A 270M model has big ideas and small habits, so it never writes free text into the app:

  • Structured output only. Every request uses a JSON schema compiled into a grammar, and the schema pins exactly which colours Gemma must name. It can't skip one or invent one.
  • Gemma writes the poetry, the app writes the facts. Early on, Gemma named a pale blue "Dark Charcoal". Now Gemma writes only the evocative part ("Rooftop Morning"), and the app adds the true colour word ("…Blue"). Colour words are banned from Gemma's half, so a blue is always called blue.
  • Validate, retry once, then fall back. Every name is checked for length, uniqueness and a blocklist. A failed name gets one retry with the reason attached; after that a plain name like "Vivid Pale Blue" takes over, so you're never left waiting.

My first Legendary indigo came back as Ocean Waves. Here it is in the Tailwind export, next to the plain fallback names of colours Gemma hadn't named yet:

Tailwind Export

More names Gemma gave my catches: [2–4 more names from your catches]

MobileCLIP, the referee that keeps it honest

The second open model is MobileCLIP-S0 on ONNX Runtime. It answers two questions: is this a real outdoor scene, and what's in it?

The phone never runs a text encoder. I embedded every label on my laptop ("a computer monitor", "potted plants on a balcony", "the blue sky"…) and ship them as a small file, so on the phone one image embedding and a few dot products do the job. It rejects only confident screens and home interiors, so balconies, rooftops and pot plants all count. And the subject it names must match the photo's real colours.

Yes, I tried to cheat by photographing my own laptop. It didn't work:

Field Reject

Pick two, and sometimes get lucky

Catching shouldn't be mindless, so you choose two favourites per catch, and only those join your collection. Rare, Legendary and Mythical picks get a special reveal, and each has a 1-in-400 chance to be shiny: gold rim, sparkles and its own chiptune jingle, all original and generated in code.

Two AI teammates, one source of truth

I built FarbeDex in about two and a half days with two AI tools, each with its own job.

GitHub Copilot is the editor. While Claude builds, Copilot keeps the documentation updated in parallel, so the docs never fall behind the code. When each Claude task finishes, Copilot curates the commit message, turning a long session into one clean line of history.

Specs go in; tested, documented commits come out. The repo ships with 279 passing tests.

We Touched Grass

I'm a graphic designer and a front-end developer, which mostly means I'm a person at a desk. My whole working day happens on a laptop. When the work stops, the scrolling starts: my "free time" was Instagram Reels until my thumb got tired.

I didn't notice what it was doing to me until it had already done it. I went out less, talked to people less, and slowly got bad at simple things: starting a conversation, being somewhere without a screen, just being outside. Climbing back out took real, slow work, and I did most of it alone. Nobody hands you a plan for that.

So I know exactly where the problem sits. People like me know the outdoors exists. What we lack is a reason to step out that doesn't come with pressure. Every reason the internet offers is another task: 10,000 steps, a streak, a specific bird. When you're already drained, one more task is exactly what keeps you at your desk.

FarbeDex is built for that version of me. For a designer, colour is the reason. There's no target and no wrong answer. You walk to the corner, notice the light on a wall, and tap once. That moment becomes something real for your work, and a little colour pal you actually want to show people. Everything runs on the phone, so you can leave the Wi-Fi, and the feed, behind.

Then comes the moment later, back at the desk. You remember that evening and think: those colours were so good, I wish I had them in my design. Now you do, in five formats:

  • Palette image: a swatch card with a one-word mood, ready for a moodboard.
  • HEX codes: copy any colour with one tap.
  • CSS: custom properties to paste into a stylesheet.
  • Tailwind: a colors block for your config.
  • JSON: design tokens for Figma plugins and design systems.

A built-in contrast table even tells you which pairs pass WCAG for text, so the sky you saw can become a readable website.

Color Pallet share

Here's what happened when I used it myself:

[Your first walks with FarbeDex: balcony, roof, the street near home. How long you stayed out, how many colours you caught, your rarest find, a shiny if you got one, and what it felt like to look up instead of down. 2–3 photos.]

[Your FarbeDex counter before and after, e.g. "0 / 151 → 2 / 151".]

Why Does Open Innovation Matter?

  • It works where colour lives. Parks, rooftops and planes often have no signal. Both models (276 MB together) run fully on the phone, in airplane mode.
  • Your photos stay yours. Nothing is uploaded, there's no account, and the only permission FarbeDex asks for is the camera.
  • It costs nothing per catch. No API bill, no rate limit, and it will work exactly the same next year.
  • You can see inside it. Every prompt, label and threshold is in the repo. Don't like the names? Change the prompt. Want a different referee? It's one config line.

In your phone

A big closed vision model might label scenes a little better. But it would need every outdoor photo uploaded, a signal in the middle of a park, and money for each catch. For noticing colours on a walk, two tiny open models are exactly enough.

What Didn't Work

  • The quantized referee saw screens everywhere. The int8 version of MobileCLIP called a beach, a lake and a savanna "a screen". Switching to the fp16 file (23 MB) fixed it completely.
  • My own balcony counted as indoors. On the phone, every shot from my balcony and roof was rejected as "inside". I flipped the logic: accept by default, and reject only when the model is sure it sees a screen or a home interior.
  • A sky called "fern". One prompt per subject wasn't enough. Several prompts per subject, plus a rule that the label must match the photo's real colours, fixed it. No green, no fern.

Prize Categories

Best Use of Gemma: Gemma 3 270M runs fully offline on an Android phone, naming colours, giving palettes a mood and writing design tips through validated, schema-constrained JSON.

Team

Subarna Maity - Me
*Sourish Panda - @t-rexbytes *


I set out to build a colour picker that makes you go outside. What I ended up with is an app that, most days, just asks you to look up. 🌿

Top comments (0)