Chromivra API

Professional Color Analysis API

← Back to App

API Access - Thank You Gift for Top Supporters

Companies donating £2,000 or more receive unlimited API access as our massive thank you for supporting free tools for everyone.

Enterprise Color Analysis API

Integrate professional color analysis into your applications with our comprehensive REST API featuring 17 endpoints

Donor Benefit Secure 17 Endpoints Advanced Analytics

Authentication

All API requests require these headers:

X-API-Key: ck_your_api_key_here
X-Donor-Email: your@email.com
X-Request-ID: optional_unique_request_id

API keys are provided to donors as a thank you gift. Learn about supporting Chromivra

Core Endpoints

POST /api/endpoints/extract.php

Extract colors from uploaded image

POST /api/endpoints/analyze.php

Comprehensive color analysis and insights

POST /api/endpoints/export.php

Export palette in various formats

POST /api/endpoints/science.php

Advanced color science calculations

Advanced Endpoints

POST /api/endpoints/accessibility.php

WCAG compliance and vision simulation

POST /api/endpoints/harmony.php

Color harmony detection and generation

POST /api/endpoints/batch.php

Process multiple images at once

Enterprise Features

POST /api/endpoints/brand-kit.php

Generate comprehensive brand guidelines and kits

POST /api/endpoints/executive-reports.php

Professional reports for stakeholders

POST /api/endpoints/design-preview.php

Live design mockups with applied colors

POST /api/endpoints/brand-compliance.php

Brand guideline compliance validation

POST /api/endpoints/pattern-detection.php

Mathematical pattern and relationship analysis

Advanced Analytics

POST /api/endpoints/cultural-intelligence.php

Cultural color analysis across 50+ regions

POST /api/endpoints/advanced-naming.php

Professional color naming with contextual modifiers

POST /api/endpoints/color-psychology.php

Algorithmic psychological analysis and brand implications

POST /api/endpoints/3d-visualization.php

3D color space coordinates and projections

POST /api/endpoints/video-analysis.php

Video frame analysis and temporal color tracking

Color Extraction Example

Request:

curl -X POST https://chromivra.com/api/endpoints/extract.php \
  -H "X-API-Key: ck_1a2b3c4d5e6f7g8h9i0j" \
  -H "X-Donor-Email: john@company.com" \
  -H "X-Request-ID: req_12345" \
  -F "image=@logo.jpg"

Response:

{
  "success": true,
  "data": {
    "colors": [
      {
        "hex": "#3b82f6",
        "rgb": [59, 130, 246],
        "hsl": [217, 91, 60],
        "name": "Blue",
        "percentage": 34.5,
        "frequency": 1250
      },
      {
        "hex": "#10b981",
        "rgb": [16, 185, 129],
        "hsl": [160, 84, 39],
        "name": "Green",
        "percentage": 28.2,
        "frequency": 1020
      }
    ],
    "total_colors": 12,
    "image_info": {
      "filename": "logo.jpg",
      "size": 245760,
      "type": "image/jpeg"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "req_12345",
    "usage_count": 47,
    "rate_limit_remaining": 953
  }
}

Color Analysis Example

Request:

curl -X POST https://chromivra.com/api/endpoints/analyze.php \
  -H "X-API-Key: ck_1a2b3c4d5e6f7g8h9i0j" \
  -H "X-Donor-Email: john@company.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [
      {"hex": "#3b82f6", "name": "Primary Blue"},
      {"hex": "#10b981", "name": "Success Green"}
    ],
    "type": "comprehensive"
  }'

Response:

{
  "success": true,
  "data": {
    "analysis": {
      "brand_analysis": {
        "modern": 85,
        "traditional": 15,
        "professional": 92,
        "playful": 35,
        "sophisticated": 78,
        "energetic": 45
      },
      "emotional_impact": {
        "trust": 89,
        "energy": 42,
        "calmness": 67,
        "warmth": 25,
        "excitement": 38,
        "luxury": 55
      },
      "cultural_intelligence": {
        "western": ["Blue: Trust, professionalism"],
        "eastern": ["Blue: Immortality, advancement"],
        "global": ["Blue: Peace, reliability"]
      },
      "industry_fit": {
        "technology": 95,
        "finance": 88,
        "healthcare": 76
      }
    }
  }
}

Export Example

Request:

curl -X POST https://chromivra.com/api/endpoints/export.php \
  -H "X-API-Key: ck_1a2b3c4d5e6f7g8h9i0j" \
  -H "X-Donor-Email: john@company.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [
      {"hex": "#3b82f6", "name": "primary"},
      {"hex": "#10b981", "name": "success"}
    ],
    "format": "css",
    "name": "Corporate Brand Palette"
  }'

