Menu

PDF Colors Extractor

Upload a PDF and extract every color used inside it — text, vector shapes, fills and strokes — with full HEX, RGB, HSL & CMYK codes.

Step 1 — Upload PDF

Tip: The extractor reads vector color operators (fill, stroke, text). Scanned PDFs that are just images won't yield vector colors — use an image color picker for those.

💡 WHAT YOU'LL GET

  • Every fill and stroke color used
  • Text, vector shapes, lines, and form fields
  • RGB, CMYK, Gray, and spot color spaces
  • Usage count per color (most-used first)
  • HEX, RGB, HSL, CMYK exports
Selected color
Click a swatch to inspect its codes

Extracted Palette — upload a PDF to begin

Upload a PDF file to extract its colors.
✓ Copied!
PDF • VECTOR COLORS • PALETTE

PDF Colors Extractor

Extract every color from any PDF file — text, vectors, fills, and strokes. Get HEX, RGB, HSL, and CMYK codes for each color, along with usage counts so you can see which colors dominate your document.

RGBCMYKGRAYSEPARATIONCLIENT-SIDE
All ColorsFrom every page
FrequencySee most-used colors
HEX · RGB · HSL · CMYKCopy ready
Client-sideYour PDF stays private
01
FUNDAMENTALS

What Is a PDF Colors Extractor?

A PDF Colors Extractor is a tool that reads the internal content streams of a PDF file and identifies every color used inside it — whether it's the fill color of a shape, the stroke color of a line, or the color of text.

PDF files store colors using operators such as rg (RGB fill), RG (RGB stroke), k (CMYK fill), K (CMYK stroke), g (Gray fill), G (Gray stroke), and their sc/scn variants for more complex color spaces.

This tool parses those operators from every page, deduplicates the colors, converts them all to HEX for easy use in design software, and counts how often each color appears.

Simple idea: Upload a PDF → the tool reads its vector color operators → you get a clean, deduplicated color palette.
02
COLOR SPACES

PDF Color Spaces Explained

RGB

Red, Green, Blue

Used for on-screen colors. Values are 0–1 in PDF operators but map directly to standard RGB.

1 0 0 rg → #FF0000
CMYK

Cyan, Magenta, Yellow, Key

Print-focused. The tool converts CMYK to RGB for on-screen previews.

0 1 1 0 k → #FF0000
GRAY

Grayscale

A single 0–1 value for grayscale fills and strokes. Black to white.

0.5 g → #808080
03
HOW IT WORKS

Parsing PDF Color Operators

A PDF is composed of content streams written in a small stack-based language. Colors appear as operators followed by numbers — for example:

PDF CONTENT STREAMEXAMPLE
1 0 0 rg      % fill color: red
0 0 1 RG      % stroke color: blue
0.2 0.4 0.6 0.1 k  % CMYK fill
0.5 g         % gray fill

The extractor scans each page's content stream for these operators, converts the numbers to RGB hex values, and builds a frequency map. Colors are then sorted and displayed in the palette grid.

04
PRIVACY

Your PDF Never Leaves Your Browser

This tool uses the open-source pdf.js library to read PDF files locally. There is no server upload, no account, and no data retention. Everything — parsing, color extraction, and palette generation — happens entirely in your browser.

05
USE CASES

Who Uses a PDF Colors Extractor

Designers

Reverse-engineer color palettes from client PDFs.

Print Teams

Check CMYK colors used in print-ready PDFs.

Brand Teams

Extract colors from a brand guideline PDF.

Web Developers

Match a site theme to a PDF's palette.

Marketers

Check brand consistency across PDF assets.

Students

Study colors used in academic or design PDFs.

06
TIPS

Getting the Most from the Extractor

  • Scanned PDFs won't yield vector colors. If the PDF is a scanned image, use an image color picker instead.
  • Sort by frequency to find the main brand colors.
  • Compare light and dark tones. PDFs often use near-black and near-white as text/fill defaults.
  • Copy CSS variables for easy use in web projects.
  • CMYK approximations are close but not exactly identical to print CMYK profiles.
09
FAQ

PDF Colors Extractor FAQ

How does the PDF Colors Extractor work?

It reads the vector color operators (rg, RG, k, K, g, G, sc, scn) from each page's content stream using pdf.js and converts the numeric values into HEX colors.

Does it work with scanned PDFs?

No. Scanned PDFs are images, not vector content, so there are no color operators to read. Use an image color picker for those.

Is my PDF uploaded anywhere?

No. Parsing happens entirely in your browser using pdf.js. Your PDF never leaves your device.

Which color spaces are supported?

RGB, CMYK, and grayscale are fully supported. Named separations and spot colors may be skipped or approximated.

Can I extract only text colors?

The current version extracts all vector colors (fills, strokes, text) together. Text colors usually appear near the top by frequency in text-heavy PDFs.

Why are some colors missing?

Colors inside embedded images (photos, rasterized graphics) aren't vector operators, so they aren't extracted. Spot colors and ICC-based spaces may also be skipped.

Can I export the palette?

Yes. You can copy all HEX values as a list, copy CSS variables, or copy a JSON structure.

Is it free to use?

Yes. The tool is completely free and requires no signup.

UPLOAD • EXTRACT • EXPORT

Extract Every Color From Your PDF

Get an instant, deduplicated palette of every color in a PDF — fills, strokes, and text — with ready-to-copy HEX, RGB, HSL, and CMYK values. Fast, private, and completely free.

PDFColor ExtractorHEXRGBCMYKPalettePrivate