跳到主要内容
知仓学习社ZHICANG

similarity-and-contrast

Apply deliberate dissimilarity (contrast) to distinguish elements that need to be perceived as different — primary vs. secondary actions, normal vs.…

不碰外部(只输出文字)无严重或高危命中hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少2 个文本文件,14 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 1,027
本站分层T1
该仓技能数1910
原文件路径plugins/HDeibler/universal-design-principles/plugins/perception-and-hierarchy-principles/skills/similarity-and-contrast/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 1910 个技能