Response:

{
  "success": true,
  "data": {
    "format": "css",
    "palette_name": "Corporate Brand Palette",
    "color_count": 2,
    "export_data": {
      "content": "/* Corporate Brand Palette - Generated by Chromivra */\n:root {\n  --primary: #3b82f6;\n  --primary-rgb: 59, 130, 246;\n  --success: #10b981;\n  --success-rgb: 16, 185, 129;\n}\n\n.bg-primary { background-color: var(--primary); }\n.text-primary { color: var(--primary); }\n.border-primary { border-color: var(--primary); }",
      "mime_type": "text/css",
      "extension": "css"
    },
    "suggested_filename": "Corporate-Brand-Palette-2025-01-15.css"
  }
}

Error Handling

Invalid API Key Response:

{
  "success": false,
  "error": {
    "code": "AUTH003",
    "message": "Access denied",
    "timestamp": "2025-01-15T10:30:00Z"
  }
}

Rate Limit Exceeded Response:

{
  "success": false,
  "error": {
    "code": "RATE001",
    "message": "Rate limit exceeded. Maximum 1000 requests per hour.",
    "timestamp": "2025-01-15T10:30:00Z"
  }
}

Enterprise Features Examples

Brand Kit Generation:

curl -X POST https://chromivra.com/api/endpoints/brand-kit.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#10b981"}],
    "brand_name": "TechCorp",
    "include_guidelines": true,
    "format": "json"
  }'

Executive Reports:

curl -X POST https://chromivra.com/api/endpoints/executive-reports.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#10b981"}],
    "project_name": "Q1 Rebranding Initiative",
    "report_type": "detailed",
    "include_recommendations": true
  }'

Brand Compliance:

curl -X POST https://chromivra.com/api/endpoints/brand-compliance.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "test_colors": [{"hex": "#3b82f6"}],
    "brand_guidelines": {
      "approved_colors": [{"hex": "#3c83f7", "name": "Brand Blue"}]
    },
    "tolerance": 5.0,
    "strict_mode": true
  }'

Advanced Analytics Examples

Cultural Analysis:

curl -X POST https://chromivra.com/api/endpoints/cultural-intelligence.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#dc2626"}],
    "regions": ["western", "eastern", "middle_eastern"],
    "depth": "detailed"
  }'
Response includes: Cultural meanings across regions, business implications, localization recommendations

Color Psychology Profiler:

curl -X POST https://chromivra.com/api/endpoints/color-psychology.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#10b981"}],
    "target_audience": "professionals",
    "analysis_depth": "comprehensive"
  }'
Response includes: Personality traits, behavioral influences, brand archetype analysis, mood state impacts

3D Color Space Visualization:

curl -X POST https://chromivra.com/api/endpoints/3d-visualization.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#10b981"}],
    "color_space": "lab",
    "projection_type": "orthographic",
    "view_angle": {"x": 45, "y": 45, "z": 0}
  }'
Response includes: 3D coordinates, 2D projections, space distribution analysis, interactive data

Advanced Color Naming:

curl -X POST https://chromivra.com/api/endpoints/advanced-naming.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#10b981"}],
    "context": "web",
    "style": "professional"
  }'
Response includes: Professional names, creative alternatives, technical descriptions, industry terms

Video Analysis:

curl -X POST https://chromivra.com/api/endpoints/video-analysis.php \
  -H "X-API-Key: [REDACTED:api-key]" \
  -H "X-Donor-Email: company@email.com" \
  -H "Content-Type: application/json" \
  -d '{
    "frame_data": [
      {"colors": [{"hex": "#3b82f6"}], "timestamp": "00:00:01"},
      {"colors": [{"hex": "#10b981"}], "timestamp": "00:00:02"}
    ],
    "analysis_type": "temporal_analysis"
  }'
Response includes: Frame-by-frame analysis, color evolution timeline, scene change detection

Export Formats Available

CSS

CSS variables and utility classes

SCSS

Sass/SCSS variables

JSON

Structured data format

ASE

Adobe Swatch Exchange

GPL

GIMP Palette format

Sketch

Sketch app palette

Figma

Figma-compatible JSON

Adobe

Adobe Creative Cloud

Complete API Feature Overview

Core Analysis (5 endpoints)

  • • Color extraction from images
  • • Comprehensive brand analysis
  • • 8+ export formats
  • • Advanced color science
  • • WCAG accessibility testing
  • • Color harmony generation

