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 gamut and print methodology workspace with screen color panels, gamut boundary diagrams, out-of-gamut swatches, CMYK-style ink separations, paper samples, and print handoff checks.

Methodology

Gamut checks, wide-gamut CSS, and print caveats

Hue Codex is primarily a browser color tool. The Gamut Checker preserves supported authored color-space coordinates and screens them against sRGB, Display P3, and Rec. 2020 bounds, but it is not a replacement for ICC profiles, proofs, calibrated devices, or vendor specifications.

StandardDraft standardApproximationBrowser-dependent

Short answer

Hue Codex treats HEX and ordinary RGB-derived syntax as sRGB, while supported Display P3, Lab/LCH, OKLab/OKLCH, and XYZ syntax is evaluated from its authored coordinates. It reports coordinate containment and a separate channel-clipped sRGB fallback, but it does not perform press-ready profile conversion.

  • A CSS HEX color is authored as sRGB; Display P3 and Rec. 2020 can contain the same color after conversion, but that containment does not make the authored color wide-gamut.
  • Supported modern CSS color syntax is checked in its authored coordinate space; fallback behavior still matters for production.
  • Approximate CMYK output is a communication aid, not a press proof.
  • Clipping to sRGB makes browser display possible but can lose chroma if the source came from a wider theoretical space.
  • Two authored wide-gamut or perceptual colors can collapse to the same or closer sRGB fallback after clipping, so fallback comparisons may erase real source differences.

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 standardApproximationBrowser-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.
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.

  • CSS Color 4 predefined color spaces, modern color syntax, and stable serialization context anchor browser color output.
  • sRGB source assumptions are based on the meaning of ordinary HEX and rgb() web colors.

Implementation choices

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

  • Hue Codex treats HEX, named colors, RGB, HSL, and HWB as resolved sRGB sources; supported Display P3, Lab/LCH, OKLab/OKLCH, and XYZ syntax retains its authored coordinate space for gamut analysis.
  • Gamut notes test authored coordinates against sRGB, Display P3, and Rec. 2020 mathematical bounds, while keeping that result separate from profile-aware color management.
  • Simple CMYK-like values are calculated from sRGB channels for communication only.

Hue Codex heuristics

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

  • Print readiness labels, production caveat wording, and fallback recommendations are Hue Codex review guidance.
  • Containment notes are framed for practical handoff rather than press proofing.

Known limitations

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

  • CMYK output is approximate and not press-ready.
  • CSS Color 5 device-cmyk(), @color-profile, and custom color spaces are draft-standard context, and W3C currently marks those features as at-risk.
  • The Gamut Checker handles its documented concrete CSS spaces, but it does not accept arbitrary custom profiles, device-cmyk(), Rec. 2020 input syntax, ICC-profile colors, or contextual CSS expressions.
  • Real print conversion needs ICC profiles, total ink limits, paper, ink, press condition, proofs, and vendor guidance.

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.

  • Parsing fixtures: Accepted CSS color syntax, alpha behavior, clamping, invalid input, and out-of-gamut fallback cases. View the JSON fixtures.
  • Conversion fixtures: sRGB, XYZ, Lab/LCH, OKLab/OKLCH conversion values, round trips, and precision boundaries. 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.

Source assumptions

StandardBrowser-dependentHue Codex heuristic

Hue Codex resolves HEX, fixed named colors, RGB, HSL, and HWB as sRGB sources. For those inputs, the gamut checker reports sRGB as in gamut, wider RGB display spaces as containing the color, and the browser fallback as the same resolved color.

For supported color(display-p3), Lab/LCH, OKLab/OKLCH, and XYZ input, the checker derives D65 XYZ from the authored coordinates, tests the corresponding linear channels against each gamut boundary, and preserves the original syntax separately from the sRGB fallback.

This is intentionally conservative: the site can know the numeric color you entered, but it cannot know the display profile, printer profile, substrate, ink set, viewing booth, or brand production tolerances.

How in-gamut status is determined

StandardHue Codex heuristicApproximationBrowser-dependent

