# ccampbell/rainbow

Simple syntax highlighting library written in javascript

Repository: https://github.com/ccampbell/rainbow
Canonical: https://ross.abutalabs.com/products/ccampbell-rainbow
Homepage: http://rainbowco.de
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: javascript, syntax-highlighting
Last push: 2023-09-24T21:33:32+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5273, "days_push": 1074, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3297, forks 451 (observed 2026-08-28T04:07:55.617564+00:00)

## What it is
Rainbow is a lightweight (~2.5kb) JavaScript syntax highlighting library for coloring code blocks in web pages. It works in the browser via a data-language attribute and in Node.js, supports many languages, and is fully themable with CSS and extendable with custom language rules.

## Use cases
- highlight code snippets on a blog or documentation site
- add syntax coloring to pre/code blocks in HTML
- highlight source code in a Node.js script
- build a custom lightweight highlighter bundle with only needed languages
- create custom CSS themes for code display
- extend an existing language with custom highlighting rules

## When to choose
- you need a very small, dependency-free highlighter for a website
- you want CSS-based theming and easy language extension
- you only need highlighting for a handful of languages

## When to avoid
- you need highlighting for many obscure languages out of the box
- you need server-side rendering integration with a modern framework
- you need actively developed features or frequent updates

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, ui-components, developer-tools
- domain: web-development, frontend, documentation
- platform: browser
- tags: syntax-highlighting, code-display, lightweight, css-theming, extensible, nodejs, javascript

## Member repositories
- ccampbell/rainbow (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:55.617564+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-30T07:22:42.010407+00:00, confidence not recorded.
  - readme: https://github.com/ccampbell/rainbow (fetched 2026-08-28T04:07:55.617564+00:00, sha 1a765a5efee5)
  - homepage: http://rainbowco.de (fetched 2026-08-29T09:35:48.456572+00:00, sha 0d950b044c51)
- Data as of 2026-08-30T08:39:29.467469+00:00.
