Add swatches from HTML CSS and SVG

Last updated on Sep 30, 2026

Import web color values from code files directly into your Swatches panel.

Use this method when working with web design assets or translating website color schemes into your Photoshop projects. This feature extracts all unique color values from HTML, CSS, or SVG documents and adds them to your Swatches panel. Duplicate color values are automatically filtered out, keeping your panel organized with only unique colors.

Photoshop recognizes standard web color formats including hexadecimal codes (#112233, #123), RGB values (rgb(1,2,3)), RGBA values with transparency (rgba(1,2,3,4)), HSB values (hsb(1,2,3)), and HSBA values (hsba(1,2,3,4)).

You can either add imported colors to your existing swatches or replace your current swatch collection entirely. Once imported, colors are converted to Photoshop's color system.

Import colors from web documents

In the Swatches panel, select the menu icon in the upper-right corner.

Select Load Swatches to add colors to your existing swatches, or select Replace Swatches to replace all current swatches with the imported colors.

In the file browser, navigate to your HTML, CSS, or SVG file and select it.

Select Load to complete the import.

The imported colors now appear in your Swatches panel and are ready to use across your project. All recognized color formats from the source file are automatically converted to Photoshop's color model.

Note

To maintain consistent colors across web and print projects, import swatches from your website's CSS file at the start of each design project. This ensures your Photoshop designs match your established brand colors exactly.