# fast-average-color/fast-average-color

🍏🍊🍅 Fast Average Color

Repository: https://github.com/fast-average-color/fast-average-color
Canonical: https://ross.abutalabs.com/products/fast-average-color
Homepage: https://fast-average-color.github.io/examples/background.html
Language: TypeScript
License: MIT
License Family: permissive
Topics: js, average-color, color, fast, canvas, htmlimageelement, htmlvideoelement, gradient, box-shadow, video, ts, imagebitmap, offscreencanvas
Last push: 2026-04-05T22:51:48+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 46, longevity 100
- inputs: {"age_days": 3132, "days_push": 150, "days_rel": 150, "gap_med": 190.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1537, forks 55 (observed 2026-08-28T04:05:00.150646+00:00)

## What it is
A small, fast TypeScript library that calculates the average or dominant color of images, videos, canvases, and raw pixel arrays in the browser. It supports multiple algorithms, transparency handling, web workers, and partial-region color extraction.

## Use cases
- get the average color of an image to tint a page background
- extract dominant color from a video frame
- compute average color from a canvas or OffscreenCanvas
- get average color from an image URL or base64 string
- ignore specific colors (like white backgrounds) when averaging
- calculate average color of a specific region of an image
- use in a web worker for non-blocking color extraction

## When to choose
- you need fast average or dominant color extraction in the browser
- you want a tiny, tree-shakeable dependency with no heavy image library
- you need to work with videos, canvases, ImageBitmaps, or raw pixel arrays
- you need transparency-aware color averaging

## When to avoid
- you need full image processing or manipulation, not just color stats
- you need dominant color clustering like k-means with palette generation
- you need server-side processing without a browser environment (use the companion Node.js package instead)

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, graphics
- domain: image-processing, web-development, frontend
- platform: browser
- tags: average-color, dominant-color, canvas, color-extraction, typescript, tree-shakeable, nodejs, web-server

## Member repositories
- fast-average-color/fast-average-color (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:00.150646+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:00.734178+00:00, confidence not recorded.
  - readme: https://github.com/fast-average-color/fast-average-color (fetched 2026-08-28T04:05:00.150646+00:00, sha 56e2694681c5)
  - homepage: https://fast-average-color.github.io/examples/background.html (fetched 2026-08-29T11:32:57.067393+00:00, sha d75f7cd43d6e)
  - registry_npm: https://registry.npmjs.org/fast-average-color (fetched 2026-08-29T11:32:57.076998+00:00, sha 497f422c6a2b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
