Table of Contents
Toggleffac148 contains seven hexadecimal digits. That makes it a perfectly possible string in a file or design note, but adding a hash sign does not make it a valid CSS hex color. CSS accepts three, four, six or eight digits after the hash for this notation. A designer handed the seven-character value needs the source field or original swatch before deciding what color was intended.
| Candidate | Interpretation in CSS | What it establishes |
|---|---|---|
| #ffac14 | Red ff, green ac, blue 14 | An opaque example using the first six characters |
| #ffac1480 | The same three channels plus alpha 80 | A separate eight-digit example with transparency |
| #fac | Equivalent to #ffaacc | How three-digit shorthand expands |
| #ffac148 | Seven digits after the hash | No valid CSS hex color |
Count digits before reading channels
In six-digit notation the first pair gives red, the second green and the third blue. Each pair ranges from 00 to ff. For the candidate #ffac14, ff is 255, ac is 172 and 14 is 20. The arithmetic for ac is ten times sixteen plus twelve. These values describe a warm orange-yellow candidate. They do not establish that someone who wrote seven digits intended the first six or meant the last digit to be discarded.
Four-digit notation can look deceptively similar to an incomplete long form. In CSS each digit in a shorthand color is doubled. Thus #fac8 expands to #ffaacc88, with the final pair supplying alpha. It does not expand by adding missing zeros at one end. A designer comparing a shorthand swatch with an exported long value should expand every digit before comparing the channel pairs.
Recover the intended value from the source
A palette entry often contains more information than a copied chat message. A named token may refer to a light and dark variant, a hover state or an overlay. The right comparison is with the value attached to the same token and state in the original file. A nearby swatch that merely looks similar under current display conditions offers weaker evidence. Record the original string before replacing anything.
An image sample can be useful when the original editable palette is unavailable, but the sample answers a different question. A pixel at the antialiased edge of a letter can already contain a blend of foreground and background. A screenshot of a translucent panel likewise captures its appearance over one surface. A color taken from that screenshot may match the rendered result without matching the underlying token or its opacity.
Test a candidate on the actual surface
A CSS declaration containing an invalid hex color will not supply that property's value through that declaration. The visible result can therefore come from another declaration, inheritance where applicable or the property's initial behavior. A page that still looks orange is not proof that a browser accepted seven digits. Inspecting the declaration and the computed value distinguishes an accepted color from a fallback elsewhere in the styles.
When a candidate includes alpha, compare it over each intended background. Half-transparent orange over white and the same token over dark gray produce different visible colors. Text legibility should be evaluated against the actual resulting surface, including states such as focus or selection. A decorative swatch and a small text label have different jobs. Matching a brand color does not by itself establish that a particular foreground and background combination is legible.
Related reading includes GoBillGST, 2149831382, Decoding 3533563263.
Frequently asked questions
Can a zero simply be added at the end?
Adding a digit creates a different string with a particular interpretation. For example, appending zero to the seven characters produces an alpha pair of 80. That may be useful as an illustration, but only the source can establish that this was the intended opacity.
Does every application put alpha last?
No. CSS eight-digit hex colors use red, green, blue and then alpha. Other data formats may specify a different ordering. A transfer between tools should identify the source format and destination format before rearranging channel pairs.
What belongs in a correction note?
Keep the original seven characters, the confirmed replacement, the affected token or component and the evidence for the correction. A link to the original design file or an approved palette entry is more useful than a description such as nearly the same yellow.