Skip to main content
AI/MLhashgraph-online

similarity-and-contrast

Apply deliberate dissimilarity (contrast) to distinguish elements that need to be perceived as different — primary vs. secondary actions, normal vs. error states, foreground vs. background, the one important thing vs. the rest. Use when you want to emphasize a single element, distinguish roles, or break up a too-uniform layout. Contrast is similarity''s complement: similarity groups, contrast separates. The skill is calibrating contrast so it communicates what matters without creating visual chaos.

Stars
336
Source
hashgraph-online/awesome-codex-plugins
Updated
2026-05-27
Slug
hashgraph-online--awesome-codex-plugins--similarity-and-contrast
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/hashgraph-online/awesome-codex-plugins/HEAD/plugins/HDeibler/universal-design-principles/plugins/perception-and-hierarchy-principles/skills/similarity-and-contrast/SKILL.md -o .claude/skills/similarity-and-contrast.md

Drops the SKILL.md into .claude/skills/similarity-and-contrast.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Similarity and contrast

If similarity makes things feel like they go together, contrast makes things feel different. Used together, they let you communicate "these belong, those don't" through pure visual treatment. Used separately, similarity alone produces a uniform layout where nothing stands out, and contrast alone produces visual chaos where nothing is grouped.

The skill is calibrating both: enough similarity that related items group, enough contrast that distinct things distinguish. Most design problems are calibration problems on this axis.

When to introduce contrast

Contrast deliberately introduces difference where similarity would be misleading or insufficient. Specifically:

Primary vs. secondary actions. A submit button must be distinguishable from a cancel button. The two should not look the same — that misleads users about which is the primary action. Contrast in color, weight, or size separates them.

Normal vs. exceptional states. A normal status item should look different from an error item. The exceptional state needs to stand out so users notice it.

Important vs. supporting content. A page title should look different from body text. The hero card should look different from secondary cards. Without contrast, the user has no visual hierarchy to rely on.

Foreground vs. background. The active workspace should be visually dominant; the chrome (sidebars, headers, footers) should recede. Without contrast, foreground and background compete for attention.

Now vs. later. The current step in a flow should look different from completed and upcoming steps. Without contrast, the user can't tell where they are.

Calibrating contrast

Contrast can be too subtle or too aggressive. The right level depends on what you're communicating.

