Privacy choices

Hue Codex uses local settings and privacy-aware measurement.

Required storage keeps tools and your local workspace working. Analytics helps improve popular tools; stricter consent regions stay opt-in unless you allow it. Marketing and personalized ads stay off until you choose them.

Abstract export formats methodology workspace with palette handoff cards, structured token panels, CSS-style rows, report sheets, visual palette strips, fallback layers, and copy and download controls.

Methodology

Export formats, tokens, CSS variables, and fallbacks

Hue Codex exports are designed for handoff: readable, copyable, deterministic, and explicit about whether an output is implementation code, supporting metadata, or a starting point that still needs review.

StandardDraft standardHue Codex heuristicApproximationBrowser-dependent

Short answer

Hue Codex exports normalized colors through separately labeled contracts. Color Picker distinguishes semantic CSS, Tailwind v4 CSS-first output, plain JSON, Hue Codex token-style JSON, a tested DTCG 2025.10 Format/Color subset, a separate Resolver companion, an accessibility report, legacy Tailwind JavaScript, and SCSS.

  • CSS variables use role-oriented names so values can move into design systems.
  • JSON exports preserve structured metadata such as role, notes, contrast, source, and caveats.
  • Token-style JSON uses a documented Hue Codex container with color token leaves, optional dimension token leaves, descriptions, and optional Hue Codex metadata.
  • Color Picker DTCG JSON is a separate tested 2025.10 Format and Color subset with structured sRGB values, aliases, groups, and Hue Codex extensions.
  • The optional DTCG Resolver companion is a different document for light/dark conditional composition; ordinary token importers are not assumed to support it.
  • Color Picker has a CSS-first Tailwind v4 output and a separately labeled legacy CommonJS JavaScript configuration output.
  • Exporter validation proves the maintained fixtures and syntax contracts, not universal compatibility with every importer.
  • A downloadable JSON Schema is available for validating broad Hue Codex JSON export families.
  • Gradient and duotone CSS exports can include approximations or fallbacks, and the output labels those limits.

Standards status

These badges identify which parts of this methodology are standards-backed, draft-track, source-origin references, Hue Codex-specific, approximate, or dependent on browser behavior.

StandardDraft standardHue Codex heuristicApproximationBrowser-dependent
StandardStable standard or standards-backed behavior used as authority, such as WCAG 2.2 and broadly implemented CSS Color 4 behavior.
Draft standardDraft, candidate, or preview specification material, such as CSS Color 5 features; not treated as final authority.
Hue Codex heuristicHue Codex ranking, role hints, bands, labels, or workflow guidance rather than an external standard.
ApproximationModel or estimate with known limits, including CMYK, color-vision simulation, image palette extraction, or CSS duotone output.
Browser-dependentOutput depends on browser APIs, rendering, color management, canvas pixels, clipboard, download, or CSS support.

Formulas, choices, heuristics, and limits

This separates standards-based formulas from Hue Codex implementation decisions, product heuristics, and known limitations for this methodology.

Standards-based formulas

Formula, threshold, syntax, or data behavior taken from a cited standard. Primary and model sources can inform implementation, but they are not automatically standards.

  • WCAG and CSS Color references anchor contrast values, color syntax, and stable CSS serialization behavior.
  • CSS custom properties and ordinary CSS syntax define the baseline export behavior.
  • The DTCG Format Module 2025.10, Color Module 2025.10, and Resolver Module 2025.10 define the portions implemented by the separately labeled Color Picker DTCG exports.
  • Tailwind CSS v4 theme-variable documentation defines the CSS-first --color-* integration used by the Color Picker Tailwind v4 export.

Implementation choices

How Hue Codex chooses to parse, normalize, round, export, or sequence calculations.

  • Hue Codex normalizes role names into lowercase token-friendly slugs.
  • Color Picker keeps plain JSON, Hue Codex token-style JSON, DTCG Format/Color JSON, and the DTCG Resolver companion as separate export contracts.
  • Color Picker provides separate Tailwind outputs for CSS-first v4 theme variables and the legacy JavaScript configuration form.
  • The DTCG Format/Color export uses structured sRGB color values, aliases, Hue Codex extensions, and an exact declared 2025.10 subset; the optional Resolver companion adds source, theme contexts, modifiers, and resolution order.
  • Other tools group values into CSS variables, JSON, token-style JSON, SCSS modules, Tailwind config fragments, Markdown, SVG, or PNG depending on the tool.
  • Readable exports may round more aggressively than detailed or token exports.

Hue Codex heuristics

Product rankings, bands, labels, suggestions, or role hints that are useful guidance but not external standards.

  • Plain JSON, Hue Codex token-style JSON, handoff summaries, descriptions, caveat wording, and role metadata are Hue Codex workflow choices.
  • A successful custom exact-subset validation is evidence for the implemented DTCG shape; it is not a guarantee that every third-party importer accepts the file.
  • Fallback recommendations for modern syntax are product guidance based on support risk.

Known limitations

Caveats, edge cases, browser dependencies, approximations, or contexts the method does not prove.

  • The Design Tokens Format Module 2025.10 is a stable DTCG Community Group specification intended for implementation, but it is not a W3C Recommendation. Only the export labeled DTCG 2025.10 claims the documented exact subset; Hue Codex token-style JSON is a separate product schema.
  • The DTCG Resolver companion implements a documented Resolver subset and remains separate from the Format/Color token document.
  • Exporter tests cannot guarantee compatibility with every current or future DTCG or Tailwind consumer.
  • CSS Color 5 functions such as color-mix(), light-dark(), and device-cmyk() are draft-standard context.
  • Clipboard and downloaded files depend on browser behavior and the current tool state.

Representative automated fixture coverage

Hue Codex imports versioned JSON fixtures and tests the corresponding pure production functions directly. The groups below are the representative regression evidence most relevant to this methodology.

  • Export fixtures: Displayed-versus-exported values, parseable CSS and JSON, and safe allowlisted SVG output. View the JSON fixtures.
  • Palette fixtures: Deterministic role output, locked-color preservation, readable-pair metadata, and export consistency. View the JSON fixtures.

What a pass means. A passing group confirms the named vectors and tested properties still match the documented implementation. It does not prove every possible input, final browser rendering, full accessibility conformance, profile-aware print output, or every downstream export consumer.

Naming and normalization

Hue Codex heuristic

Role names are converted to lowercase token-friendly slugs by replacing non-alphanumeric separators with hyphens. HEX values are normalized before export.