For resolved sRGB syntax, Hue Codex checks the resulting sRGB coordinates and reports Display P3 and Rec. 2020 containment. For supported perceptual, XYZ, or Display P3 syntax, it converts the authored coordinates to D65 XYZ and tests un-clipped linear channel bounds for sRGB, Display P3, and Rec. 2020.

An authored color outside sRGB receives a separate channel-clipped sRGB fallback. This is not perceptual gamut mapping, and the containment result does not predict a particular uncalibrated display, browser color-management path, printer, paper, or ink.

If a wider source has already been reduced to HEX before it reaches the checker, only that sRGB fallback remains available; the original wider coordinates cannot be reconstructed.

Fallback comparison caveat. If two authored perceptual or wide-gamut colors are clipped to sRGB before they reach this tool, their HEX fallbacks may look identical or closer than the original authored colors. Use the Color Conversion methodology when you need the authored-value versus resolved-fallback boundary.

What the Gamut Checker can and cannot validate.
Source valueGamut Checker behaviorInterpretation
#4169E1Accepted as sRGB HEX; sRGB is in gamut and wider RGB spaces are marked containedThe fallback remains #4169E1
rgb(), hsl(), hwb(), fixed named color, or transparentAccepted and resolved as an sRGB source with alpha retained separatelyTranslucent contrast references use a declared compositing canvas
color(display-p3 ...), oklch(), oklab(), lab(), lch(), or supported XYZ color()Accepted with authored-space metadata; mathematical containment is tested before fallback clippingThe original syntax and separate sRGB fallback are both reported
color(rec2020 ...), custom profiles, or ICC-profile dataNot accepted as direct inputRec. 2020 is currently a tested boundary, not a supported authored input profile
A clipped HEX fallback from a wider authored colorAccepted as HEXThe result describes the clipped/resolved fallback only; it is not proof that the original authored color was in gamut

Contained color versus wide-gamut authored color

StandardBrowser-dependentHue Codex heuristic

Containment answers whether a color can be represented inside a color space. Authorship answers which color space the original value belongs to. A CSS HEX value such as #4169E1 is an sRGB-authored color because HEX channels are interpreted as sRGB coordinates.

Display P3 and Rec. 2020 have larger RGB gamuts than sRGB, so an sRGB color can be converted into coordinates inside those spaces and still describe the same intended color. That does not mean the HEX value used extra P3 or Rec. 2020 colors; it only means the wider spaces include the sRGB color.

Hue Codex calls a color wide-gamut only when the authored or computed source uses a wider color space and the represented color is outside sRGB, for example a display-p3 color whose converted sRGB fallback must be clipped or otherwise reduced.

How Hue Codex distinguishes containment from wide-gamut authorship.
Input or noteHue Codex interpretationWhy it matters
#4169E1sRGB-authored HEX; in sRGB and contained by Display P3/Rec. 2020The wider spaces can represent it, but the source did not use wide-gamut coordinates
color(display-p3 0 0.75 0.55)Wide-gamut authored CSS if the converted color falls outside sRGBThe source names a wider color space, so sRGB fallback may need clipping or review
An sRGB color shown on a P3 monitorStill an sRGB-authored colorThe display device may be wide-gamut, but the CSS value remains sRGB unless authored otherwise

Mini glossary

StandardHue Codex heuristicApproximation

These short definitions cover the terms used throughout the gamut and print notes on this page.

Gamut and print terms.
TermMeaning on this page
sRGBThe default web color space for ordinary CSS HEX, rgb(), hsl(), and many browser fallbacks. Hue Codex treats HEX input as sRGB-authored.
Display P3A wider RGB display color space than sRGB. It can contain sRGB colors, but a HEX value does not become Display P3-authored just because P3 can represent it.
Rec. 2020A very wide RGB color space used in video and HDR contexts. Hue Codex uses it as containment context for resolved sRGB values, not as direct authored input in the Gamut Checker.
ICC profileA color profile that describes how a device, print process, paper, ink set, or color space represents color. Hue Codex does not perform ICC-profile conversion.
ClippingForcing an out-of-range or out-of-gamut color into a smaller displayable range, often losing chroma or detail. Hue Codex sRGB fallback clamping is clipping, not full gamut mapping.
Gamut mappingA color-management strategy for moving colors from one gamut to another while trying to preserve useful appearance. Hue Codex does not perform perceptual or profile-aware gamut mapping.
ProofingA print review workflow using calibrated devices, profiles, proofs, and production conditions to predict final output. Approximate CMYK values in Hue Codex are not proofs.

