跳到正文
Skillpedia
界面(UI/UX)48k · #4401

high-contrast

它能做什么

本指南介绍如何创建高对比度设计,兼顾最大程度的清晰度和无障碍访问。它使用鲜明的颜色和清晰的边框,确保所有内容都易于阅读和操作。

适用场景

  • ✓当你需要网站或应用非常易于阅读时。
  • ✓为了确保视障用户也能使用你的产品。
  • ✓当你想要醒目、直接的视觉风格时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/high-contrast/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/high-contrast/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为一款阅读应用设计一个高对比度的网站界面。”

每周 5 个新技能,1 分钟读完。

工作原理

这种设计使用对比明显的颜色组合(例如黑与白,或鲜艳的色彩),并搭配大号、清晰的字体。同时为按钮和方框添加可见的边框,让它们更加突出。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

High Contrast Design

"Maximum legibility. Stark, powerful, and universally accessible."

When to Use

Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.

Core Principles

  1. WCAG AAA Compliance: Every color pairing must exceed a 7:1 contrast ratio.
  2. Clear Boundaries: Interactive elements have highly visible borders and focus states.
  3. No Ambiguity: Avoid subtle greys, low-opacity text, or purely decorative elements that distract from the core content.

Visual DNA

  • Colors: Industrial Chic (Black and White) or Modern Editorial. Often uses a single, highly luminous accent color (like pure Yellow #FFFF00 or Cyan #00FFFF) against black.
  • Typography: Highly legible, robust sans-serifs (Atkinson Hyperlegible, Inter, Roboto). Large base font sizes (18px+).
  • Styling: Solid 2px borders around cards and buttons. Avoid drop shadows as they reduce edge clarity.

Web Implementation

  • Focus heavily on focus states (:focus-visible) and clear active states.
  • CSS Example:
:root {
  --hc-bg: #ffffff;
  --hc-text: #000000;
  --hc-accent: #0000FF; /* Pure blue */
  --hc-focus: #FF00FF; /* High visibility focus ring */
}

body {
  background-color: var(--hc-bg);
  color: var(--hc-text);
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 18px; /* Larger default */
}

.hc-card {
  background-color: #ffffff;
  border: 3px solid #000000; /* Unmissable boundary */
  padding: 32px;
  border-radius: 8px;
}

.hc-btn {
  background-color: var(--hc-accent);
  color: #ffffff;
  border: 3px solid transparent; /* Reserve space for focus */
  border-radius: 4px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Crucial for high contrast / accessibility */
.hc-btn:focus-visible, a:focus-visible {
  outline: 4px solid var(--hc-focus);
  outline-offset: 4px;
}

a {
  color: var(--hc-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

App Implementation

SwiftUI

struct HighContrastView: View {
    var body: some View {
        VStack(spacing: 32) {
            // High Contrast Card
            VStack(alignment: .leading, spacing: 16) {
                Text("Maximum Legibility")
                    .font(.custom("Atkinson Hyperlegible", size: 24))
                    .fontWeight(.bold)
                    .foregroundColor(.black)
                
                Text("Content is king. Borders are stark. Contrast ratios exceed 7:1.")
                    .font(.custom("Atkinson Hyperlegible", size: 18))
                    .foregroundColor(.black)
            }
            .padding(32)
            .background(Color.white)
            .overlay(
                RoundedRectangle(cornerRadius: 8)
                    .stroke(Color.black, lineWidth: 3)
            )
            
            // High Contrast Action Button
            Button(action: {}) {
                Text("CONFIRM ACTION")
                    .font(.custom("Atkinson Hyperlegible", size: 18))
                    .fontWeight(.black)
                    .foregroundColor(.white)
                    .padding(.vertical, 16)
                    .padding(.horizontal, 32)
                    .background(Color.blue) // Must be a high-contrast blue, e.g., #0000FF
                    .cornerRadius(4)
            }
        }
        .padding()
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .background(Color.white)
    }
}
  • Rely on thick .stroke(Color.black, lineWidth: 3) overlays.
  • Ensure text is pure .black on pure .white. Do not use .secondary colors if they drop below a 7:1 contrast ratio.
  • Use fonts specifically designed for legibility, like Atkinson Hyperlegible.

Flutter

class HighContrastScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(24.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              // High Contrast Card
              Container(
                width: double.infinity,
                padding: const EdgeInsets.all(32),
                decoration: BoxDecoration(
                  color: Colors.white,

…
常见问题

什么是“WCAG AAA 合规”?

这是一项国际标准,确保网站和应用能够被尽可能多的人使用,包括视障人士。高对比度是其中的重要组成部分。

为什么要避免阴影和灰色?

阴影和灰色会减弱元素之间的差异,使设计不够清晰、难以阅读,对视力较弱的用户尤其如此。

推荐使用哪些颜色?

以黑色和白色作为基础。可以用一种鲜艳的颜色(例如纯黄色或青色)突出重要按钮或链接,但要始终确保颜色组合具有非常高的对比度。

详情

作者的原始描述

Web and App implementation guide for High Contrast Design. Trigger when user wants accessibility-focused design, extreme legibility, or stark visual impact.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4401
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能