# Alpha Desk > The fringe names the mistake. Colour and alpha can be stored multiplied together > (premultiplied) or not (straight), almost nothing in a file says which, and reading one > as the other puts a halo round every soft edge whose sign, shape and clipping together > say exactly which way round the file was. https://alpha-desk.skillsafe.ai/ ## What it is Five lanes over one composite - a foreground, a background, a bit depth and the chain of stages between them - plus a **free browser-side engine** that computes both readings across the same soft edge. The engine costs nothing and needs no account. Writing the report costs credits. ## The arithmetic the over operator Co = Cf*a + Cb*(1-a) premultiplied stores Cf*a straight stores Cf premultiplied read as straight error = -Cf*a*(1-a) straight read as premultiplied error = +Cf*(1-a) unpremultiplying error = (half a code value) / a unmatting Cf = (co - M*(1-a)) / a ## Three signatures that tell the two mistakes apart 1. **The sign.** Dark is always negative, bright is always positive. 2. **Where it is worst.** The dark error genuinely peaks at coverage 0.5, in the MIDDLE of a soft edge. The bright one does not peak at all - it grows as coverage falls, towards the whole foreground colour at zero. 3. **Whether it clips.** The bright reading adds an unattenuated foreground to an already-lit background, so it can exceed 1 and a display clamps it - which is why that halo is a flat outline. The dark reading is a blend of two legal values and can never leave 0..1. ## Figures that are exact, and surprising - White over a 0.05 background, read straight-as-premultiplied: **+98% of full scale at coverage 0.02**, and every one of the nine ladder rungs comes out above 1. - The same colours read premultiplied-as-straight: **-25% at coverage 0.5**, and nothing ever leaves the legal range. - **Unpremultiplying at 8 bit costs 3.92% of full scale at coverage 0.05** and 19.61% at 0.01. Everything below a coverage of **0.098** is out by more than 2% and does not come back. At 16 bit that floor is 0.0004. - **At coverage zero nothing is recoverable at any depth.** The colour was multiplied away. - A logo flattened over white stores **1.0** at coverage 0.25 against a white matte; undoing that as though the matte were black gives **4.0** - outside 0..1, which is the file telling you the guess was wrong. - One bit of alpha changes **all 9 of the 9** partial coverages, and the worst single pixel is out by **half the whole foreground-to-background distance**. - A 64-pixel-radius mark has about **402 pixels** of boundary, every one of them a hard decision once the alpha is one bit. ## The sheet COMP name | the logo on the dark header fg | white required - every figure scales with it bg | 0.05 required - and with the distance to this depth | 8 turns on the recovery arithmetic matted | white the colour a flatten used radius | 64 only for the edge budget on a threshold STEPS s1 | write | straight | the brand kit s2 | flatten | | exported flat s3 | read | premultiplied | the page's compositor s4 | threshold | | saved as a sticker A step row is `id | stage | convention | description`. The stage is one of `write`, `read`, `premultiply`, `unpremultiply`, `flatten` or `threshold`. **The convention is required on `write` and `read` and meaningless on the rest** - a write says what the data becomes, a read says what the reader believes, and only those two can disagree. It is `premultiplied` or `straight`, and there are only two. Colours may be written as `0..1`, as a percentage, as an 8-bit code value (anything above 1 is read as one), or by name: `black`, `white`, `grey`, `dark`, `light`, `mid`. A write or a read with no convention stated is **refused rather than guessed**, and a flatten with no `matted` colour is reported as un-undoable rather than as harmless. ## Lanes - `plan` - decide how the alpha will travel, before anything is made - `check` - what the chain actually does (primary) - `fringe` - which mistake the halo names, and what the other one would have looked like - `palette` - what one bit of alpha costs - `deliver` - as it is, fix in a setting, or make it again ## What it cannot do It is arithmetic on a stated coverage and it **has not seen the image**. It models one channel rather than three, so the magnitudes are per-channel and correct while the resulting colour of a real fringe is not computed. The coverage ladder is a sample rather than an edge, and the bright case is reported at the faintest rung sampled rather than at its true limit, which is at coverage zero. Every figure is proportional to the distance between the foreground and the background, so the same file with the same bug can be glaring on a dark page and invisible on a light one. And nothing here knows what a file actually is - a chain describes what somebody believes each tool does, and if the belief is wrong the arithmetic is still exact and the conclusion is still wrong. ## Links - App: https://alpha-desk.skillsafe.ai/ - API: https://alpha-desk.skillsafe.ai/api.html - Source skill: https://github.com/anthropics/skills (not affiliated or endorsed)