plainJS

Libraries / UI

Rainbow Syntax Highlighter

Simple syntax highlighting library written in javascript

BuildlessDormant1 dependencyScript tagApache-2.0

Facts

Facts fetched 2026-10-30 by the directory sync (GitHub, npm, jsDelivr, deps.dev). Nothing here is typed by hand.
Size21.2 KB minified, 7.0 KB gzipped (dist/rainbow.min.js)
LicenceApache-2.0
Dependencies[email protected]
Last releasev2.1.7, September 2020
Last activity2023-09-24 (Dormant)
Stars3,295 on GitHub
Formatsclassic script (global Rainbow)
CDN hits5,432 a month on jsDelivr
npm downloads629 a month
GatesG1 failed (no runtime dependencies); G2 passed (loads in a browser as it is); G3 passed (no compile-only entry points); G4 passed (open-source licence); G5 passed (not archived or deprecated). Smoke test on v2.1.7 in headless Chromium, 2026-10-30

Load it

Pin the version. The hash is computed from the file jsDelivr serves, so a changed file fails to load instead of running.

htmlscript tag, with SRI
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/rainbow.min.js"
        integrity="sha384-1FCya97T+WFvkAiK3RBJjHYBNqGf2jts54myBAdxa23K/TZdJYs6hxZunEtajgTw" crossorigin="anonymous"></script>
Advertisement

Entry 3 in the directory. Facts refreshed monthly; last run 2026-10-30.