Palette and tool exports favor human-readable labels plus structured data so a designer, developer, or reviewer can understand why a value exists.

Generated name collisions

Hue Codex heuristicBrowser-dependent

Generated export keys must be deterministic and unique inside the same export group. Fixed role palettes use a predefined unique role set, while dynamic repeated outputs use stable sequence keys such as sample1, swatch-1, sample-01, or color-01.

Slugging is ASCII-oriented: Hue Codex lowercases the source label, replaces runs outside a-z and 0-9 with hyphens, trims edge hyphens, then falls back to a context key if nothing remains. JSON object keys are quoted strings, so leading numbers and reserved words are valid in JSON exports; CSS variables and framework snippets use prefixes or quoted keys when a generated name could be unsafe as a bare identifier.

Generated-name edge cases and collision handling.
CaseHandlingExample
Duplicate role namesFixed Hue Codex role palettes avoid this by generating one stable key for each role. Dynamic generated sets append a stable index or padded index so repeated labels remain unique.Two image swatches labeled Accent become accent-1 and accent-2 when exported from a generated sequence.
Duplicate slugsIf two generated labels normalize to the same slug in the same group, the first keeps the base slug and later generated keys append -2, -3, and so on.Primary CTA and Primary/CTA normalize to primary-cta and primary-cta-2.
Empty namesAn empty, whitespace-only, or fully stripped label uses the context fallback before collision suffixing.An empty picked-color name becomes picked; an empty generated swatch name becomes swatch-1.
Non-Latin charactersCharacters outside a-z and 0-9 are treated as separators by the current ASCII slugger. If nothing ASCII remains, Hue Codex uses the context fallback.色 or 色彩 becomes the fallback color, picked, converted, or swatch-N depending on the tool.
EmojiEmoji are treated as non-alphanumeric separators. Any remaining ASCII words survive; emoji-only names fall back.🔥 Accent becomes accent; 🔥 becomes the context fallback.
Leading numbersLeading digits are preserved for JSON token keys because JSON keys are quoted. CSS custom properties remain safe because Hue Codex prefixes generated variable names.123 Blue may become "123-blue" in JSON and --hc-color-123-blue in CSS.
Reserved wordsReserved words are preserved in quoted JSON keys because there is no single universal reserved-word list across JSON, CSS, JavaScript, design tools, and token pipelines. For target formats that require bare identifiers, Hue Codex uses quoting or a safe prefix; downstream importers may still remap reserved names for their environment.default, class, constructor, prototype, and __proto__ are review flags for target-specific adapters, not automatic JSON key failures.

Format families

Hue Codex heuristicDraft standardBrowser-dependent
Hue Codex export families.
FormatUse
CSS variablesDirect stylesheet handoff with role names and fallback values
JSONStructured reports, audit notes, and tool metadata
Hue Codex token-style JSONHue Codex handoff schema using $type, $value, and $description; not DTCG
DTCG 2025.10 JSONDocumented Format and Color subset with structured sRGB color values, aliases, groups, and extensions
DTCG Resolver companionSeparate conditional source/theme composition document for compatible Resolver consumers
SCSS modulesDart Sass-compatible snippets with sass:map imports, !default maps, lookup functions, and CSS-variable mixins
Tailwind v4 CSS-first themesCSS entry output using @import "tailwindcss", ordinary variables, and @theme inline
Tailwind legacy config fragmentsJavaScript theme.extend.colors snippets for older configuration workflows
MarkdownReadable review reports for tickets, docs, and handoff notes
SVG and PNGVisual palette strips and rendered image outputs

Downloadable JSON Schema

Hue Codex heuristicDTCG stable community specification — not a W3C RecommendationBrowser-dependent

Hue Codex publishes family-specific JSON Schemas for current JSON export families: plain tool reports, portable single-color records, and Hue Codex token-style JSON containers.

The umbrella export schema is a convenience wrapper over those family schemas. It is still intentionally permissive for plain reports because individual tools include different report fields, so use the token-style schema directly when validating token-style exports.

The plain-report schema excludes token-style marker fields such as top-level $schema, $extensions, dimension, or an object-valued color group. A scalar color field can still be used by a plain report.

Token-style validation requires token leaves to include both $type and $value. For example, {"color":{"primary":{"$type":"color"}}} is malformed and should fail the token-style schema rather than passing as a generic report.

The downloadable family schemas are the validation source of truth; later inline schema blocks on this page are simplified explanatory excerpts.

Downloadable schema scope.
Schema pathValidatesDoes not claim
/json/hue-codex-plain-report.schema.jsonPermissive tool-specific report objects and arrays of reference records. The schema excludes token-style marker fields so malformed token containers do not validate as plain reports.A rigid per-tool report schema, token-style validation, Design Tokens conformance, or validation of CSS browser support.
/json/hue-codex-portable-color.schema.jsonCompact single-color records with required name, value, and type fields, optional space/source/caveats, and contrast summary fields.A complete palette schema, a token container schema, Style Dictionary compatibility, or a guarantee that every tool export uses this compact shape.
/json/hue-codex-token-style.schema.jsonHue Codex token-style containers where token leaves require $type and $value, with optional $description, $extensions, role, and accessibility metadata.Design Tokens Format Module conformance, authoritative design-token implementation status, Style Dictionary compatibility, or import compatibility with every token tool.
/json/hue-codex-export.schema.jsonUmbrella validation across the three schema families above. Use it for broad export smoke tests when the exact export family is unknown.The preferred strict validator for known token exports. Use the token-style schema directly for token handoff validation.

Tools using this methodology by output

Hue Codex heuristicBrowser-dependent

The generated link list for this methodology covers all 27 public Hue Codex tools. This table explains why each tool belongs here: each one exposes a copyable value, structured export, report, framework snippet, visual download, or handoff note whose naming, precision, fallback, schema, or browser behavior is governed by this methodology.

