HomeStylesTemplates
StyleKit
StylesTemplates
  1. Home
  2. /Styles
  3. /Pixel Art
Style Catalog/像素艺术风

像素艺术风

Pixel Art

C
65/100Fair

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.

像素8-bit复古游戏怀旧独立retrovintagenostalgicpixel
View Full Showcase →Templates

Best For

像素 / 8-bit / 复古

Primary Move

Use no border radii rounded-none

Watch Out

Do NOT use any border radii

Showcase Entry

Live preview of the showcase page. Click to explore the full experience.

View Full Showcase →

Color Palette

Primary

#1a1c2c

Secondary

#f4f4f4

Accent 1

#ff004d

Accent 2

#00e436

Accent 3

#29adff

Accent 4

#ffec27

AI ImplementationComponent PreviewReadinessExportsRatings & Feedback

AI Implementation

Copy the Hard Prompt first, then use the spec when needed

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.

Hard Prompt

Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.

When to use

  • -When AI should generate UI directly
  • -When repeated outputs must stay consistent
  • -When style drift is the main risk

How to use

  • -Copy the full prompt
  • -Append the concrete requirement
  • -Review against forbidden rules and UI states
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]`.

Component Templates

Component Preview

按钮

像素风格按钮,Palette Swap 硬切配色 + Pixel Perfect Drop 完全对齐位移

Frontend Readiness

Dark Mode, States, Motion, and Accessibility

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%

Fallback

UI States

79%

Partial

Motion

70%

Partial

A11y

70%

Partial

Performance

35%

Fallback

Key State Coverage

light / dark
HoverFocus VisibleDisabledLoadingEmptyErrorSuccess

Button

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

Implementation Notes

  • This style contains dark-mode signals, but no curated dark token contract has been reviewed.
  • Check contrast in both light and dark modes.
  • Check heavy shadows, blur, large media, and scroll-linked effects manually.
  • No style-specific performance cost profile has been curated yet.
Global Styles

Global CSS

css
/* 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;
}

IDE Integration

IDE Configuration Export

Download configuration files for AI coding assistants to generate code in this style.

Style Pack

Export 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

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.

Accessibility

Accessibility Score

WCAG 2.1 compliance analysis based on color contrast and typography readability.

65

Overall Score

Grade: C - Fair

Contrast Ratios

Score: 58/100Average Ratio: 7.3:1
AA FailAAA Fail
ContextColorsRatioAAAAA
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

Recommended Combinations with Pixel Art

These curated recipes combine this style with layouts and animations, optimized for specific use cases.

Pixel Art Style

8-bit charm for games and nostalgic projects.

pixel-artbento-grid+2
retroplayfulcreative

StyleKit

A curated web design style library to help AI generate better-looking websites.

Navigation

StylesTemplatesGuideBlogChangelog

Resources

UI Design PromptsLanding Page PromptsDashboard PromptsTailwind UI PromptsDark Mode UI PromptsGitHub Repository

Stay Updated

By subscribing, you agree to our Privacy Policy and Terms.


Support Maintenance

If StyleKit helps your workflow, voluntary support helps cover servers, domains, and ongoing upkeep.

Scan to support / View all options

(c) 2026 StyleKit. Open source project.

AboutContactPrivacyTermsBuilt with the Editorial style
Stylekit前端样式库stylekit.top陕ICP备2025065501号-3