Too subtle. Two button styles that differ only by 10% opacity. The dissimilarity isn't visible; users don't perceive distinct categories. Either increase the contrast or remove the styling difference (it's not communicating).

Too aggressive. A primary button rendered in such a different style from secondary buttons that it doesn't even feel like the same component family. The contrast is so high it severs the relationship.

Just right. Primary and secondary buttons share a recognizable component shape (same padding, same rounding, same height) but differ clearly in color and weight. They're recognizably the same kind of thing (similarity at the structural level) with one clearly more emphasized than the other (contrast at the styling level).

The pattern: contrast within a family is more useful than contrast between families. Both are buttons; they share button-ness. One is emphasized.

The most useful contrasts

Some contrast types do more work than others.

Color contrast. Bright/saturated colors stand out against muted/desaturated. The brand color is reserved for primary actions; secondary actions use neutral colors. Status colors stand against neutral backgrounds.

Weight contrast. Bold against regular against light. Useful for typographic hierarchy without changing colors.

Size contrast. Large against small. Headlines vs. body. Hero card vs. supporting cards.

Color-light vs. color-dark. Within a single color, dark vs. light. Useful in monochrome or restrained color systems.

Filled vs. outlined. A filled button vs. an outlined button. Visually distinguishable; primary vs. secondary.

Position contrast. A floating action button (FAB) is positioned differently from in-line buttons; that position contrast emphasizes it.

Density contrast. A spacious section against a dense section. The spacious one feels emphasized.

The one-thing-emphasized rule

Hierarchy works when one element is clearly emphasized at each level. Pages have a single primary action; sections have a single primary headline; cards have a single primary image or value.

The corollary: emphasis loses its meaning when too many things are emphasized. A page with five "primary" buttons has no primary; users don't know which is the most important. A page with three different highlight colors has no clear emphasis.

The discipline is restraint. Pick the one or two things that warrant emphasis. Let the rest read as supporting.

Worked examples

Form with primary and secondary buttons

A form has a "Submit" primary action and a "Cancel" secondary action. Both are buttons; both share the same height, padding, and rounding (similarity at the structural level). They differ in:

  • Color: Submit uses the brand color background with white text; Cancel uses a neutral background with dark text.
  • Weight: Submit's text is medium weight; Cancel's is regular.
  • Possibly size: Submit slightly larger to add emphasis.

Users see the family ("buttons") and the hierarchy (one is primary). The contrast is calibrated to be visible without severing the family relationship.

Dashboard with one featured metric

A dashboard has 8 metrics. One is critical (today's revenue); seven are supporting. The critical metric is rendered in a hero card with larger size, bolder weight, and a slightly emphasized background. The seven supporting metrics are in smaller, more uniform cards.

The contrast establishes hierarchy at first glance. Users see the featured metric immediately; the supporting metrics are available but don't compete.

If all 8 metrics had been styled the same (heavy similarity, no contrast), users would have to read each label to find revenue. The contrast does the work of hierarchy.

A long article with subtle contrast

A long-form article uses similarity heavily for the body prose (consistent body type, consistent line spacing) and introduces contrast for structural breaks: subheadings in larger weight, pull-quotes in italic and a different color, code blocks with a different typeface and tinted background.

The contrasts are subtle but clearly distinguish each kind of element. The reader can scan the article structure (subheadings stand out) and quickly identify special content (pull-quotes, code).

Primary/secondary that fail to distinguish

A form's submit and cancel buttons are both rendered in the brand color (the designer thought "brand consistency"), with only a subtle 5% saturation difference. Users can't tell which is primary; they often click cancel by mistake.

The fix: use the brand color only for the primary; use a neutral color for the cancel. The contrast between brand and neutral is the signal.

Five-color highlights that lose meaning

A documentation site uses red, blue, green, yellow, and purple highlights for different categories. With five categories competing for attention, the highlights stop reading as emphasis and start reading as noise. Users don't pay attention to any of them.

The fix: reduce to 1–2 highlight types. If more categories are needed, encode them with subtler cues (small icons, badges) that don't compete for attention.

Anti-patterns

Contrast for contrast's sake. Adding visual variety without communicating anything. Decoration disguised as design.

Universal emphasis. Making everything bold, everything large, everything colored. Nothing stands out because everything stands out.

Subtle differences that don't communicate. A 5% opacity change between two states. Users don't perceive the difference; the styling doesn't do its job.

Contrast that contradicts hierarchy. A "back" button styled larger and bolder than the "next" button. Users get confused about which is the forward action.

High contrast on everything. Drop shadows on every card, brand color on every button, large size on every heading. The contrasts compound and create visual chaos.

Contrast inconsistent across surfaces. Primary buttons styled one way on the home screen, another way on the settings screen. Users can't form a stable expectation.

Heuristic checklist

Before settling on visual treatment, ask: What needs to be distinguished, and what should look the same? Plan similarity and contrast deliberately. Is contrast doing distinguishing work, or just adding visual variety? If the latter, remove. Is each level of hierarchy clearly one-thing-emphasized? Multiple "primary" elements at the same level dilute emphasis. Is contrast strong enough to be perceived? Subtle differences may not communicate.

Related sub-skills

  • gestalt-similarity — parent principle on similarity perception.
  • similarity-grouping — sibling skill on grouping by similarity.
  • hierarchy — contrast is a primary mechanism for expressing hierarchy.
  • signal-to-noise — disciplined contrast is signal; undisciplined is noise.
  • color — color contrast is the most powerful kind.

See also

  • references/contrast-patterns.md — patterns for specific contrast situations.