Export methodology coverage across public tools.
ToolCopy/export/report surfaces covered here
Color PickerSemantic CSS system, Tailwind v4 CSS-first theme, plain JSON, Hue Codex token-style JSON, DTCG 2025.10 Format/Color JSON, DTCG Resolver companion, scoped accessibility report, legacy Tailwind JavaScript config, SCSS module, and copyable color values.
Color ConverterSingle-value copy, all-format summary, CSS variables, CSS fallback, documentation summary, JSON, token-style JSON, Tailwind entry, and SCSS module.
CSS Color GeneratorCSS variables, component/theme presets, fallback-aware CSS snippets, and handoff summary.
Color HarmoniesCSS variables, palette data JSON, token-style JSON, individual swatch copy, and handoff summary.
Tint, Shade, and Tone GeneratorCSS variables, scale data JSON, token-style JSON, role suggestions, individual step copy, and handoff summary.
Palette GeneratorCSS variables, palette data, role map, token-style JSON, contrast report, documentation summary, Tailwind fragment, SCSS module, SVG copy/download, and PNG download.
Contrast CheckerCopy-ready contrast report with ratio, WCAG result labels, source colors, and threshold notes.
Accessible Text ColorCSS variables, candidate data JSON, token-style JSON, contrast report, candidate color copy, and handoff summary.
CSS Gradient GeneratorCSS variables, fallback CSS, gradient declarations, component class snippets, individual color copy, and handoff summary.
CSS Named Colors ReferenceCSS variables, JSON data, token-style JSON, named-color value copy, and contrast report.
Color GlossaryReference-line copy, Markdown block, JSON data, and docs-ready glossary note.
Color Model ComparisonModel summary, CSS handoff values, JSON data, Markdown report, token-style JSON, and precision-mode output.
Gamut CheckerCSS handoff notes, JSON data, Markdown report, token-style JSON, approximate CMYK values, and support caveats.
Color Difference CalculatorCSS custom-property review block, JSON data, Markdown report, and comparison metrics for handoff.
Color MixerCSS handoff, CSS variables, resolved HEX fallback, JSON data, Markdown report, token-style JSON, and mix-mode notes.
Opacity CalculatorCSS alpha handoff, CSS variables, composited fallback, JSON data, Markdown report, token-style JSON, and alpha precision notes.
Color Temperature AdjusterCSS variables, selected HEX output, JSON data, Markdown report, token-style JSON, and adjustment summary.
Saturation and Chroma AdjusterCSS variables, selected HEX output, JSON data, Markdown report, token-style JSON, and chroma/gamut notes.
Lightness Ladder GeneratorCSS variables, ladder JSON, Markdown report, token-style JSON, individual step copy, and scale-token naming.
Image EyedropperPinned sample CSS variables, JSON data, Markdown summary, token-style JSON, copied HEX values, and local-image caveats.
Image Palette ExtractorExtracted-palette CSS variables, JSON report, Markdown summary, token-style JSON, swatch copy, image sampling metadata, customizable SVG and PNG palette cards, suggested alt text, exact edit links, QR codes, and source-image privacy notes.
Color Blindness SimulatorSimulation JSON, Markdown report, token-style JSON, original/simulated HEX copy, and approximation caveats.
Accessible Pair FinderAccessible-pair CSS, JSON data, Markdown report, token-style JSON, strongest-pair copy, and WCAG threshold notes.
Focus Ring Contrast ToolFocus-ring CSS, JSON data, Markdown report, token-style JSON, suggested-ring copy, and adjacent-contrast caveats.
Link Color CheckerLink-state CSS, JSON data, Markdown report, token-style JSON, state color copy, and interaction-state caveats.
Gradient Palette ExtractorExtracted gradient CSS variables, JSON data, Markdown report, token-style JSON, copied sample colors, and gradient sampling metadata.
Duotone GeneratorDuotone CSS approximation, JSON data, Markdown report, token-style JSON, copied treatment colors, and source-size PNG download.

Design Tokens specification status

DTCG stable community specification — not a W3C RecommendationHue Codex heuristic

Hue Codex cites Design Tokens Format Module 2025.10, the DTCG Final Community Group Report published on October 28, 2025. The DTCG describes this version as stable and intended for implementation. It is a W3C Community Group Report, not a W3C Standard, W3C Standards Track document, or W3C Recommendation.

That publication status is separate from Hue Codex export claims. Hue Codex token-style JSON remains a practical product schema and does not claim DTCG conformance. Only the separately labeled DTCG 2025.10 JSON and Resolver companion implement the exact subsets described below.

The DTCG Format specification recommends the application/design-tokens+json media type where available. The current Color Picker download handler uses application/json, which is documented here as actual behavior rather than presented as the preferred DTCG media type.

Color Picker semantic CSS system

StandardHue Codex heuristicBrowser-dependent

The Color Picker Semantic CSS system emits one concrete --hc-color-source-* primitive and one usage-specific --color-* semantic alias. It adds only the interaction states that belong to the selected role and keeps light and dark selectors separate.

An sRGB fallback is emitted first. When Display P3 output is selected, a later same-color Display P3 equivalent is emitted for progressive enhancement; this does not claim new expanded-gamut authored information.

Decision status and scope remain visible in comments. Surface decisions include explicit on-surface text and icon roles instead of treating a passing surface pair as proof for every component.

Color Picker export claims comparison

StandardDTCG stable community specification — not a W3C RecommendationHue Codex heuristicBrowser-dependent

Each Color Picker selector label is a separate production contract. This table summarizes what each output carries, how it is tested, and the strongest supported compatibility statement.