Wide-gamut CSS

StandardDraft standardBrowser-dependent

CSS Color 4 defines modern color syntax for device-independent values and predefined color spaces. Hue Codex surfaces these formats when they are useful for CSS handoff and explains when fallbacks should be kept.

CSS Color 5 is cited on this page for draft context around custom color spaces, @color-profile, device-cmyk(), and print-oriented CSS workflows. Hue Codex treats that material as a Working Draft reference, not as stable implementation guidance.

When a color is converted back to sRGB for display or copying, channel values are clamped to the displayable range. A clipped fallback can be usable, but it is not a perceptual gamut-mapping strategy.

CSS Color 5 draft and at-risk features

Draft standardBrowser-dependent

The latest published CSS Color 5 document available during this review is a W3C Working Draft. W3C says Working Draft publication is not endorsement and that the document can change, be replaced, or be obsoleted.

Hue Codex cites CSS Color 5 because it describes device-cmyk(), custom ICC-profile color spaces, @color-profile, and print-oriented CSS examples. The same draft currently marks Custom Color Spaces, @color-profile, device-cmyk(), and Relative Alpha Colors as at-risk.

For Hue Codex methodology, that means device-cmyk() and custom color-space examples are explanatory draft references only. They do not make Hue Codex CMYK values press-ready, and they should not replace ICC-based production conversion, proofing, or vendor print specifications.

CSS Color 5 features cited by this page.
FeatureHue Codex statusHow to read it
device-cmyk()Draft standard; at-risk in CSS Color 5Useful for explaining uncalibrated CMYK CSS syntax, not a press-proof conversion target
@color-profile and custom color spacesDraft standard; at-risk in CSS Color 5Useful for understanding ICC-profile CSS direction, but browser and print workflow support must be verified
Print-oriented CSS examplesDraft context and browser-dependentUseful as standards direction, not as proof that a browser export matches a press condition

CMYK approximation

ApproximationHue Codex heuristic

Hue Codex calculates simple CMYK-like values from sRGB channels by deriving black from the maximum RGB component, then deriving cyan, magenta, and yellow from the remaining distance. This formula is a Hue Codex implementation choice and approximation, useful for rough language only.

The input domain is resolved opaque sRGB with integer channels R, G, and B in [0, 255]. Hue Codex normalizes those channels before calculation, computes raw normalized CMYK components, converts them to percentages, and rounds only for display or export.

CSS Color 5 device-cmyk() remains separate draft/at-risk context for CSS syntax. It does not standardize this simple RGB-derived CMYK equation and does not make Hue Codex CMYK values press-ready.

Real print conversion depends on ICC profiles, total ink limits, black generation, paper, ink, press condition, and vendor setup. Always use proofing and production guidance for final print values.

Profile-aware conversion not performed. Every CMYK value on this page is a simple sRGB-derived approximation, not a color-managed conversion for a printer, paper, ink set, ICC profile, or press condition.

sRGB-derived CMYK approximation formula
r = clamp(R, 0, 255) / 255
g = clamp(G, 0, 255) / 255
b = clamp(B, 0, 255) / 255

k = 1 - max(r, g, b)

if k == 1:
  c = 0
  m = 0
  y = 0
else:
  c = (1 - r - k) / (1 - k)
  m = (1 - g - k) / (1 - k)
  y = (1 - b - k) / (1 - k)

Displayed percentages:
  C = c * 100
  M = m * 100
  Y = y * 100
  K = k * 100
