Tool

Video Thumbnail Color Palette Extractor

Extracts the dominant color palette from a thumbnail image.

Outputs hex codes and a swatch image for reference. The files open in your own spreadsheet, calendar and text programs.

Version 1.0.0 · Teranite Systems

$18.00 USD, one-time

Buying this pack gets you a licence to use it, not ownership of the files.

Read the full licence

Buy for $18.00

  • Download right after payment, and by email.
  • Runs on your own computer.
  • Refund within 14 days, for any reason.
  • Payment is handled by Stripe.

What it does

Extracts the dominant color palette from a thumbnail image. Outputs hex codes and a swatch image for reference. The files open in your own spreadsheet, calendar and text programs.

What's inside

  • Video thumbnail color palette: Instructions.txt, License.txt, example_input.svg, example_output.txt, swatch.svg, thumbnail_palette.py and 1 Python file.

With a README and the Teranite Facet Buyer Licence.

Sample

Video Thumbnail Color Palette Extractor

Extracts the dominant color palette from a thumbnail image. Outputs hex codes and a swatch image for reference.

Files: Instructions.txt, License.txt, example_input.svg, example_output.txt, swatch.svg, thumbnail_palette.py. thumbnail_palette.py, start of the file:

#!/usr/bin/env python3
"""
Video Thumbnail Color Palette Extractor
========================================
Extracts the dominant color palette from a video thumbnail image.
Outputs hex color codes to a text file and creates a visual swatch image.

Requirements: Python 3.8 or later, Pillow library
Usage: python thumbnail_palette.py <input_image> [options]
"""

import argparse
import os
import sys
from collections import Counter
from PIL import Image


def quantize_color(rgb, step=24):
    """Reduce color precision to group similar shades together."""
    r, g, b = rgb
    return (r // step * step, g // step * step, b // step * step)


def color_distance(c1, c2):
    """Calculate Euclidean distance between two RGB colors."""
    return sum((a - b) ** 2 for a, b in zip(c1, c2)) ** 0.5


def extract_palette(image_path, num_colors=5, resize_width=200):
    """Extract the dominant color palette from an image file."""
    if not os.path.exists(image_path):
        raise FileNotFoundError(f'Input image not found: {image_path}')

    try:
        img = Image.open(image_path)
    except Exception as e:
        raise ValueError(f'Could not open image: {e}')

    if img.mode != 'RGB':

Requirements

  • A program that opens the file types listed.
  • Checked: every file opens and parses, and any spreadsheet formulas compute in Microsoft Excel for Windows.
  • Not opened in other programs.

Install

Unzip the download, then the zip inside it. Each folder inside holds one set of files; open or import them in your own programs and work on a copy.

Licence

One licence covers one person. Your finished work is yours. Do not share or resell the files.

How it is made

Facet Packs are made with Teranite's own software tools, some of them written with help from AI, and rendered or built by standard software. They contain no AI-generated images.

Support

Questions, or a fault: support@teranitesystems.com. We reply within 2 business days.

More from Tools

See all