Skip to main content
The Color Palettes project uses a structured JSON schema to maintain consistency and reliability across all protocol color definitions. This schema ensures that every color entry meets specific requirements and follows a standardized format.

Schema Purpose

The JSON schema serves several critical functions:
  • Validation: Ensures all color entries meet required standards before being added to the collection
  • Consistency: Maintains uniform structure across all protocol definitions
  • Quality Control: Catches errors early in the contribution process through automated CI checks
  • Documentation: Provides a clear contract for what constitutes a valid color palette entry

Basic Structure

Each protocol in the color palette follows this basic structure:

Key Components

Protocol Name

The top-level key identifying the protocol, chain, or token. Must be unique across the entire collection.

Hex Color

The primary brand color in hexadecimal format. Must be exactly 6 characters (RGB) following the # symbol.

Aliases

An array of alternative names and variations used to match protocol names in Dune queries.

Schema Validation

All entries are automatically validated against the JSON schema during the contribution process.

Multiple Protocol Examples

Here are several real examples from the color palettes collection:

Schema Compliance

All contributions must pass JSON schema validation before being accepted into the collection. The automated CI pipeline runs these validations on every pull request.

What Gets Validated

  • Protocol name format and character restrictions
  • Hex color code format (must be exactly 6 hexadecimal characters)
  • Aliases array structure and content
  • Required fields presence
  • No additional properties beyond the defined schema
  • Unique aliases across all protocols (checked separately)

Schema Benefits

The schema enables automated validation in the CI pipeline, catching formatting errors, invalid color codes, and missing required fields before they reach the main branch.
Contributors have a clear specification to follow, reducing errors and speeding up the review process.
Applications consuming the color palette data can rely on a consistent structure, simplifying parsing and implementation.
The schema uses JSON Schema Draft 7, a widely supported standard that allows for future extensions while maintaining backward compatibility.

Next Steps

Schema Structure

Explore detailed property definitions and patterns

Validation Rules

Learn about validation requirements and JSON schema