Best For
光学 / 幻觉 / 视觉
Op Art
Op Art movement style that uses geometric patterns to create optical illusions and a sense of motion. Black-and-white contrast at its core, supplemented by vibrating color pairs.
Best For
光学 / 幻觉 / 视觉
Primary Move
Use pure black-and-white high contrast bg-black text-white bg-white text-black
Watch Out
Do not use dense optical patterns over large areas causing visual fatigue
Showcase Entry
Live preview of the showcase page. Click to explore the full experience.
Color Palette
Primary
#000000
Secondary
#ffffff
Accent 1
#ff3300
Accent 2
#0066ff
AI Implementation
Use the Hard Prompt by default to generate UI. Use the Design Spec to understand, modify, and review the style. Use the Creative Brief for early exploration.
Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.
When to use
How to use
STYLEKIT_STYLE_REFERENCE
style_name: Op Art
style_slug: op-art
style_source: /styles/op-art
# Hard Prompt
## When To Use
Use this when you want AI to generate code with strict style consistency. It is the safest default for production UI.
## How To Use
- Copy the full prompt into ChatGPT, Claude, Cursor, or another coding assistant.
- Append the concrete product/page requirement after the prompt.
- After generation, check the forbidden rules and interaction states before accepting the output.
Strictly follow the style rules below and maintain consistency. No style drift allowed.
## Requirements
- Prioritize style consistency first, then creative extension.
- When conflicts arise, treat prohibitions as the highest priority.
- Self-check before output: verify colors, typography, spacing, and interactions still match this style.
## Style Rules
You are an Op Art design style frontend development expert. All generated code must strictly follow these constraints:
## Absolutely Forbidden
- Rounded corners rounded-lg rounded-xl rounded-full
- Soft shadows shadow-sm shadow-md shadow-lg
- Gradients bg-gradient-to-*
- Serif fonts font-serif
- Semi-transparency and blur effects opacity-50 backdrop-blur
- Dense optical patterns over large areas (causes visual fatigue)
## Must Follow
- Pure black bg-black text-black border-black
- Pure white bg-white text-white
- Sharp geometry rounded-none
- Sans-serif fonts font-sans font-medium
- Wide letter spacing tracking-wider tracking-[0.3em]
- Uppercase typography uppercase
- Large areas of whitespace to balance visual intensity
- Optical patterns as localized decoration, not full coverage
## Color Palette
Black and white dominant (90% area):
- Pure black: #000000
- Pure white: #ffffff
Vibrating color pairs (10% accents):
- Red: #ff3300
- Blue: #0066ff
- Yellow: #ffcc00
## Decorative Elements
- Concentric circle patterns
- Checkerboards
- Stripe patterns
- Moire fringes
- Geometric lines
## Animation & Interaction Rules
- Illusion Generation: Cards use group class; inner concentric circle decorations group-hover:animate-[spin_4s_linear_infinite], static geometry becomes dynamic illusion. Do not rotate in non-hover state (avoid visual pollution).
- Harsh Strobe: On hover, invert black-and-white hover:bg-black hover:text-white transition-colors duration-150. Must be a hard cut, no smooth gradients.
- Warp & Distort: Headings on group-hover apply skew distortion group-hover:-skew-x-12 transition-transform duration-150, creating spatial illusion.
- Brutal Action: Active state instantly switches to warning red active:bg-[#ff3300] active:border-[#ff3300], no transition, simulating a blinding flash.Component Templates
欧普艺术风格按钮,Harsh Strobe 黑白硬切 + Brutal Action 警示红闪爆
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
51%
Fallback
Dark Mode
0%
MissingUI States
79%
PartialMotion
70%
PartialA11y
70%
PartialPerformance
35%
FallbackButton
Default / Hover / Focus Visible / Active / Disabled
Input
Default / Hover / Focus Visible / Disabled / Error
Card
Default / Hover / Focus Visible / Loading / Skeleton
Form
Default / Focus Visible / Disabled / Loading / Error
/* Op Art 全局样式 */
:root {
--op-black: #000000;
--op-white: #ffffff;
--op-red: #ff3300;
--op-blue: #0066ff;
--op-yellow: #ffcc00;
}
/* 同心圆图案 */
.op-concentric {
background-image: repeating-radial-gradient(
circle at center,
transparent 0px,
transparent 8px,
var(--op-black) 8px,
var(--op-black) 10px
);
}
/* 棋盘格 */
.op-checkerboard {
background-image:
linear-gradient(45deg, var(--op-black) 25%, transparent 25%),
linear-gradient(-45deg, var(--op-black) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--op-black) 75%),
linear-gradient(-45deg, transparent 75%, var(--op-black) 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
/* 条纹图案 */
.op-stripes {
background-image: repeating-linear-gradient(
0deg,
var(--op-black) 0px,
var(--op-black) 4px,
var(--op-white) 4px,
var(--op-white) 8px
);
}
/* 莫尔条纹效果 */
.op-moire {
background-image:
repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px),
repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
}
/* 振动色彩边框 */
.op-vibrant-border {
border: 3px solid var(--op-red);
outline: 3px solid var(--op-blue);
outline-offset: 3px;
}
@keyframes op-art-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes op-art-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.op-art-card {
position: relative;
overflow: hidden;
}
.op-art-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), transparent);
pointer-events: none;
}
.op-art-card:hover::before {
opacity: 1;
}
.op-art-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(0, 0, 0, 0.08);
}
.op-art-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.op-art-animate-in {
animation: op-art-fade-in 0.5s ease-out both;
}IDE Integration
Download configuration files for AI coding assistants to generate code in this style.
Style Pack
Get complete machine-readable style assets including design tokens, Tailwind presets, CSS variables, and shadcn/ui themes.
Metadata
Style metadata including version information
Design Tokens
Compatible with Figma / Style Dictionary / Tokens Studio
Tailwind Preset
Tailwind CSS theme preset, import directly in config
Global CSS
CSS variables and base styles
shadcn Theme
shadcn/ui theme configuration
CSS Variables
Pure CSS variables, works with any project
SKILL.md
Loadable skill pack for Cursor / Claude Code / VS Code
Op Art (Optical Art) emerged in the 1960s, championed by Bridget Riley and Victor Vasarely. It uses precisely calculated geometric patterns to create visual illusions of movement, vibration, and depth on a two-dimensional surface, challenging the viewer's perceptual system.
WCAG 2.1 compliance analysis based on color contrast and typography readability.
Overall Score
Grade: C - Fair
Contrast Ratios
| Context | Colors | Ratio | AA | AAA |
|---|---|---|---|---|
| Text on background | /#000000 / #ffffff | 21:1 | ||
| Secondary text on background | /#ffffff / #ffffff | 1:1 | ||
| Text on secondary background | /#000000 / #000000 | 1:1 | ||
| Secondary text on secondary | /#ffffff / #000000 | 21:1 | ||
| Button primary | /#ffffff / #000000 | 21:1 | ||
| Text on accent 1 | /#000000 / #ff3300 | 5.73:1 | ||
| Alt text on accent 1 | /#ffffff / #ff3300 | 3.67:1 | ||
| Text on accent 2 | /#000000 / #0066ff | 4.34:1 | ||
| Alt text on accent 2 | /#ffffff / #0066ff | 4.83:1 | ||
| Text on accent 3 | /#000000 / #ffcc00 | 13.89:1 | ||
| Alt text on accent 3 | /#ffffff / #ffcc00 | 1.51:1 |
Readability
Score
87/100
Font Size
text-sm md:text-base
Font Weight
font-sans font-bold uppercase tracking-[0.3em]
Line Height
default
Scoring is based on WCAG 2.1 standards. AA requires 4.5:1 contrast for normal text, 3:1 for large text; AAA requires 7:1 for normal text, 4.5:1 for large text.