Color Picker export contracts, coverage, validation, and limits.
OutputIntended useAliases, themes, and statesAlpha and gamutTargetValidation levelKnown limit
Semantic CSS systemBrowser or application stylesheet handoff.Source primitive, role-specific semantic alias, light/dark aliases, and only role-relevant states.Alpha-capable CSS value; sRGB first and optional same-color Display P3 enhancement.CSS custom properties and selectors.Production formatter determinism and CSS parsing assertions.Final component states and support still require project review.
Tailwind v4 CSS-first themeCSS entry processed by Tailwind CSS v4.Source, light/dark aliases, current-theme selector variable, @theme inline role variable, and role-relevant states.Alpha-capable CSS value; sRGB first and optional same-color P3.Tailwind CSS v4 --color-* theme namespace.Exact generated fixture compiled with the installed Tailwind v4 CLI.No @custom-variant rule or universal project-build guarantee.
Plain JSONHue Codex decision or report consumer.Tool-specific fields rather than a token alias system.Source alpha, sRGB fallback, gamut, and displayed decision data where applicable.Hue Codex Color Picker report shape.JSON parsing and expected-field browser checks.No cross-tool schema or design-token conformance claim.
Token-style JSONExisting Hue Codex token handoff.Recursive token leaves, source/foreground records, descriptions, and Hue Codex extensions.CSS color strings preserve supported alpha; Hue Codex gamut metadata.Hue Codex token-style schema.JSON parsing, schema fixtures, required leaves, and explicit dtcgConformance: false.Not DTCG 2025.10 and not a universal importer contract.
DTCG 2025.10 JSONDTCG-aware color-token consumer.Groups, $root tokens, curly aliases, theme aliases, and applicable state/surface tokens.Structured sRGB components, normalized alpha, and six-digit HEX fallback.Documented DTCG Format and Color 2025.10 subset.Generated exact-subset validator, alias resolution, ranges, and deterministic fixtures.No non-color modules, arbitrary input documents, or universal importer matrix.
DTCG Resolver companionCompatible conditional token resolver.Inline Format sources, light/dark contexts, theme modifier/default, and resolution order.Carries the same structured color document sources and metadata.Documented DTCG Resolver 2025.10 subset.Generated set/source/reference/context/default/order validation.Ordinary token importers are not assumed to support Resolver documents.
Accessibility reportHuman review, ticket, or documentation.Names role, contexts, interaction states, target, decision, and scope.Names source alpha, tested composites, and required gamut.Hue Codex scoped text-report contract.Production formatter fixture and required-scope/caveat assertions.Not a universal accessibility or component-conformance statement.
Tailwind legacy JavaScript configOlder JavaScript configuration workflow.One scale under theme.extend.colors with 50–950, DEFAULT, and foreground.DEFAULT preserves supported alpha; scale entries are serialized sRGB.Color Picker CommonJS legacy/v3-style form.Browser output contract and JavaScript structure assertions.Not Tailwind v4 CSS-first output or a complete project configuration.
SCSS moduleDart Sass project handoff.A !default map, lookup function, and custom-property mixin.Includes source value, sRGB fallback, alpha, output gamut, and displayed contrast metadata.SCSS using sass:map.Representative production output compiled with Dart Sass.Not indented .sass, an npm module, or a Style Dictionary pipeline.

Hue Codex token-style JSON and DTCG 2025.10 JSON

DTCG stable community specification — not a W3C RecommendationHue Codex heuristic

Token-style JSON is the existing Hue Codex recursive handoff schema. It uses CSS color strings and Hue Codex metadata, preserves its historical internal state name for saved-state compatibility, and explicitly records dtcgConformance: false. It must not be relabeled as DTCG.

DTCG 2025.10 JSON is a separate export implementing a tested Format and Color subset. It emits the official Format schema identifier, groups and $root tokens, $type: "color", structured sRGB values, normalized alpha, six-digit HEX fallbacks, curly-brace aliases, and reverse-domain Hue Codex extension metadata.

The implemented subset covers source, semantic, theme, role-relevant state, and applicable surface/content color tokens. It does not claim every DTCG value module, arbitrary user-authored documents, external token sources, importer-specific manifests, or universal importer compatibility.

Color Picker JSON token contracts.
OutputValue shapeSupported claim
Token-style JSONHue Codex token leaves with CSS string values and product extensions.Validates against the Hue Codex token-style schema; not DTCG.
DTCG 2025.10 JSONStructured sRGB components, alpha, HEX fallback, groups, aliases, and extensions.Tested exact subset of DTCG Format and Color 2025.10 used by this exporter.

DTCG Resolver companion

DTCG stable community specification — not a W3C RecommendationHue Codex heuristicBrowser-dependent

The DTCG 2025.10 Resolver companion is deliberately separate from the Format/Color token document because its root contract describes conditional source composition rather than a standalone token group.

The companion emits the official Resolver schema identifier, version 2025.10, a named decision set, inline Format sources, one theme modifier, light and dark context arrays, a light default, and a resolution order that references the set and modifier.

A compatible consumer supplies a string selecting theme: "light" or theme: "dark" when resolving the modifier. Ordinary token importers are not assumed to consume Resolver documents.

Implemented subset. Validation covers Hue Codex generated fixtures, set/source references, aliases, contexts, defaults, and resolution order. It does not establish compatibility with every Resolver implementation.

Tailwind v4 CSS-first and legacy JavaScript outputs

Hue Codex heuristicBrowser-dependent

Color Picker exposes two distinct Tailwind outputs. Tailwind v4 CSS-first theme is the current-project path; Tailwind legacy JavaScript config is retained for older JavaScript configuration workflows.

The v4 output begins with @import "tailwindcss", stores source and theme values in ordinary CSS selectors, and exposes role-specific --color-* theme variables through @theme inline. Inline is used because the theme variables reference ordinary CSS variables.

The exporter defines separate light and dark alias variables plus one current-theme variable. The [data-theme="dark"] selector points that current variable at the dark alias, and @theme inline maps the role-specific utility token to the current variable. The export does not emit @custom-variant, so a project that wants dark:* utilities tied to that selector must configure its own variant separately.

The legacy Color Picker output is CommonJS module.exports with a generated scale under theme.extend.colors[slug], including 50 through 950, DEFAULT, and foreground. It is not the CSS-first v4 output. Palette Generator has a separate historical ESM export contract.

Tailwind v4 CSS-first structure
@import "tailwindcss";

:root {
  --hc-color-source-primary: #0EA5E9;
  --hc-theme-primary-light: var(--hc-color-source-primary);
  --hc-theme-primary-dark: var(--hc-color-source-primary);
  --hc-theme-current-primary: var(--hc-theme-primary-light);
}

[data-theme="dark"] {
  --hc-theme-current-primary: var(--hc-theme-primary-dark);
}

@theme inline {
  --color-action-primary-text: var(--hc-theme-current-primary);
}
Color Picker legacy JavaScript structure
module.exports = {
  theme: {
    extend: {
      colors: {
        "primary": {
          50: "#F0F9FF",
          500: "#0EA5E9",
          950: "#082F49",
          DEFAULT: "#0EA5E9",
          foreground: "#000000"
        }
      }
    }
  }
};
Current Color Picker Tailwind outputs.
OutputFormIntended use
Tailwind v4 CSS-first themeCSS with @import "tailwindcss", ordinary selectors, and @theme inline --color-* variables.CSS entry processed by Tailwind CSS v4.
Tailwind legacy JavaScript configCommonJS module.exports with theme.extend.colors.Legacy/v3-style JavaScript configuration workflow.

Sass output shape

Hue Codex heuristicBrowser-dependent

Hue Codex Sass exports are SCSS module snippets intended to parse with Dart Sass. They include @use "sass:map", !default maps, lookup functions, and mixins that can emit CSS custom properties.

The maps and functions are compile-time data, so they emit no CSS until a project includes the generated mixin or reads the map in its own stylesheet code.

