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

color-blocking

它能做什么

这个工具可以帮助你创建由大面积纯色、对比鲜明的色块组成的视觉布局,将空间进行几何划分,风格类似蒙德里安的画作。它非常适合追求视觉冲击力和清晰分区的设计。

适用场景

  • ✓当你想要大面积鲜明、对立色彩的设计时。
  • ✓想要在屏幕上做出清晰的几何划分,比如棋盘格时。
  • ✓想要借鉴抽象艺术风格,使用矩形形状和鲜艳色彩时。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“创建一个色块布局:黄色、蓝色和红色,搭配白色和黑色文字。”

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

工作原理

系统会把屏幕划分为矩形或正方形,并用纯色填充每一块。颜色之间形成强烈对比,文字则被精心放置在色块中,以平衡视觉重量。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Color Blocking

"The grid made visible. Large, solid swaths of contrasting color defining the layout."

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. Geometric Division: The viewport is divided into large rectangles or squares, each filled with a solid, distinct color.
  2. No Margins Between Blocks: Blocks touch each other directly, often separated only by a stark, 1px or 2px black line (or no line at all, letting the colors clash).
  3. Typography as Texture: Text is placed precisely within these blocks to balance the visual weight of the colors.

Visual DNA

  • Colors: Highly contrasting, bold pairings. Use 3 to 4 strong colors from palettes like Industrial Chic (Red, Black, Grey, White) or custom bold pairings (Yellow, Navy, Pink).
  • Typography: Very clean, bold sans-serifs that can hold their own against massive blocks of color.
  • Borders: Often uses thick black borders (2px solid #000) between blocks to emphasize the grid, reminiscent of Mondrian paintings.

Web Implementation

  • CSS Grid is the only way to effectively build this.
  • CSS Example:
body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: #000;
}

.color-block-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 60vh 40vh;
  /* Thick black lines between blocks */
  gap: 4px;
  background-color: #000; 
  border: 4px solid #000;
  min-height: 100vh;
}

.block {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.block-yellow { background-color: #FACC15; }
.block-white  { background-color: #FFFFFF; }
.block-blue   { background-color: #2563EB; color: #FFF; }
.block-red    { background-color: #EF4444; }

.block-title {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
}

App Implementation

SwiftUI

struct ColorBlockingView: View {
    let gridSpacing: CGFloat = 4 // Thickness of the black lines
    
    var body: some View {
        // Black background acts as the grid lines between blocks
        VStack(spacing: gridSpacing) {
            // Top Row
            HStack(spacing: gridSpacing) {
                ColorBlock(color: .yellow, text: "CREATE", textColor: .black)
                ColorBlock(color: .blue, text: "VISION", textColor: .white)
            }
            .frame(height: 300)
            
            // Bottom Row
            HStack(spacing: gridSpacing) {
                ColorBlock(color: .red, text: "BOLD", textColor: .white)
                    .frame(width: 120) // Fixed narrow block
                ColorBlock(color: .white, text: "MINIMAL", textColor: .black)
            }
        }
        .background(Color.black) // The grid lines
        .border(Color.black, width: gridSpacing) // Outer border
        .ignoresSafeArea()
    }
}

struct ColorBlock: View {
    let color: Color
    let text: String
    let textColor: Color
    var body: some View {
        color
            .overlay(
                Text(text)
                    .font(.system(size: 32, weight: .black))
                    .foregroundColor(textColor)
                    .padding(),
                alignment: .bottomLeading
            )
    }
}
  • In SwiftUI, the easiest way to create Mondrian-style thick black grid lines is to set .background(Color.black) on the parent stack and use spacing: 4. The background peeks through the gaps.
  • .ignoresSafeArea() allows the blocks to bleed to the edge of the physical device.

Flutter

class ColorBlockingScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // Black background creates the grid lines
      backgroundColor: Colors.black,
      body: SafeArea(
        bottom: false,
        child: Column(
          children: [
            // Top Row
            Expanded(
              flex: 3, // 3/5 of vertical space
              child: Row(
                children: [
                  Expanded(flex: 1, child: ColorBlock(color: const Color(0xFFFACC15), text: 'CREATE', textColor: Colors.black)),
                  const SizedBox(width: 4), // Grid line
                  Expanded(flex: 2, child: ColorBlock(color: const Color(0xFF2563EB), text: 'VISION', textColor: Colors.white)),
                ],

…
常见问题

这种技法和普通布局有什么不同?

主要区别在于,它使用大面积、对比强烈的纯色色块来定义结构,而不是依靠细微的元素或渐变。分区是几何化的,线条分明。

可以使用很多颜色吗?

通常使用 3 到 4 种对比强烈的颜色,以保持视觉冲击力和设计的清晰度。

文字在这种设计中应该怎么放?

文字放置在色块之中,既要保证醒目,又要帮助平衡色彩的视觉重量,同时不与色块抢夺注意力。

详情

作者的原始描述

Web and App implementation guide for Color Blocking. Trigger when user wants large color sections, striking layout divisions, and Mondrian-style grids.

repo: sickn33/agentic-awesome-skills

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能