DEV Community

Denis
Denis

Posted on

How Our AI Agents Built a Universal Color Palette & Accessibility Checker in Record Time

A New Era for Accessible Design: The Universal Color Palette & Accessibility Checker

At Pixel Office, we're constantly pushing the boundaries of what's possible with AI-driven development. Our latest achievement is the Universal Color Palette & Accessibility Checker, a robust, client-side tool designed to empower designers and developers in creating beautiful and, critically, accessible digital experiences.

The Challenge: Bridging Design & Accessibility

Building a tool that not only generates harmonious color palettes but also ensures strict adherence to WCAG accessibility standards is no small feat. It requires deep understanding of color theory, contrast ratios, and the intricacies of web accessibility guidelines. This is where our AI agents truly shined.

Jan & Klára: A Symphony of Code and Design

Our AI development agent, Jan, and our AI design agent, Klára, teamed up to bring this vision to life.

Klára's Role (AI Designer): Klára laid the foundational design principles. She researched the latest WCAG 2.x and WCAG 3.0 guidelines, ensuring the tool's core logic for contrast checking was impeccable. Her expertise guided the selection of color harmony algorithms and designed an intuitive user interface that made complex accessibility checks feel effortless. From color picker mechanisms to the visual representation of contrast ratios, Klára's design ensured a seamless and effective user experience.

Jan's Role (AI Developer): With Klára's detailed design specifications, Jan took on the coding challenge. He implemented the client-side logic for color generation, real-time contrast calculation, and the sophisticated export functionalities. Jan focused on performance and security, ensuring all processing happens directly in the user's browser for maximum speed and privacy.

"Integrating the Firebase monetization and user tracking logic was crucial for the tiered feature access. The actionCount variable, stored in localStorage, allowed us to manage the free usage limit effectively, while Firebase handles secure user authentication and paid feature unlocks. It's a clean way to manage user access without compromising client-side performance." - Jan, AI Developer

Here's a snippet of the foundational JavaScript code Jan implemented for core functionality and monetization integration:

        // === Firebase & Monetization Configuration ===
        const widgetSlug = "universal-color-palette-checker";
        const firebaseConfig = {
            apiKey: "AIzaSyFakeKeyForShowcaseHubAuthTestingOnly",
            authDomain: "pixeloffice-hub.firebaseapp.com",
            projectId: "pixeloffice-hub",
            storageBucket: "pixeloffice-hub.appspot.com",
            messagingSenderId: "1234567890",
            appId: "1:1234567890:web:abcdef123456"
        };

        if (!firebase.apps.length) {
            firebase.initializeApp(firebaseConfig);
        }
        const auth = firebase.auth();
        const googleProvider = new firebase.auth.GoogleAuthProvider();

        let isWidgetUnlocked = false;
        let userLoggedIn = null;
        const FREE_USE_LIMIT = 3;
        let actionCount = parseInt(localStorage.getItem(`pv_actions_${widgetSlug}`) || "0");
        let currentCryptoPollInterval;
        let isSigningUp = false;

        // === i18n Dictionary ===
// ... and more multilingual translations
Enter fullscreen mode Exit fullscreen mode

Quality Assurance by Martin, Deployment by Tomáš

Once Jan and Klára's core work was complete, Martin (AI QA Engineer) stepped in. He rigorously tested every aspect of the tool, from the accuracy of contrast ratio calculations against WCAG standards to the reliability of colorblindness simulations and export formats. Martin's meticulous testing ensured a flawless user experience. Finally, Tomáš (AI DevOps Engineer) handled the seamless deployment, making the tool instantly available to our community.

Key Features at a Glance:

  • Harmonic Palette Generation: Start with a base color, get a full palette.
  • Real-time WCAG Compliance: Instant contrast checks for text and UI elements against WCAG 2.x and 3.0.
  • Client-Side Processing: Ensures lightning-fast performance and utmost user privacy.
  • Advanced Features (Premium): Export to CSS variables, SCSS, JSON, Figma tokens; colorblindness simulation; detailed accessibility reports.

Try it Yourself!

Ready to streamline your design workflow and ensure accessibility from the get-go?
👉 Experience the Universal Color Palette & Accessibility Checker live here!

We believe this tool will significantly aid developers and designers in creating inclusive web experiences. Let us know what you think!

Top comments (0)