Export & Integration Guide
Table of Contents
Export Formats & Professional Usage
Choose the right export format for your specific workflow and integration needs.
CSS Variables
Best for: Modern web development, CSS-in-JS, component libraries
Generated Code:
:root {
--primary-color: #3498db;
--secondary-color: #2ecc71;
--accent-color: #e74c3c;
--neutral-light: #ecf0f1;
--neutral-dark: #34495e;
}
Implementation:
- Copy the generated CSS variables
- Add to your main CSS file or design system
- Reference variables throughout your stylesheets
- Update colors by changing variable values only
Practical Usage:
.button-primary {
background-color: var(--primary-color);
color: var(--neutral-light);
border: 2px solid var(--primary-color);
}
.button-primary:hover {
background-color: var(--neutral-light);
color: var(--primary-color);
}
SCSS/Sass Variables
Best for: Projects using CSS preprocessors, design systems with computed values
Generated Code:
$primary-color: #3498db;
$secondary-color: #2ecc71;
$accent-color: #e74c3c;
$neutral-light: #ecf0f1;
$neutral-dark: #34495e;
Advanced SCSS Integration:
// Color palette
@import 'colors';
// Generate tints and shades
$primary-light: lighten($primary-color, 20%);
$primary-dark: darken($primary-color, 20%);
// Create color maps for systematic usage
$colors: (
'primary': (
'base': $primary-color,
'light': $primary-light,
'dark': $primary-dark
),
'secondary': (
'base': $secondary-color,
'light': lighten($secondary-color, 20%),
'dark': darken($secondary-color, 20%)
)
);
// Function to get colors
@function color($color-name, $variant: 'base') {
@return map-get(map-get($colors, $color-name), $variant);
}
JSON
Best for: APIs, programmatic usage, design token systems, React/Vue applications
Generated Code:
{
"colors": {
"primary": {
"hex": "#3498db",
"rgb": [52, 152, 219],
"hsl": [204, 70, 53]
},
"secondary": {
"hex": "#2ecc71",
"rgb": [46, 204, 113],
"hsl": [145, 63, 49]
},
"accent": {
"hex": "#e74c3c",
"rgb": [231, 76, 60],
"hsl": [6, 78, 57]
}
},
"metadata": {
"created": "2024-01-15T10:30:00Z",
"version": "1.0.0",
"theme": "professional-blue"
}
}
JavaScript Integration:
import colors from './palette.json';
// React component usage
const Button = ({ variant = 'primary' }) => (
<button style={{
backgroundColor: colors.colors[variant].hex,
color: colors.colors.neutral.hex
}}>
Click me
</button>
);
// Generate CSS programmatically
const generateCSS = () => {
return Object.entries(colors.colors)
.map(([name, color]) => `--${name}: ${color.hex};`)
.join('\n');
};
Tailwind CSS Configuration
Best for: Tailwind CSS projects, utility-first frameworks
Generated Code:
module.exports = {
theme: {
extend: {
colors: {
'brand-primary': '#3498db',
'brand-secondary': '#2ecc71',
'brand-accent': '#e74c3c',
'neutral': {
'light': '#ecf0f1',
'dark': '#34495e'
}
}
}
}
}
Usage in HTML:
<!-- Background colors -->
<div class="bg-brand-primary text-white">Primary Section</div>
<!-- Border colors -->
<button class="border-2 border-brand-secondary">Button</button>
<!-- Text colors -->
<h1 class="text-brand-accent">Heading</h1>
PNG Image
Best for: Presentations, mood boards, client previews, design documentation
Image Features:
- High-resolution color swatches
- Hex codes displayed below each color
- Professional layout suitable for presentations
- Transparent background for easy overlay
Best Practices:
- Use for client presentations and approvals
- Include in design documentation
- Share with non-technical stakeholders
- Embed in style guides and brand guidelines
Integration Workflows by Platform
Step-by-step workflows for integrating your color palettes into different development and design environments.
Web Development Integration
React/Next.js Projects
Step 1: Export as JSON
Download your palette in JSON format for programmatic access.
Step 2: Create Theme File
// theme/colors.js
export const colors = {
primary: '#3498db',
secondary: '#2ecc71',
accent: '#e74c3c',
neutral: {
50: '#f8f9fa',
100: '#ecf0f1',
900: '#34495e'
}
};
Step 3: Styled Components Integration
import styled from 'styled-components';
import { colors } from '../theme/colors';
export const Button = styled.button`
background-color: ${colors.primary};
color: ${colors.neutral[50]};
border: 2px solid ${colors.primary};
&:hover {
background-color: ${colors.neutral[50]};
color: ${colors.primary};
}
`;
Step 4: CSS Variables Generation
// utils/generateCSSVars.js
export const generateCSSVariables = () => {
const root = document.documentElement;
Object.entries(colors).forEach(([key, value]) => {
if (typeof value === 'object') {
Object.entries(value).forEach(([variant, color]) => {
root.style.setProperty(`--${key}-${variant}`, color);
});
} else {
root.style.setProperty(`--${key}`, value);
}
});
};
Vue.js/Nuxt.js Projects
Step 1: SCSS Variables Integration
// assets/scss/colors.scss
$primary-color: #3498db;
$secondary-color: #2ecc71;
$accent-color: #e74c3c;
// Export as CSS custom properties
:root {
--primary-color: #{$primary-color};
--secondary-color: #{$secondary-color};
--accent-color: #{$accent-color};
}
Step 2: Nuxt Configuration
// nuxt.config.js
export default {
css: ['~/assets/scss/colors.scss'],
styleResources: {
scss: ['~/assets/scss/colors.scss']
}
}
Step 3: Component Usage
<template>
<button class="btn-primary">Click Me</button>
</template>
<style scoped>
.btn-primary {
background-color: var(--primary-color);
color: white;
border: 2px solid var(--primary-color);
}
</style>
Design Tool Integration
Figma Integration
Step 1: Manual Color Addition
- Copy hex codes from your exported palette
- In Figma, select the fill tool
- Click the "+" next to Local styles
- Paste hex code and name your color
- Repeat for all colors in your palette
Step 2: Figma Plugin Usage
Use plugins like "Design Tokens" or "Figma to Code" for automated import:
- Install the "Design Tokens" plugin
- Upload your JSON export
- Auto-generate Figma color styles
- Sync with development tokens
Step 3: Team Library Publishing
- Create your color styles in a dedicated file
- Click "Publish styles" in the assets panel
- Add descriptive names and documentation
- Team members can then subscribe to updates
Accessibility Implementation Guide
Ensure your exported color palettes meet accessibility standards and provide inclusive user experiences.
WCAG Compliance Implementation
Practical steps to ensure your color choices meet Web Content Accessibility Guidelines.
WCAG AA (Standard Compliance)
Contrast Requirements:
- Normal text: 4.5:1 minimum ratio
- Large text: 3:1 minimum ratio
- UI components: 3:1 minimum ratio
Implementation Example:
/* Good: High contrast text */
.accessible-text {
color: #333333; /* Dark gray */
background-color: #ffffff; /* White */
/* Contrast ratio: 12.6:1 - Exceeds AA requirements */
}
/* Good: Large text with lower contrast */
.large-heading {
color: #666666; /* Medium gray */
background-color: #ffffff; /* White */
font-size: 24px;
/* Contrast ratio: 5.7:1 - Meets AA large text requirements */
}
WCAG AAA (Enhanced Compliance)
Contrast Requirements:
- Normal text: 7:1 minimum ratio
- Large text: 4.5:1 minimum ratio
- Enhanced visibility for low vision users
Implementation Example:
/* AAA compliant text */
.enhanced-accessibility {
color: #000000; /* Pure black */
background-color: #ffffff; /* Pure white */
/* Contrast ratio: 21:1 - Meets AAA requirements */
}
/* AAA compliant colored text */
.aaa-colored-text {
color: #1a365d; /* Very dark blue */
background-color: #ffffff; /* White */
/* Contrast ratio: 12.4:1 - Exceeds AAA requirements */
}
Testing Tools and Validation
Professional tools and methods for validating color accessibility.
Automated Testing Tools
WebAIM Contrast Checker
Free online tool for checking contrast ratios.
- Enter foreground and background colors
- Get instant WCAG compliance results
- Suggestions for improvement
- Batch testing capabilities
Colour Contrast Analyser (CCA)
Desktop application for precise color analysis.
- Eyedropper for any screen element
- Real-time contrast ratio calculation
- Color blindness simulation
- Professional reporting features
axe DevTools
Browser extension for comprehensive accessibility testing.
- Automated page scanning
- Color contrast issue detection
- Integration with development workflow
- Detailed remediation guidance
Color Vision Simulation
Colorblinding (Browser Extension)
Real-time color vision deficiency simulation.
- Toggle between different CVD types
- Works on any webpage
- Easy switching between normal and simulated vision
- Available for Chrome, Firefox, Safari
Sim Daltonism (macOS)
System-wide color vision simulation for Mac.
- Floating window showing simulated view
- Multiple CVD type support
- Works with any application
- Real-time preview updates
Sharing & Team Collaboration
Effective strategies for sharing color palettes and maintaining consistency across teams and projects.
Palette Sharing Methods
Team Workflow Integration
Design-Development Handoff
Streamline the process of transferring color specifications from design to development teams.
1. Design Phase
- Create and refine color palette
- Test accessibility compliance
- Document usage guidelines
- Get stakeholder approval
2. Documentation
- Export palette as JSON for developers
- Generate PNG for visual reference
- Create usage documentation
- Specify contrast requirements
3. Implementation
- Developers import JSON data
- Generate CSS variables/constants
- Implement in component library
- Set up automated testing
4. Quality Assurance
- Visual comparison with designs
- Accessibility testing
- Cross-browser verification
- Design team approval
Client Collaboration
Effective methods for collaborating with clients on color selection and approval.
Initial Presentation
- Share 3-5 palette options via URLs
- Include PNG exports for offline viewing
- Provide context about color psychology
- Explain accessibility considerations
Feedback Collection
- Use shared URLs for specific comments
- Document preferences and concerns
- Address accessibility questions
- Explain technical constraints
Revision Process
- Create refined options based on feedback
- Share new URLs for comparison
- Show palettes in context mockups
- Validate against brand guidelines
Final Approval
- Deliver comprehensive style guide
- Provide all export formats
- Document usage guidelines
- Set up maintenance procedures
Troubleshooting Common Issues
Solutions to frequently encountered problems when exporting and implementing color palettes.
Export and File Issues
Downloaded file appears corrupted or won't open
Symptoms: File downloads but won't open, shows error messages, or appears empty.
Common Causes:
- Browser blocking download due to security settings
- Antivirus software interfering with file creation
- Insufficient storage space
- Network interruption during download
Solutions:
- Check browser permissions: Ensure downloads are allowed for the site
- Try different browser: Test with Chrome, Firefox, or Safari
- Disable ad blockers: Temporarily disable extensions that might interfere
- Clear browser cache: Refresh the page and try again
- Check storage space: Ensure adequate disk space available
- Download one format at a time: Avoid bulk downloads if issues persist
Colors appear different in exported files
Symptoms: Exported colors don't match what was displayed in the generator.
Common Causes:
- Color profile differences between displays
- Color space conversion issues
- Monitor calibration variations
- Software color management settings
Solutions:
- Use hex codes as reference: Hex values are absolute and don't change
- Calibrate your monitor: Use built-in calibration tools
- Check color profiles: Ensure sRGB is used for web work
- Test on multiple devices: Verify colors on different screens
- Use color management: Enable color management in your applications
Integration Problems
CSS variables not working in older browsers
Symptoms: Colors don't display in Internet Explorer or very old browser versions.
Cause: CSS custom properties (variables) aren't supported in IE or very old browsers.
Solutions:
- Provide fallbacks:
- Use PostCSS: Automatically generate fallbacks
- Conditional CSS: Serve different stylesheets for old browsers
- Consider dropping IE support: IE usage is now minimal
.button {
background-color: #3498db; /* Fallback */
background-color: var(--primary-color);
}
SCSS import errors in build process
Symptoms: Build fails with SCSS import errors or variable undefined messages.
Common Causes:
- Incorrect file paths
- Missing SCSS loader configuration
- Variable scoping issues
Solutions:
- Check file paths: Ensure correct relative or absolute paths
- Configure webpack:
- Use @import correctly: Import before using variables
- Check SCSS syntax: Ensure proper variable declarations
// webpack.config.js
module.exports = {
module: {
rules: [{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
}]
}
};
Accessibility Compliance Issues
Failing accessibility audits despite good contrast ratios
Symptoms: Automated tools report accessibility failures even when contrast appears adequate.
Common Causes:
- Dynamic content changing colors
- Transparency or gradient effects
- Different background contexts
- Focus states not properly styled
Solutions:
- Test all states: Check hover, focus, active, and disabled states
- Account for transparency: Calculate effective contrast with actual background
- Test dynamic content: Verify contrast with all possible background colors
- Improve focus indicators:
- Use manual testing: Supplement automated tools with human evaluation
.button:focus {
outline: 3px solid #0066cc;
outline-offset: 2px;
}
Best Practices for Professional Color Management
Industry-standard practices for maintaining color consistency and quality across projects and teams.
Documentation Standards
Comprehensive Color Documentation
Create detailed documentation that serves both technical and non-technical team members.
Essential Documentation Elements:
- Color Values: Hex, RGB, HSL, and CMYK values for each color
- Semantic Names: Use descriptive names (primary, secondary) not color names (blue, red)
- Usage Guidelines: When and where each color should be used
- Accessibility Notes: Contrast ratios and approved combinations
- Brand Context: How colors support brand identity and values
- Technical Specifications: Implementation details for developers
Example Documentation Format:
Primary Color - Brand Blue
├── Hex: #3498db
├── RGB: rgb(52, 152, 219)
├── HSL: hsl(204, 70%, 53%)
├── CMYK: C:76 M:31 Y:0 K:14
├── Usage: Main CTAs, links, brand elements
├── Accessibility:
│ ├── On white: 3.1:1 (AA Large compliant)
│ └── On dark (#333): 6.2:1 (AA compliant)
└── Brand meaning: Trust, reliability, innovation
Version Control for Color Systems
Maintain color system evolution with proper versioning and change management.
Versioning Strategy:
- Semantic Versioning: Use major.minor.patch format
- Change Documentation: Record all modifications with rationale
- Migration Guides: Provide clear upgrade paths
- Deprecation Notices: Plan and communicate color retirements
- Historical Archive: Maintain access to previous versions
Version Control Example:
Color System v2.1.0
├── Added: success-light (#d4edda)
├── Modified: primary-color
│ ├── Old: #2980b9
│ └── New: #3498db (improved accessibility)
├── Deprecated: warning-orange (use warning-amber instead)
└── Migration: Update CSS variables, test contrast ratios
Quality Assurance Processes
Pre-Implementation Checklist
Systematic validation before deploying color changes to production.
Accessibility Validation
- All color combinations meet WCAG AA standards
- Focus states have adequate contrast
- Color is not the only means of conveying information
- Colors work for color vision deficiencies
- High contrast mode compatibility confirmed
Technical Validation
- Color values exported in all required formats
- CSS variables properly defined and scoped
- Design tokens correctly named and structured
- Integration tested in target environments
- Fallbacks provided for older browsers
Brand Compliance
- Colors align with brand guidelines
- Emotional impact supports brand message
- Cultural appropriateness verified
- Competitive differentiation maintained
- Stakeholder approval documented
Continuous Monitoring
Ongoing processes to maintain color quality and consistency.
Monitoring Approaches:
- Automated Testing: Include color checks in CI/CD pipelines
- Regular Audits: Quarterly reviews of color implementation
- User Feedback: Collect accessibility-related user reports
- Performance Tracking: Monitor metrics affected by color changes
- Compliance Monitoring: Regular accessibility audits
Monitoring Tools:
// Automated contrast checking in tests
describe('Color Accessibility', () => {
test('Primary button meets contrast requirements', () => {
const contrast = calculateContrast(
colors.primary,
colors.background
);
expect(contrast).toBeGreaterThan(4.5);
});
});
Streamline Your Color Workflow
Put these export and integration strategies into practice. Create professional color palettes and implement them efficiently across your projects.