CMYK approximation edge cases.
CaseExpected behaviorReason
#000000c = 0, m = 0, y = 0, k = 1; displayed C = 0%, M = 0%, Y = 0%, K = 100%k is 1, so Hue Codex uses the black edge case to avoid division by zero
#FFFFFFc = 0, m = 0, y = 0, k = 0; displayed C = 0%, M = 0%, Y = 0%, K = 0%k is 0 and no channel is below the maximum
Neutral gray such as #808080C = 0%, M = 0%, Y = 0%, K = 49.803922% rawEqual RGB channels leave no chroma-like C/M/Y component in this simple model
Pure RGB primaries#FF0000 => C 0%, M 100%, Y 100%, K 0%; #00FF00 => C 100%, M 0%, Y 100%, K 0%; #0000FF => C 100%, M 100%, Y 0%, K 0%One channel is the maximum and the other two are zero
Out-of-range internal channel inputClamp to [0, 255] before normalizationThe public tools resolve displayable sRGB channels before this approximation

Validation checks

Hue Codex heuristicApproximationBrowser-dependent

Profile-aware conversion not performed. CMYK validation rows check the approximation formula only; they do not validate press-ready output.

Gamut and print QA checks.
InputExpected behavior
Any normalized HEX or ordinary RGB-derived concrete colorReported as an sRGB source
#FFFFFFAccepted as sRGB HEX; sRGB is in gamut; Display P3 and Rec. 2020 are containment notes; approximate CMYK is cmyk(0% 0% 0% 0%)
#000000Accepted as sRGB HEX; sRGB is in gamut; Display P3 and Rec. 2020 are containment notes; approximate CMYK is cmyk(0% 0% 0% 100%) using the black edge case
#FF0000Accepted as sRGB HEX; sRGB is in gamut; Display P3 and Rec. 2020 are containment notes; approximate CMYK is cmyk(0% 100% 100% 0%)
color(display-p3 0 0.75 0.55)Validated from authored Display P3 coordinates; sRGB, Display P3, and Rec. 2020 containment plus the clipped fallback are reported
High-chroma OKLCH, such as oklch(70% 0.3 150)Validated from authored OKLCH coordinates; an out-of-sRGB result keeps the source and labels the fallback as channel-clipped
#4169E1 in Display P3 or Rec. 2020 notesReported as sRGB-authored and contained by wider RGB spaces, not wide-gamut authored
CMYK exportWarned as approximate and not press-ready

CMYK approximation equations

Draft standardApproximation

Hue Codex CMYK output is a deterministic sRGB approximation for communication. It is not a profile-aware conversion.

Simple sRGB-derived CMYK
rgb_to_cmyk_approx(r8, g8, b8):
  r = clamp(r8, 0, 255) / 255
  g = clamp(g8, 0, 255) / 255
  b = clamp(b8, 0, 255) / 255
  k = 1 - max(r, g, b)

  if k == 1:
    c = 0
    m = 0
    y = 0
  else:
    c = (1 - r - k) / (1 - k)
    m = (1 - g - k) / (1 - k)
    y = (1 - b - k) / (1 - k)

  C = c * 100
  M = m * 100
  Y = y * 100
  K = k * 100
  return C, M, Y, K

Reproducible test vectors

Draft standardApproximation

These vectors validate the simple sRGB-derived CMYK approximation. They are not ICC profile conversions or press targets.

Profile-aware conversion not performed. CMYK values shown here are approximate sRGB-derived communication values, not ICC-profile conversions or press proofs.

Approximate CMYK vectors.
InputExpected outputNotes
#000000cmyk(0% 0% 0% 100%)Black channel reaches 100 percent
#FFFFFFcmyk(0% 0% 0% 0%)No ink in the simple approximation
#808080raw c=0%, m=0%, y=0%, k=49.803922%; displayed cmyk(0% 0% 0% 50%)Neutral gray uses black only in the simple approximation
#00FFFFcmyk(100% 0% 0% 0%)Pure sRGB cyan maps to cyan only
#FF0000cmyk(0% 100% 100% 0%)Pure sRGB red maps to magenta and yellow
#4169E1raw c=71.111111%, m=53.333333%, y=0%, k=11.764706%; displayed cmyk(71% 53% 0% 12%)Rough communication value only

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.

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.