Add color system rules to design standards
Established core color constants: - Pure black: #0a0a0a (never #000000) - White text: #FAFAFA (never #FFFFFF) - Reverse in light mode (bg: #FAFAFA, text: #0a0a0a) Updated: - visual-design-system.mdc: Added core color constants section - visual-design-system.mdc: Updated dark mode CSS variables - code-quality.mdc: Added color consistency checklist These rules ensure consistent color usage across the entire application. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -162,6 +162,12 @@ import './styles.css'
|
|||||||
|
|
||||||
## Code Review Checklist
|
## Code Review Checklist
|
||||||
|
|
||||||
|
### Color Consistency
|
||||||
|
- ✅ Pure black is `#0a0a0a` (not `#000000`)
|
||||||
|
- ✅ White text is `#FAFAFA` (not `#FFFFFF`)
|
||||||
|
- ✅ Colors use CSS variables or design tokens
|
||||||
|
- ✅ Light/dark mode properly implemented
|
||||||
|
|
||||||
### Before Submitting PR
|
### Before Submitting PR
|
||||||
- ✅ Code runs without errors
|
- ✅ Code runs without errors
|
||||||
- ✅ Tests pass
|
- ✅ Tests pass
|
||||||
|
|||||||
@@ -63,6 +63,22 @@ Create depth through semi-transparent layers with backdrop blur.
|
|||||||
|
|
||||||
## Color System Architecture
|
## Color System Architecture
|
||||||
|
|
||||||
|
**Core Color Constants** - Always use these exact values:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const coreColors = {
|
||||||
|
// Pure Black - Use for backgrounds in dark mode
|
||||||
|
black: '#0a0a0a',
|
||||||
|
|
||||||
|
// Pure White Text - Use for text on dark backgrounds
|
||||||
|
white: '#FAFAFA',
|
||||||
|
|
||||||
|
// Note: In light mode, reverse these:
|
||||||
|
// - Background: #FAFAFA
|
||||||
|
// - Text: #0a0a0a
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
**Semantic Color Tokens** - Define colors by purpose, not appearance:
|
**Semantic Color Tokens** - Define colors by purpose, not appearance:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@@ -73,7 +89,7 @@ const colors = {
|
|||||||
},
|
},
|
||||||
neutral: {
|
neutral: {
|
||||||
50: '#FAFAFA',
|
50: '#FAFAFA',
|
||||||
900: '#171717',
|
900: '#0a0a0a',
|
||||||
},
|
},
|
||||||
semantic: {
|
semantic: {
|
||||||
success: '#22C55E',
|
success: '#22C55E',
|
||||||
@@ -82,6 +98,13 @@ const colors = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Color Usage Rules:**
|
||||||
|
- ✅ DO use `#0a0a0a` for pure black backgrounds
|
||||||
|
- ✅ DO use `#FAFAFA` for white text on dark backgrounds
|
||||||
|
- ✅ DO reverse in light mode (bg: `#FAFAFA`, text: `#0a0a0a`)
|
||||||
|
- ❌ DON'T use `#000000` or `#FFFFFF`
|
||||||
|
- ❌ DON'T hardcode colors without using design tokens
|
||||||
|
|
||||||
## Shadow & Glow Systems
|
## Shadow & Glow Systems
|
||||||
|
|
||||||
Use shadows sparingly for depth perception:
|
Use shadows sparingly for depth perception:
|
||||||
@@ -140,16 +163,24 @@ Design with both modes from the start:
|
|||||||
|
|
||||||
```css
|
```css
|
||||||
:root {
|
:root {
|
||||||
--bg-primary: #ffffff;
|
/* Light Mode */
|
||||||
--text-primary: #171717;
|
--bg-primary: #FAFAFA;
|
||||||
|
--text-primary: #0a0a0a;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] {
|
[data-theme="dark"] {
|
||||||
--bg-primary: #171717;
|
/* Dark Mode */
|
||||||
--text-primary: #fafafa;
|
--bg-primary: #0a0a0a;
|
||||||
|
--text-primary: #FAFAFA;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**CRITICAL COLOR RULES:**
|
||||||
|
- Pure black is ALWAYS `#0a0a0a` (not `#000000`)
|
||||||
|
- White text is ALWAYS `#FAFAFA` (not `#FFFFFF`)
|
||||||
|
- These colors reverse in light vs dark mode
|
||||||
|
- Never use pure `#000` or `#FFF`
|
||||||
|
|
||||||
## Hover State Patterns
|
## Hover State Patterns
|
||||||
|
|
||||||
All interactive elements provide immediate feedback:
|
All interactive elements provide immediate feedback:
|
||||||
|
|||||||
Reference in New Issue
Block a user