Hue Codex does not currently emit indented .sass syntax, @forward modules, an npm Sass package, or a Style Dictionary build pipeline. The SCSS output is still a copyable handoff artifact, but it is now structured enough to compile and consume directly in an existing Sass setup.

Single-color SCSS module shape
@use "sass:map";

$color-primary: (
  "value": "#0EA5E9",
  "hex": "#0EA5E9",
  "rgb": "14 165 233",
  "oklch": "oklch(68.56% 0.147 237.32)",
  "alpha": 1,
  "foreground": "#000000",
  "contrast-on-white": 2.77,
) !default;

@function color-primary($key) {
  @return map.get($color-primary, $key);
}

@mixin color-primary-vars($selector: ":root") {
  #{$selector} {
    --color-primary: #{map.get($color-primary, "value")};
    --color-primary-rgb: #{map.get($color-primary, "rgb")};
    --color-primary-foreground: #{map.get($color-primary, "foreground")};
  }
}
Palette SCSS module shape
@use "sass:map";

$hue-codex-palette: (
  "primary": "#0EA5E9",
  "secondary": "#6366F1",
  "accent": "#F97316",
  "surface": "#F8FAFC",
  "text": "#0F172A",
  "border": "#CBD5E1",
  "success": "#16A34A",
  "warning": "#F59E0B",
  "danger": "#DC2626",
) !default;

$hue-codex-palette-contrast: (
  "text-on-surface": 15.82,
  "primary-on-surface": 2.44,
  "white-on-primary": 2.77,
) !default;

@function hue-codex-color($role) {
  @return map.get($hue-codex-palette, $role);
}

@mixin hue-codex-palette-vars($selector: ":root", $prefix: "color") {
  #{$selector} {
    --#{$prefix}-primary: #{map.get($hue-codex-palette, "primary")};
    --#{$prefix}-text: #{map.get($hue-codex-palette, "text")};
  }
}
Example SCSS consumption
@include hue-codex-palette-vars;

.button {
  background: hue-codex-color("primary");
  color: hue-codex-color("text");
}
Current SCSS export shapes.
Tool outputSass formMap contents
Color Picker SCSS modulesass:map import, $color-[slug] !default map, color-[slug]() lookup function, and color-[slug]-vars() mixin.value, hex, rgb, oklch, alpha, foreground, output-gamut, and contrast-on-[background].
Color Converter SCSS modulesass:map import, $color-[slug] !default map, color-[slug]() lookup function, and color-[slug]-vars() mixin.source, hex, rgb, hsl, oklch, lab, foreground, contrast-on-white, and gamut.
Palette Generator SCSS modulesass:map import, $hue-codex-palette and $hue-codex-palette-contrast !default maps, hue-codex-color(), hue-codex-contrast(), and hue-codex-palette-vars() mixin.primary, secondary, accent, surface, text, border, success, warning, danger, and checked contrast-pair keys.

JSON schema contracts

Hue Codex heuristicDTCG stable community specification — not a W3C RecommendationBrowser-dependent

The downloadable Hue Codex schema family covers two product-defined JSON shapes: plain tool reports and Hue Codex token-style JSON. The separately labeled DTCG Format/Color and Resolver exports use their official 2025.10 schema identifiers and the exact-subset validation described above; they do not validate against the Hue Codex token-style schema.

When a plain JSON export needs a portable single-color record, Hue Codex uses the compact field shape shown below: name, value, type, space, contrast, source, and caveats.

All JSON exports are generated with JSON.stringify(value, null, 2), so output uses two-space indentation, quoted object keys, no comments, no trailing commas, and the current tool state at copy/download time.

Token group keys and token leaf keys are deterministic. Generated sequences use stable names such as sample1, swatch-1, or padded sample tokens when needed so repeated labels do not overwrite each other.

In the plain-report schema and umbrella schema, top-level $schema, $extensions, dimension, or an object-valued color group is a token-style discriminator. Once one of those markers is present, the object must satisfy token-style validation rather than falling through to the permissive plain-report branch.

The inline schema blocks below are simplified explanatory excerpts. Use the downloadable family-specific schemas above as the source of truth for validation.

The token-style excerpt is abbreviated, but its top-level behavior matches the downloadable Hue Codex token-style schema: $schema, $extensions, color, dimension, and any additional top-level property is interpreted as a token group. When Hue Codex emits $schema, it identifies the Hue Codex schema rather than the DTCG specification. This is not a Design Tokens Format Module conformance claim.

Plain JSON single-color record example
{
  "name": "primary",
  "value": "#0EA5E9",
  "type": "color",
  "space": "srgb",
  "contrast": {
    "againstWhite": 2.77,
    "againstWhiteRaw": 2.771412229141218,
    "againstBlack": 7.58,
    "againstBlackRaw": 7.577364269085043
  },
  "source": "palette-generator",
  "caveats": []
}
Plain JSON report schema excerpt (simplified)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hue Codex plain JSON export",
  "description": "Tool-specific Hue Codex report payload. There is no cross-tool envelope.",
  "oneOf": [
    {
      "type": "object",
      "not": { "$ref": "#/$defs/tokenStyleDiscriminator" },
      "additionalProperties": { "$ref": "#/$defs/jsonValue" }
    },
    {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": { "$ref": "#/$defs/jsonValue" }
      }
    }
  ],
  "$defs": {
    "tokenStyleDiscriminator": {
      "type": "object",
      "anyOf": [
        { "required": ["$schema"] },
        { "required": ["$extensions"] },
        { "required": ["dimension"] },
        {
          "required": ["color"],
          "properties": {
            "color": { "type": "object" }
          }
        }
      ]
    },
    "jsonValue": {
      "oneOf": [
        { "type": "string" },
        { "type": "number" },
        { "type": "integer" },
        { "type": "boolean" },
        { "type": "null" },
        {
          "type": "array",
          "items": { "$ref": "#/$defs/jsonValue" }
        },
        {
          "type": "object",
          "additionalProperties": { "$ref": "#/$defs/jsonValue" }
        }
      ]
    }
  }
}
Token-style JSON schema excerpt (abbreviated; top-level behavior matches downloadable schema)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hue Codex token-style JSON export",
  "description": "Hue Codex practical token handoff shape; not a Design Tokens conformance claim.",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Optional identifier for the Hue Codex token-style schema; not a DTCG conformance claim."
    },
    "$extensions": { "$ref": "#/$defs/extensions" },
    "color": { "$ref": "#/$defs/tokenGroup" },
    "dimension": { "$ref": "#/$defs/tokenGroup" }
  },
  "additionalProperties": { "$ref": "#/$defs/tokenGroup" },
  "anyOf": [
    { "required": ["color"] },
    { "required": ["dimension"] }
  ],
  "$defs": {
    "tokenGroup": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          { "$ref": "#/$defs/tokenGroup" },
          { "$ref": "#/$defs/tokenLeaf" }
        ]
      }
    },
    "tokenLeaf": {
      "type": "object",
      "required": ["$type", "$value"],
      "properties": {
        "$type": {
          "enum": ["color", "dimension"]
        },
        "$value": {
          "oneOf": [
            { "type": "string" },
            { "type": "number" }
          ]
        },
        "$description": { "type": "string" },
        "$extensions": { "$ref": "#/$defs/extensions" },
        "role": { "type": "string" },
        "accessibility": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "extensions": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "hueCodex": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  }
}
Current Hue Codex JSON export contracts.
FamilyRoot shapeRequired fieldsOptional fields
Plain JSON reportTool-specific object, or array of records for reference-list exports.No global envelope is required. Fields are the selected tool report, such as source/base/color inputs, generated colors, contrast metrics, extraction settings, CSS strings, or review decisions.Any JSON object, array, string, number, boolean, or null value needed by that tool. HEX colors are serialized as uppercase #RRGGBB when Hue Codex has normalized the value.
Token-style JSONObject with one or more top-level token groups, usually color and sometimes dimension, plus optional $schema and $extensions.Token leaves include $type and $value. Color leaves use $type: color. Dimension leaves use $type: dimension. Token groups are recursive objects whose keys are Hue Codex slugs.$description, $extensions.hueCodex, and legacy Hue Codex metadata such as role or accessibility may be included for review context.

