This Photoshop script extracts dominant colors from the active image and displays them in a modal dialog window. Each extracted color is shown as a color swatch with its hex code and a "Set" button that lets you immediately set Photoshop’s foreground color to the selected color.
This script is completely free to use. If you'd like to support the author, you can purchase the extended license!
Extract up to 20 dominant colors from the currently open image
Colors are quantized to group similar shades and produce a clear palette
Each color row includes:
A color swatch
An editable hex code text field
A Set button to apply the color as the foreground color
Manual copy of hex codes is supported via the editable fields
Open an image in Photoshop.
Run the script by going to File > Scripts > Browse...
or by placing the script in Photoshop’s Scripts folder.
In the Extract Color Palette dialog:
Enter the number of colors to extract (between 1 and 20).
Click Extract Colors.
The Extracted Color Palette dialog will appear showing the extracted colors:
Each color is displayed as a swatch with its hex code next to it.
Click the Set button next to any color to immediately set it as Photoshop’s foreground color.
Select and copy the hex code manually if desired.
Close the palette dialog to resume working in Photoshop.
Place the .jsx
script file into Photoshop’s Scripts folder, usually located at:
Adobe Photoshop [version]/Presets/Scripts/
Restart Photoshop to have the script listed in the File > Scripts
menu.
Or run it directly using File > Scripts > Browse...
.
Adobe Photoshop CC 2019 or later
No external dependencies—runs directly inside Photoshop’s scripting engine
Hex code fields are editable but do not update the foreground color automatically; you must click the Set button to apply a color.
The color extraction downsizes images internally and groups colors to create a cohesive palette.