Skip to content
JS
Package

get-contrast-ratio

Calculate contrast ratio between two CSS color strings.

v1.0.0, 11 Apr 2026GPL-3.0ESM onlyTypes: BundledAccessibility
$ npm install get-contrast-ratio

Key numbers

As of 25 Sept 2026
Weekly downloads
1.3k
-29% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
1
Direct, from package.json
Last release
5 months ago
v1.0.0
GitHub stars
10
1 forks
Open issues / PRs
3 / 8
Contributors
-
Commits, last 52 weeks
28

Downloads

Last week 2026-09-15 to 2026-09-21
01k2k3kSept 2025Mar 2026Sept 2026High 2.7k (25 Nov 2025)Low 484 (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

1,295 downloads last week, 6,133 in the last month. The 12-month change of -29% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
1.0.0, 11 Apr 20265 months ago
First published
-
Last push to GitHub
13 Aug 202642 days before the snapshot
Repository archived
No
Open issues
3
Open pull requests
8
Commits, last 52 weeks
28
Dependents on npm
9

Major versions

-

Recent releases

-

Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
4.4 kB
Dependencies (1)
get-relative-luminance
npm install get-contrast-ratio
  • jsDelivrhttps://cdn.jsdelivr.net/npm/get-contrast-ratio@1.0.0/
  • unpkghttps://unpkg.com/get-contrast-ratio@1.0.0/
  • esm.shhttps://esm.sh/get-contrast-ratio@1.0.0
PackageWeekly downloadsGzipLast releaseModuleComparison
color-combos11.6k-7 months agoESM + CommonJS-
a11y-contrast-color6.2k-2 years agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): downloads_week 1295 < 10000.