CSS fallback ordering

StandardDraft standardHue Codex heuristicBrowser-dependent

Hue Codex orders CSS fallbacks for progressive enhancement: the broadly supported value appears first, then the modern value appears later. Browsers that do not support the later syntax ignore that declaration; browsers that do support it use the later declaration because it wins in the cascade.

For direct CSS properties, the fallback and modern declaration can sit next to each other. For CSS custom properties, Hue Codex documents the safer pattern: keep the HEX custom property outside @supports, then override it inside an @supports block that tests the modern color syntax. That avoids older browsers storing an unsupported modern color token inside a custom property and failing later when the variable is used.

Fallback order should not be reversed. A HEX declaration placed after an OKLCH, color-mix(), light-dark(), or modern gradient declaration will override the modern value in browsers that support both.

Direct property: HEX fallback, OKLCH enhancement
.button {
  background-color: #0EA5E9;
  background-color: oklch(68.56% 0.147 237.32);
}
Custom property: HEX default, OKLCH @supports override
:root {
  --hc-primary: #0EA5E9;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --hc-primary: oklch(68.56% 0.147 237.32);
  }
}

.button {
  background-color: var(--hc-primary);
}
Gradient: sRGB fallback before modern interpolation
.hero {
  background-image: linear-gradient(135deg, #0EA5E9, #6366F1);
  background-image: linear-gradient(
    135deg in oklab,
    oklch(68.56% 0.147 237.32),
    oklch(58.52% 0.201 275.23)
  );
}
Draft function: color-mix() guarded by @supports
.badge {
  border-color: #7DD3FC;
}

@supports (color: color-mix(in oklab, #0EA5E9 70%, white)) {
  .badge {
    border-color: color-mix(in oklab, #0EA5E9 70%, white);
  }
}
Fallback order patterns.
CaseOrderWhy
Direct propertyHEX, rgb(), or ordinary gradient first; OKLCH, Display P3, or modern gradient second.Unsupported later syntax is ignored; supported later syntax wins by cascade order.
CSS custom propertyHEX variable first; modern variable override inside @supports.Custom properties can preserve unknown token streams, so @supports makes the override explicit.
Draft color functionsStable fallback first; color-mix(), light-dark(), or device-cmyk() only with support checks or review notes.CSS Color 5 syntax is draft-track and browser-dependent.
Approximate visual effectsUsable CSS approximation first or alongside a rendered asset; keep caveat text.Duotone CSS and some rendered effects depend on browser rendering and context.

Fallbacks and approximations

Draft standardApproximationBrowser-dependent

Modern CSS exports can include fallback declarations before newer syntax. Gradient exports include fallback CSS when the selected interpolation syntax may not be broadly supported.

Duotone CSS is labeled as an approximation because the source-size PNG is generated from actual canvas pixels, while CSS filters and blend modes depend on browser rendering and context.

Exact precision by format

Hue Codex heuristicBrowser-dependent

HEX and RGB exports are not decimal precision modes: Hue Codex normalizes HEX to uppercase six-digit #RRGGBB and serializes RGB as integer sRGB channels from 0 to 255.

Contrast pass/fail decisions use raw WCAG ratios. Displayed ratios and compact summary fields round to two decimals; JSON exports that include a full WCAG score object include both ratio and rawRatio. Portable single-color records should include displayed and raw contrast fields when the raw value is available.

Format-level precision rules.
Exported valuePrecision rule
HEXExact normalized six-digit uppercase sRGB HEX, #RRGGBB. Alpha HEX uses #RRGGBBAA with AA = round(alpha * 255) as two uppercase hex digits.
RGBIntegers only: rgb(R G B), where each channel is a rounded/clamped 0..255 sRGB channel.
HSL, HSV, HWB in Color Picker and Color ConverterHue and percent components use the selected stage1 basic precision: Quick/Rounded 2, CSS 2, Precise 4, Token 3 decimals.
Lab and LCH in Color Picker and Color ConverterL, a, b, C, and LCH hue use the selected stage1 lab precision: Quick/Rounded 4, CSS 3, Precise 6, Token 5 decimals.
OKLab and OKLCH in Color Picker and Color ConverterOKLab L percent and OKLCH L percent/hue use stage1 lab precision. OKLab a/b and OKLCH chroma use stage1 ok precision: Quick/Rounded 6, CSS 5, Precise 8, Token 7 decimals.
XYZ in Color Picker and Color ConverterXYZ D65 components use stage1 xyz precision: Quick/Rounded 6, CSS 5, Precise 8, Token 7 decimals.
Color Model Comparison model outputsUses stage2 model precision: Quick hue 0, percent 0, Lab 1, OK 3, XYZ 4, CMYK 0; CSS hue 2, percent 2, Lab 3, OK 5, XYZ 5, CMYK 2; Precise hue 3, percent 3, Lab 5, OK 6, XYZ 6, CMYK 3; Token hue 3, percent 3, Lab 3, OK 5, XYZ 6, CMYK 2.
Alpha in Color PickerParsed alpha remains an internal 0..1 number. The synchronized range/share field retains up to six decimal percentage places; human-readable percent labels show up to four decimal places, while eight-digit HEX necessarily quantizes alpha to 8 bits.
Alpha in CSS Color GeneratorParsed alpha is clamped to 0..1 without early two-decimal rounding. The synchronized range/share field retains up to six decimals, and generated CSS uses that retained value.
Alpha in Opacity CalculatorThe opacity control retains hundredths of a percentage point. It multiplies that selected opacity by embedded foreground alpha, preserves the resulting alpha in output, and separately reports the opaque composite used for preview/contrast decisions.
ContrastwcagScore stores rawRatio and ratio = round(rawRatio, 2). UI and compact summaries show ratio; full score JSON objects include rawRatio when that object is exported.

Precision and support caveats

Draft standardHue Codex heuristicBrowser-dependent
  • Readable exports may round values more aggressively than detailed or token exports.
  • Browser support for modern CSS color functions should be checked before relying on those declarations alone.
  • CSS Color 5 features such as color-mix(), light-dark(), and device-cmyk() are draft-standard context; exports should keep fallbacks or review notes when those features are used.
  • Hue Codex token-style JSON is intended as a practical handoff format, not a Design Tokens conformance claim or a promise that every consuming tool will import it without mapping.
  • DTCG 2025.10 JSON implements and validates the documented Format/Color subset; the Resolver companion implements its documented Resolver subset. Neither claim guarantees universal importer compatibility.
  • Tailwind v4 CSS-first output must be processed by a Tailwind CSS v4 build. The separate legacy JavaScript fragment targets older configuration workflows.
  • Downloaded files are generated in the browser and use the current tool state at the time of export.

Validation checks

Hue Codex heuristicBrowser-dependent
Export QA checks.
CheckExpected behavior
CSS variable exportIncludes stable custom property names and normalized HEX values
JSON exportParses as valid JSON
Plain JSON exportRoot is a tool-specific object or an array of objects, with no comments or trailing commas
Token-style exportRoot includes color or dimension token groups; each token leaf includes $type and $value
DTCG 2025.10 Format/Color exportParses as JSON and passes the generated exact-subset validator for schema, groups, structured sRGB colors, alpha, HEX fallback, aliases, and extension metadata
DTCG Resolver companionParses as JSON and passes the generated exact-subset validator for version, sets, inline sources, contexts, modifier default, and resolution order
SCSS exportParses with Dart Sass, exposes !default maps and lookup functions, and emits CSS custom properties when the generated mixin is included
Color Picker Tailwind v4 exportContains @import "tailwindcss", ordinary source/theme selectors, and @theme inline role-specific --color-* variables
Color Picker Tailwind legacy exportUses a CommonJS module.exports config fragment with the scale under theme.extend.colors
CSS fallback orderPlaces stable HEX/rgb()/ordinary gradient declarations first and modern OKLCH/color-mix()/interpolation declarations second, or uses @supports for custom-property overrides
Gradient exportIncludes fallback notes when modern syntax is used
Duotone CSS exportStates that CSS is approximate

Export naming and precision pseudocode

StandardDraft standardHue Codex heuristicBrowser-dependent

Export naming is deterministic. Fixed role palettes use unique role names; generated sequences add stable numeric suffixes or padded sample tokens so repeated labels do not overwrite each other.

Slug rules and generated-token collision handling
reserved_target_words = [
  "__proto__", "prototype", "constructor", "toString", "valueOf",
  "default", "class", "function", "var", "let", "const", "import", "export"
]

slugify(value, fallback):
  slug = String(value)
    .trim()
    .toLowerCase()
    .replace(/[^a-z0-9]+/g, "-")
    .replace(/^-+|-+$/g, "")
  return slug or fallback

unique_generated_key(value, fallback, used, options):
  base = slugify(value, fallback)

  if options.prefixLeadingNumber and base matches /^[0-9]/:
    base = options.leadingNumberPrefix + "-" + base

  if options.avoidReservedWords and base is in reserved_target_words:
    base = options.reservedWordPrefix + "-" + base

  candidate = base
  suffix = 2
  while used contains candidate:
    candidate = base + "-" + suffix
    suffix = suffix + 1

  add candidate to used
  return candidate

fixed_role_export_key(role):
  # Palettes use a fixed unique role set:
  # primary, secondary, accent, surface, text, border, success, warning, danger.
  return slugify(role, "color")

image_palette_export_key(label, index):
  # Dynamic image roles can repeat, so append the 1-based index.
  return slugify(label, "swatch-" + (index + 1)) + "-" + (index + 1)

gradient_palette_export_key(index):
  return "sample-" + pad_left(index + 1, 2, "0")

cvd_export_key(index):
  return "color-" + pad_left(index + 1, 2, "0")

json_token_key(label, fallback, used):
  # JSON keys are quoted strings, so leading numbers and language reserved
  # words are preserved unless they collide in the same token group.
  return unique_generated_key(label, fallback, used, {
    prefixLeadingNumber: false,
    avoidReservedWords: false
  })

bare_identifier_key(label, fallback, used):
  # Use for any target that cannot quote keys safely.
  return unique_generated_key(label, fallback, used, {
    prefixLeadingNumber: true,
    leadingNumberPrefix: "token",
    avoidReservedWords: true,
    reservedWordPrefix: "token"
  })
Precision presets used in exports
round(value, places):
  multiplier = 10 ^ places
  return Math.round((Number(value) + Number.EPSILON) * multiplier) / multiplier

stage1_precision(mode):
  quick/rounded: basic 2, lab 4, ok 6, xyz 6
  css:           basic 2, lab 3, ok 5, xyz 5
  precise:       basic 4, lab 6, ok 8, xyz 8
  token/tokens:  basic 3, lab 5, ok 7, xyz 7

stage2_model_precision(mode):
  quick:   hue 0, percent 0, lab 1, ok 3, xyz 4, cmyk 0
  css:     hue 2, percent 2, lab 3, ok 5, xyz 5, cmyk 2
  precise: hue 3, percent 3, lab 5, ok 6, xyz 6, cmyk 3
  token:   hue 3, percent 3, lab 3, ok 5, xyz 6, cmyk 2

stage1_oklch_precision(mode):
  # Color Picker and Color Converter formatColorSetForPrecision()
  L_percent_places = stage1_precision(mode).lab
  chroma_places = stage1_precision(mode).ok
  hue_places = stage1_precision(mode).lab

stage2_oklch_precision(mode):
  # Color Model Comparison formatModelValues()
  L_percent_places = stage2_model_precision(mode).ok
  chroma_places = stage2_model_precision(mode).ok
  hue_places = stage2_model_precision(mode).hue

alpha_precision:
  picker_alpha_decimal = round(percent_input / 100, 3)
  picker_alpha_css_percent = round(alpha * 100, 1) + "%"
  css_generator_alpha_decimal = round(clamp(alpha_input, 0, 1), 2)
  opacity_css_alpha_number = round(alpha, 3)
  alpha_hex_byte = uppercase_hex(round(alpha * 255), 2 digits)

contrast_precision:
  rawRatio = wcag_ratio(foreground, background)
  ratio = round(rawRatio, 2)
  display ratio
  include rawRatio when exporting a full wcagScore object in JSON

tailwind_export_shape(tool):
  if tool is Color Picker or Color Converter:
    return CommonJS config fragment:
      module.exports.theme.extend.colors[slug] = scale
  if tool is Palette Generator:
    return ESM config fragment:
      export default.theme.extend.colors.palette = role_map

sass_export_shape(tool):
  if tool is Color Picker or Color Converter:
    return SCSS module:
      @use "sass:map"
      $color-[slug]: ("hex": ..., "foreground": ..., ...)
      @function color-[slug]($key)
      @mixin color-[slug]-vars($selector: ":root")
  if tool is Palette Generator:
    return SCSS module:
      @use "sass:map"
      $hue-codex-palette: ("primary": ..., "secondary": ..., ...)
      $hue-codex-palette-contrast: ("text-on-surface": ..., ...)
      @function hue-codex-color($role)
      @function hue-codex-contrast($pair)
      @mixin hue-codex-palette-vars($selector: ":root", $prefix: "color")
  compile behavior:
    snippet parses as SCSS
    maps and functions emit no CSS until consumed by project code
    included mixins emit CSS custom properties

css_fallback_order(property, fallbackValue, modernValue):
  emit property: fallbackValue first
  emit property: modernValue second
  # If modernValue is unsupported, the browser ignores that declaration.
  # If modernValue is supported, the later declaration wins by cascade order.

css_custom_property_fallback_order(name, fallbackValue, modernValue, supportsProbe):
  emit :root { name: fallbackValue }
  emit @supports (color: supportsProbe) { :root { name: modernValue } }
  # This avoids relying on unsupported modern color syntax stored inside a
  # custom property in older browsers.

format rule:
  normalize HEX first
  calculate with raw values
  round only at display/export boundaries

Reproducible output vectors

StandardDraft standardHue Codex heuristicBrowser-dependent

Export pages are not primarily mathematical, but these deterministic vectors make naming, normalization, and token-shape behavior testable.

Export formatting vectors.
InputExpected outputNotes
Role name Primary CTA / Hoverprimary-cta-hoverLowercase slug with non-alphanumeric separators collapsed to hyphens
Duplicate generated labels Primary CTA and Primary/CTAprimary-cta; primary-cta-2Same slug inside one group keeps first key and suffixes later generated collisions
Empty generated namepicked or context fallback such as swatch-1Whitespace-only or fully stripped labels use the tool fallback before collision suffixing
Non-Latin generated name 色彩color, picked, converted, or swatch-N fallbackCurrent slugger keeps ASCII a-z and 0-9 only
Emoji generated name 🔥 AccentaccentEmoji are treated as separators; remaining ASCII survives
Emoji-only generated name 🔥context fallbackFully stripped names fall back before collision handling
Leading-number JSON token 123 Blue"123-blue"Quoted JSON token keys may start with numbers
Leading-number CSS variable 123 Blue--hc-color-123-blueCSS custom properties are prefixed before the generated slug
Reserved-word JSON token default"default"Reserved words remain quoted JSON keys; target-specific adapters may remap them
Bare identifier for reserved word defaulttoken-defaultTargets that cannot safely quote identifiers use a safe prefix
#0EA5E9 contrast on white/black2.77 displayed; 2.771412229141218 raw on white. 7.58 displayed; 7.577364269085043 raw on black.Displayed contrast rounds to 2 decimals; raw ratios remain available for full score JSON and threshold decisions
#fff#FFFFFFHEX values are normalized before export
Color token primary = #4169E1$type: color; $value: #4169E1Token-style JSON keeps the practical color token shape
Browser file exportUses the current tool state at export timeClipboard and download behavior remain browser-dependent

Sources and standards

These references anchor the public standards, model origins, source records, and formats used by Hue Codex. Status badges distinguish stable standards, drafts, primary sources, model sources, Hue Codex heuristics, approximations, and browser-dependent behavior.

Design Tokens Format Module 2025.10
DTCG stable community specification — not a W3C Recommendation
DTCG Final Community Group Report defining token groups, roots, aliases, extensions, schemas, and file/media guidance used by the separately labeled Color Picker DTCG export.
Design Tokens Color Module 2025.10
DTCG stable community specification — not a W3C Recommendation
DTCG Final Community Group Report defining structured color values, color spaces, components, alpha, and optional HEX fallbacks used by the Color Picker DTCG color subset.
Design Tokens Resolver Module 2025.10
DTCG stable community specification — not a W3C Recommendation
DTCG Final Community Group Report defining sets, sources, modifiers, contexts, defaults, and resolution order used by the separate Color Picker Resolver companion.
Tailwind CSS - Theme variables
Primary sourceBrowser-dependent
Official Tailwind CSS v4 documentation for @theme, inline theme variables, and the --color-* namespace used by the Color Picker CSS-first export.
Tailwind CSS - Dark mode
Primary sourceBrowser-dependent
Official Tailwind documentation for dark-mode variants and custom selectors; used to distinguish the exported data-theme selector from optional dark:* variant configuration.
CSS Color Module Level 4
Standard
CSS color syntax and stable serialization context used by copy-ready color exports.
CSS Color Module Level 5
Draft standard
W3C Working Draft context for newer color functions and draft CSS handoff caveats; cited as work in progress.

Tools using this methodology

These Hue Codex tools link to this methodology because they depend on the formulas, assumptions, limits, or data policy described here.

Report a calculation issue

If a result does not match the documented formula or fixture, send the exact input, tool settings, displayed result, expected result, precision mode, and browser details. Please do not include private images, personal information, or secrets.