Best For
pixel art / 8-bit design / retro game website
A retro 8-bit pixel game style with no border radii, pixelated borders, hard-edge shadows, and vivid 8-bit color palettes, ideal for games, retro apps, and indie developer projects.
Best For
pixel art / 8-bit design / retro game website
Primary Move
Use no border radii rounded-none
Watch Out
Do NOT use any border radii
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: Pixel Art
style_slug: pixel-art
style_source: /styles/pixel-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 a Pixel Art design style frontend development expert. All generated code must strictly follow these constraints:
## Absolute Prohibitions
- Using any border radii rounded-* (must be rounded-none)
- Using gradients bg-gradient-*
- Using soft shadows shadow-lg, shadow-xl
- Using thin borders border, border-2
- Using non-8-bit palette colors
## Must Follow
- No border radii rounded-none
- Thick borders border-4 border-[#1a1c2c]
- Hard-edge shadows shadow-[4px_4px_0_#1a1c2c]
- 8-bit palette colors
- Uppercase letters uppercase
- Button press effects
## Color Palette (PICO-8)
Primary:
- Dark blue-black: #1a1c2c
- Light gray: #f4f4f4
Accent colors:
- Red: #ff004d
- Green: #00e436
- Blue: #29adff
- Yellow: #ffec27
- Orange: #ffa300
- Pink: #ff77a8
- Purple: #7e2553
## Shadows
Standard shadow: shadow-[4px_4px_0_#1a1c2c]
Hover shadow: shadow-[2px_2px_0_#1a1c2c]
Colored shadow: shadow-[4px_4px_0_#ff004d]
## Button Interaction
Normal: shadow-[4px_4px_0_#1a1c2c]
Hover: translate-x-1 translate-y-1 shadow-[2px_2px_0_#1a1c2c]
Pressed: translate-x-1 translate-y-1 shadow-none
## Self-Check
After generating code, verify:
1. No border radii anywhere
2. Using thick borders border-4
3. Using hard-edge shadows
4. Colors from 8-bit palette
5. Overall feel is retro and pixelated
## Animation & Interaction Rules
- Absolute Zero: Every element must use `transition-none` -- pixel games run on a state machine, not an animation engine. All visual changes are instantaneous hard cuts with no easing.
- Palette Swap: Hover replaces the primary palette color with another 8-bit color directly (e.g., `hover:bg-[#29adff]` replacing red with blue). Never use opacity transitions or intermediate states.
- Pixel Perfect Drop: Active state must be `active:translate-x-[4px] active:translate-y-[4px] active:shadow-none` -- the pixel displacement amount MUST exactly equal the shadow offset. Mismatched values break the illusion.
- Outline Focus: Focus state uses inner color shadow instead of modern ring glow: `focus:shadow-[inset_0_0_0_3px_#29adff]`.
---
# Pixel Art Design System
> A retro 8-bit pixel game style with no border radii, pixelated borders, hard-edge shadows, and vivid 8-bit color palettes, ideal for games, retro apps, and indie developer projects.
## Design Philosophy
Pixel Art is a retro design style originating from early video games, evoking nostalgic feelings for classic games through pixelated visual elements, hard-edge shadows, and vivid 8-bit color palettes.
Core principles:
- Pixel feel: All elements present pixelated sharp edges
- Hard-edge shadows: Pure color offset shadows simulate pixel effects
- 8-bit palette: Classic game console color palettes
- Nostalgic emotion: Evoke fond memories of classic games
---
## Token Dictionary (exact class mapping)
### Border
```
Width: border-4
Color: border-[#1a1c2c]
Radius: rounded-none
```
### Shadow
```
sm: shadow-[2px_2px_0_#1a1c2c]
md: shadow-[4px_4px_0_#1a1c2c]
lg: shadow-[6px_6px_0_#1a1c2c]
hover: hover:shadow-[2px_2px_0_#1a1c2c]
focus: focus:shadow-[4px_4px_0_#1a1c2c]
```
### Interaction
```
Hover translate: hover:translate-x-1 hover:translate-y-1
Hover scale: (none)
Hover opacity: (none)
Transition: transition-transform duration-100
Active: active:translate-x-1 active:translate-y-1 active:shadow-none
```
### Typefaces
```
Heading: font-bold uppercase tracking-wider text-[#1a1c2c]
Body: text-[#1a1c2c]
Mono: font-mono text-[#1a1c2c]
```
### Type scale
```
Hero: text-3xl md:text-5xl
H1: text-2xl md:text-4xl
H2: text-xl md:text-2xl
H3: text-lg md:text-xl
Body: text-base
Small: text-sm
```
### Spacing
```
Section: py-12 md:py-20
Container: px-4 md:px-8
Card: p-4 md:p-6
Gap sm: gap-4
Gap md: gap-6
Gap lg: gap-8
```
### Color roles
```
Background primary: bg-[#f4f4f4]
Background secondary: bg-white
Background accent: bg-[#ff004d], bg-[#00e436], bg-[#29adff], bg-[#ffec27]
Text primary: text-[#1a1c2c]
Text secondary: text-[#5f574f]
Text muted: text-[#8b8680]
Button primary: bg-[#ff004d] text-white
Button secondary: bg-[#29adff] text-white
```
---
## [FORBIDDEN]
These classes are banned in this style. Check for them before returning code:
### Banned classes
- `rounded-lg`
- `rounded-xl`
- `rounded-2xl`
- `rounded-3xl`
- `rounded-full`
- `shadow-lg`
- `shadow-xl`
- `shadow-2xl`
- `bg-gradient-to-r`
- `bg-gradient-to-br`
### Banned patterns
- matches `^rounded-(?:sm|md|lg|xl|2xl|3xl|full)`
- matches `^shadow-(?:lg|xl|2xl)`
- matches `^bg-gradient`
### Why they are banned
- `rounded-lg`: Pixel art style requires sharp corners (rounded-none)
- `rounded-full`: Pixel art style requires sharp corners (rounded-none)
- `shadow-lg`: Pixel art style uses hard-edge pixel shadows
- `bg-gradient-to-r`: Pixel art style uses solid 8-bit colors, not gradients
> WARNING: if your code contains any of the above, replace it before shipping.
---
## [REQUIRED]
### Every button must include
```
px-6 py-3
bg-[#ff004d]
border-4 border-[#1a1c2c]
rounded-none
text-white font-bold uppercase
shadow-[4px_4px_0_#1a1c2c]
hover:translate-x-1 hover:translate-y-1 hover:shadow-[2px_2px_0_#1a1c2c]
active:translate-x-1 active:translate-y-1 active:shadow-none
transition-all duration-100
```
### Every card must include
```
bg-white
border-4 border-[#1a1c2c]
rounded-none
shadow-[4px_4px_0_#1a1c2c]
```
### Every input must include
```
bg-white
border-4 border-[#1a1c2c]
rounded-none
text-[#1a1c2c] placeholder-[#8b8680]
focus:outline-none focus:shadow-[inset_0_0_0_2px_#29adff]
transition-all
```
---
## [COMPARE] Pixel Art wrong vs right
The wrong examples below stand for generic library defaults that were never adapted to this style. Do not read them as visual suggestions.
### Button
[WRONG] **Wrong** (generic component library default, do not copy):
```html
<button class="{GENERIC_LIBRARY_BUTTON_DEFAULT}">
Click me
</button>
```
[CORRECT] **Right** (uses this style's tokens):
```html
<button class="px-6 py-3 bg-[#ff004d] border-4 border-[#1a1c2c] rounded-none text-white font-bold uppercase shadow-[4px_4px_0_#1a1c2c] hover:translate-x-1 hover:translate-y-1 hover:shadow-[2px_2px_0_#1a1c2c] active:translate-x-1 active:translate-y-1 active:shadow-none transition-all duration-100 bg-[#ff004d] text-white">
Click me
</button>
```
### Card
[WRONG] **Wrong** (generic card, not adapted to this style):
```html
<div class="{GENERIC_LIBRARY_CARD_DEFAULT}">
<h3>{TITLE}</h3>
</div>
```
[CORRECT] **Right** (uses this style's card tokens):
```html
<div class="bg-white border-4 border-[#1a1c2c] rounded-none shadow-[4px_4px_0_#1a1c2c] p-4 md:p-6">
<h3 class="font-bold uppercase tracking-wider text-[#1a1c2c] text-lg md:text-xl">{TITLE}</h3>
</div>
```
### Input
[WRONG] **Wrong** (generic input, not adapted to this style):
```html
<input class="{GENERIC_LIBRARY_INPUT_DEFAULT}" />
```
[CORRECT] **Right** (uses this style's input tokens):
```html
<input class="bg-white border-4 border-[#1a1c2c] rounded-none text-[#1a1c2c] placeholder-[#8b8680] focus:outline-none focus:shadow-[inset_0_0_0_2px_#29adff] transition-all" placeholder="{PLACEHOLDER}" />
```
---
## [TEMPLATES] Pixel Art page skeletons
These skeletons use this style's tokens only. Replace `{PLACEHOLDER}` values, but keep every token in place:
### Navigation
```html
<nav class="bg-[#f4f4f4] text-[#1a1c2c] border-4 border-[#1a1c2c] px-4 md:px-8">
<div class="flex items-center justify-between max-w-6xl mx-auto gap-6">
<a href="/" class="font-bold uppercase tracking-wider text-[#1a1c2c] text-lg md:text-xl">
{LOGO_TEXT}
</a>
<div class="flex gap-6 text-[#1a1c2c] text-sm">
{NAV_LINKS}
</div>
</div>
</nav>
```
### Hero section
```html
<section class="bg-[#ff004d] text-[#1a1c2c] py-12 md:py-20 px-4 md:px-8">
<div class="max-w-4xl mx-auto">
<h1 class="font-bold uppercase tracking-wider text-[#1a1c2c] text-3xl md:text-5xl">
{HEADLINE}
</h1>
<p class="text-[#1a1c2c] text-base max-w-xl">
{SUBHEADLINE}
</p>
<button class="px-6 py-3 bg-[#ff004d] border-4 border-[#1a1c2c] rounded-none text-white font-bold uppercase shadow-[4px_4px_0_#1a1c2c] hover:translate-x-1 hover:translate-y-1 hover:shadow-[2px_2px_0_#1a1c2c] active:translate-x-1 active:translate-y-1 active:shadow-none transition-all duration-100 bg-[#ff004d] text-white">
{CTA_TEXT}
</button>
</div>
</section>
```
### Card grid
```html
<section class="bg-[#f4f4f4] text-[#1a1c2c] py-12 md:py-20 px-4 md:px-8">
<div class="max-w-6xl mx-auto">
<h2 class="font-bold uppercase tracking-wider text-[#1a1c2c] text-xl md:text-2xl">{SECTION_TITLE}</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Card template - repeat for each card -->
<div class="bg-white border-4 border-[#1a1c2c] rounded-none shadow-[4px_4px_0_#1a1c2c] p-4 md:p-6">
<h3 class="font-bold uppercase tracking-wider text-[#1a1c2c] text-lg md:text-xl">{CARD_TITLE}</h3>
<p class="text-[#1a1c2c] text-base text-[#8b8680]">{CARD_DESCRIPTION}</p>
</div>
</div>
</div>
</section>
```
### Form input
```html
<input class="bg-white border-4 border-[#1a1c2c] rounded-none text-[#1a1c2c] placeholder-[#8b8680] focus:outline-none focus:shadow-[inset_0_0_0_2px_#29adff] transition-all" placeholder="{PLACEHOLDER}" />
```
### Footer
```html
<footer class="bg-white text-[#5f574f] py-12 md:py-20 px-4 md:px-8">
<div class="max-w-6xl mx-auto">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div>
<span class="font-bold uppercase tracking-wider text-[#1a1c2c] text-lg md:text-xl">{LOGO_TEXT}</span>
<p class="text-[#1a1c2c] text-sm">{TAGLINE}</p>
</div>
<div>
<h4 class="font-bold uppercase tracking-wider text-[#1a1c2c] text-lg md:text-xl">{COLUMN_TITLE}</h4>
<ul class="text-[#1a1c2c] text-sm">
{FOOTER_LINKS}
</ul>
</div>
</div>
</div>
</footer>
```
---
## [CHECKLIST] Pixel Art post-generation self check
**Before returning code, verify every token and rule below. Fix any violation before delivering:**
### Token check
- [ ] Button includes: `px-6 py-3 bg-[#ff004d] border-4 border-[#1a1c2c] rounded-none text-white font-bold uppercase shadow-[4px_4px_0_#1a1c2c] hover:translate-x-1 hover:translate-y-1 hover:shadow-[2px_2px_0_#1a1c2c] active:translate-x-1 active:translate-y-1 active:shadow-none transition-all duration-100`
- [ ] Card includes: `bg-white border-4 border-[#1a1c2c] rounded-none shadow-[4px_4px_0_#1a1c2c]`
- [ ] Input includes: `bg-white border-4 border-[#1a1c2c] rounded-none text-[#1a1c2c] placeholder-[#8b8680] focus:outline-none focus:shadow-[inset_0_0_0_2px_#29adff] transition-all`
### Forbidden check
- [ ] Not using `rounded-lg`
- [ ] Not using `rounded-xl`
- [ ] Not using `rounded-2xl`
- [ ] Not using `rounded-3xl`
- [ ] Not using `rounded-full`
- [ ] Not using `shadow-lg`
- [ ] Not using `shadow-xl`
- [ ] Not using `shadow-2xl`
### Style rule check
- [ ] Use no border radii rounded-none
- [ ] Use thick borders border-4
- [ ] Use hard-edge shadows shadow-[4px_4px_0_color]
- [ ] Use 8-bit palette colors
- [ ] Use pixel fonts or monospace fonts
### Style drift check
- [ ] Does not violate: Do NOT use any border radii
- [ ] Does not violate: Do NOT use gradients
- [ ] Does not violate: Do NOT use soft shadows
- [ ] Does not violate: Do NOT use overly complex colors
- [ ] Does not violate: Do NOT use thin borders
### Delivery check
- [ ] Responsive layout holds on phone, tablet and desktop with no horizontal overflow
- [ ] Every interactive element has a visible focus state, an accessible name and a reduced-motion path
- [ ] Text contrast meets WCAG AA and colour alone never carries state
- [ ] The result is still recognizable at a glance as Pixel Art
## Absolute Bans (Match and Refuse)
If any of the following patterns appear, it is a style violation — rewrite without exception.
- use any border radii
- use gradients
- use soft shadows
- use overly complex colors
- use thin borders
- use any transition-* except transition-none (pixel games are state machines, not animation engines)
- use opacity transitions or intermediate states in Palette Swap (color switches must be hard cuts)
- make active displacement smaller than shadow offset (Pixel Perfect Drop requires exact alignment, otherwise pixel feel is broken)
## Self-Check (Verify Before Shipping)
If any item fails, the style has drifted — fix before shipping.
- [ ] No purple-to-blue gradients
- [ ] No overused fonts (Inter, Roboto, Geist, Fraunces, Plus Jakarta Sans)
- [ ] No nested cards (cards inside cards)
- [ ] No gray text on colored backgrounds
- [ ] Body text contrast meets WCAG AA (>= 4.5:1)
- [ ] No bounce or elastic easing curves
- [ ] Animations have a prefers-reduced-motion fallback
- [ ] Body text line length capped at 65-75 characters
- [ ] No side-stripe accent borders (border-left/right > 1px)
- [ ] No gradient text (background-clip: text)
- [ ] No glassmorphism used as the default surface treatment
- [ ] No tiny uppercase tracked eyebrow labels above every section heading
- [ ] do NOT use any border radii
- [ ] do NOT use gradients
- [ ] do NOT use soft shadows
- [ ] do NOT use overly complex colors
- [ ] do NOT use thin bordersMore prompt libraries: All UI Prompts · Tailwind UI Prompts · Dark Mode UI Prompts
Component Templates
像素风格按钮,Palette Swap 硬切配色 + Pixel Perfect Drop 完全对齐位移
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
58%
Fallback
Dark Mode
35%
FallbackUI 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
FAQ
/* Pixel Art 全局样式 */
:root {
--pixel-dark: #1a1c2c;
--pixel-light: #f4f4f4;
--pixel-red: #ff004d;
--pixel-green: #00e436;
--pixel-blue: #29adff;
--pixel-yellow: #ffec27;
--pixel-orange: #ffa300;
--pixel-pink: #ff77a8;
--pixel-purple: #7e2553;
}
/* 像素化渲染 */
.pixel-render {
image-rendering: pixelated;
image-rendering: crisp-edges;
}
/* 像素字体(需要引入 Press Start 2P 字体) */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
.pixel-font {
font-family: 'Press Start 2P', monospace;
}
/* 像素边框 */
.pixel-border {
border: 4px solid var(--pixel-dark);
border-radius: 0;
}
/* 像素阴影 */
.pixel-shadow {
box-shadow: 4px 4px 0 var(--pixel-dark);
}
/* 像素按钮效果 */
.pixel-button {
border: 4px solid var(--pixel-dark);
border-radius: 0;
box-shadow: 4px 4px 0 var(--pixel-dark);
transition: all 0.1s ease;
}
.pixel-button:hover {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0 var(--pixel-dark);
}
.pixel-button:active {
transform: translate(4px, 4px);
box-shadow: none;
}
/* 像素闪烁动画 */
@keyframes pixel-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.pixel-blink {
animation: pixel-blink 1s step-end infinite;
}
.pixel-art-card {
position: relative;
overflow: hidden;
}
.pixel-art-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(26, 28, 44, 0.05), transparent);
pointer-events: none;
}
.pixel-art-card:hover::before {
opacity: 1;
}
.pixel-art-gradient {
background: linear-gradient(135deg, #1a1c2c, #ff004d);
}
.pixel-art-gradient-text {
background: linear-gradient(135deg, #1a1c2c, #ff004d);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.pixel-art-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(26, 28, 44, 0.08);
}
.pixel-art-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.pixel-art-animate-in {
animation: pixel-art-fade-in 0.5s ease-out both;
}Related Styles
Explore these styles for ready-made tokens and components.
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
Pixel Art is a retro design style originating from early video games, evoking nostalgic feelings for classic games through pixelated visual elements, hard-edge shadows, and vivid 8-bit color palettes.
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 | /#1a1c2c / #f4f4f4 | 15.32:1 | ||
| Secondary text on background | /#5f574f / #f4f4f4 | 6.44:1 | ||
| Muted text on background | /#8b8680 / #f4f4f4 | 3.28:1 | ||
| Text on secondary background | /#1a1c2c / #ffffff | 16.85:1 | ||
| Secondary text on secondary | /#5f574f / #ffffff | 7.09:1 | ||
| Button primary | /#ffffff / #ff004d | 3.92:1 | ||
| Text on accent 1 | /#1a1c2c / #ff004d | 4.3:1 | ||
| Alt text on accent 1 | /#5f574f / #ff004d | 1.81:1 | ||
| Text on accent 2 | /#1a1c2c / #00e436 | 9.75:1 | ||
| Alt text on accent 2 | /#5f574f / #00e436 | 4.1:1 | ||
| Text on accent 3 | /#1a1c2c / #29adff | 6.83:1 | ||
| Alt text on accent 3 | /#5f574f / #29adff | 2.87:1 | ||
| Text on accent 4 | /#1a1c2c / #ffec27 | 13.86:1 | ||
| Alt text on accent 4 | /#5f574f / #ffec27 | 5.83:1 |
Readability
Score
82/100
Font Size
text-base
Font Weight
font-bold uppercase tracking-wider text-[#1a1c2c]
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.
Design Recipes
These curated recipes combine this style with layouts and animations, optimized for specific use cases.