Enterprise Tools (6 endpoints)

  • • Brand kit generation
  • • Executive report creation
  • • Design preview templates
  • • Brand compliance validation
  • • Pattern detection
  • • Batch processing

Advanced Analytics (5 endpoints)

  • • Cultural analysis (50+ regions)
  • • Professional color naming system
  • • Psychological profiling algorithms
  • • 3D color space visualization
  • • Video analysis & temporal tracking
17 Total Endpoints - Every Chromivra feature available programmatically

Analysis Capabilities Detail

Brand Analysis

  • • Modern vs Traditional scoring
  • • Professional vs Playful assessment
  • • Sophistication metrics
  • • Energy level analysis

Cultural Intelligence

  • • Western cultural meanings
  • • Eastern cultural interpretations
  • • African traditional symbolism
  • • Middle Eastern associations
  • • Latin American contexts

Color Psychology

  • • Personality trait mapping
  • • Behavioral influence analysis
  • • Cognitive association patterns
  • • Decision-making impact
  • • Memory and recall factors

Color Science

  • • Delta E calculations (76, 94, 2000)
  • • Color space conversions
  • • 3D coordinate generation
  • • Gamut coverage analysis
  • • Temperature calculations

Color Science Example

Request:

curl -X POST https://chromivra.com/api/endpoints/science.php \
  -H "X-API-Key: ck_1a2b3c4d5e6f7g8h9i0j" \
  -H "X-Donor-Email: john@company.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [
      {"hex": "#3b82f6"},
      {"hex": "#10b981"}
    ],
    "calculations": ["delta_e", "color_spaces"]
  }'

Response:

{
  "success": true,
  "data": {
    "science_analysis": {
      "delta_e_analysis": {
        "matrix": [[0, 68.45], [68.45, 0]],
        "average_difference": 68.45,
        "max_difference": 68.45,
        "min_difference": 68.45
      },
      "color_spaces": [
        {
          "hex": "#3b82f6",
          "rgb": [59, 130, 246],
          "xyz": [0.2134, 0.1876, 0.8032],
          "lab": [50.32, 15.67, -68.23],
          "hsl": [217, 91, 60],
          "hsv": [217, 76, 96],
          "cmyk": [76, 47, 0, 4]
        }
      ]
    }
  }
}

Accessibility Analysis Example

Request:

curl -X POST https://chromivra.com/api/endpoints/accessibility.php \
  -H "X-API-Key: ck_1a2b3c4d5e6f7g8h9i0j" \
  -H "X-Donor-Email: john@company.com" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": [{"hex": "#3b82f6"}, {"hex": "#ffffff"}],
    "tests": ["wcag", "vision_simulation"]
  }'

Response:

{
  "success": true,
  "data": {
    "accessibility_analysis": {
      "wcag_compliance": {
        "summary": {
          "aa_large_count": 2,
          "aa_normal_count": 1,
          "aaa_large_count": 1,
          "aaa_normal_count": 0
        }
      },
      "vision_simulation": {
        "protanopia": ["#4a7ba7", "#ffffff"],
        "deuteranopia": ["#5e7ba2", "#ffffff"],
        "tritanopia": ["#3b82f6", "#ffffff"],
        "achromatopsia": ["#888888", "#ffffff"]
      }
    }
  }
}

Error Codes Reference

Authentication Errors

AUTH001 API key required
AUTH002 Donor email required
AUTH003 Access denied
RATE001 Rate limit exceeded

Validation Errors

IMG001 No image file provided
IMG003 File size too large
IMG004 Unsupported format
JSON001 Invalid JSON

Rate Limiting & Usage

1,000
Requests per hour per key
25MB
Maximum image file size
API key validity (until revoked)

Response Headers

Every successful response includes usage information:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 953
X-RateLimit-Reset: 3600

Important Service Information

Service Level Expectations

API access is not guaranteed and ranks lower on our development priority list compared to maintaining the free web interface that serves everyone.

  • • Primary focus remains on the free web application
  • • API updates may lag behind web interface improvements
  • • Service availability subject to our maintenance capacity
  • • Best effort support - not a commercial SLA

📧 Responsive Email Support

While the API isn't our top priority, we respond to all supporter issues and questions via email.

  • • Response within 48 hours for supporters
  • • Bug reports addressed promptly
  • • Integration assistance available
  • • Feature requests considered

🎁 Gift Program Nature

API access is a thank you gift, not a purchased service. No SLAs or commercial guarantees apply.

  • • Charitable donation, not service purchase
  • • Best effort maintenance and support
  • • Access continues as long as feasible
  • • Email support for all issues

Need API Access?

API keys are provided as a thank you gift to our £2,000+ supporters