Developers · Gutenberg
Color Harmony block for WordPress
Pick a base color and instantly see complementary, triadic, analogous, and other harmonic palettes. Click any swatch to copy its hex value.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Pick a base color and instantly see complementary, triadic, analogous, and other harmonic palettes. Click any swatch to copy its hex value.
Inspector panels on this block: Content, Palette Settings. Those titles come from index.js, not from a shared template.
Where to find it
Gutenberg inserter → Developers → search “Color Harmony” (block name `blockenberg/color-harmony` in block.json). Style it in the sidebar after insert.
How to use Color Harmony block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Color Harmony”, insert it. Category: Developers.
- Configure inspector controls that exist on this block. Open Content. Set “Default Harmony Type”, “Swatch Size (px)”, “Show Hex Values”, “Show RGB Values”.
- Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Default Harmony Type | Select control; the chosen value is saved on the block. block.json default: complementary. Saved as `defaultHarmony`. |
| Swatch Size (px) | Numeric range control in the inspector. Range 48–140. block.json default: 80. Saved as `swatchSize`. |
| Show Hex Values | On/off toggle in the inspector. On by default. Saved as `showHex`. |
| Show RGB Values | On/off toggle in the inspector. Off by default. Saved as `showRgb`. |
| Show Export Button | On/off toggle in the inspector. On by default. Saved as `showExport`. |
| Accent Color | Color control in the inspector. block.json default: #6366f1. Saved as `accentColor`. |
| Section Background | Color control in the inspector. block.json default: #f8fafc. Saved as `sectionBg`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Title Color | Color control in the inspector. block.json default: #1e1b4b. Saved as `titleColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
When this is the right block
- Pick a base color and instantly see complementary, triadic, analogous, and other harmonic palettes. Click any swatch to copy its hex value — that is the job of Color Harmony, not a generic content block.
- Use it when you need the editor control labeled “Default Harmony Type”, which exists on this block’s inspector.
- It matches pages about color, harmony, palette.
- Inserter grouping: docs sites, utilities, and developer landing pages.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Color Harmony block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Color Harmony”. It sits under Developers. After insert, open Content and set “Default Harmony Type”, “Swatch Size (px)”, “Show Hex Values”, “Show RGB Values”.
What makes Color Harmony different from other Blockenberg blocks?
Pick a base color and instantly see complementary, triadic, analogous, and other harmonic palettes. Click any swatch to copy its hex value. Inspector labels on this block include “Default Harmony Type”, “Swatch Size (px)”, “Show Hex Values”, “Show RGB Values”.
Is the Color Harmony Gutenberg block free?
Yes. Color Harmony ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Color Harmony to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Palette Settings).
Related developers blocks
Color Mixer
Interactive color mixing tool. Pick two colors, blend them at any ratio, view the result in HEX/RGB/HSL, generate color harmonies, and copy any value instantly.
Color Palette
Display brand color swatches with HEX, RGB, and CSS variable labels. Perfect for style guides and design systems.
Color Thief
Upload an image to automatically extract its dominant color palette using canvas pixel analysis.
Color Tokens
Design-system colour token reference. Displays named colour swatches grouped into palettes (Primary, Neutral, Semantic, etc.) with hex/RGB values. Visitors can click any swatch to copy its hex code.
Contrast Checker
WCAG color contrast accessibility checker. Test foreground/background color combinations against AA and AAA standards.
CSS Gradient Generator
Interactive CSS gradient builder with live preview, multiple color stops, and one-click CSS copy.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Color Harmony from the Gutenberg inserter.