Tint a transparent PNG and check its alpha
Admin ·
A red tint can preserve the outline of a transparent logo or spread across the canvas. Use the eight-pixel practice file to see which choice fits your image.
Apply red to the eight-pixel sample
Choose Load example. This sets Overlay color to #FF0000, Opacity to 50% and Coverage to Preserve image alpha. Apply the overlay and check that the preview and download both measure 4 × 2 pixels.
Switch Coverage to Color the full canvas, apply the same settings again and save another PNG. Examine the stored RGBA values with a pixel inspector that reads the exported data. Pixel positions in the table are counted from the left within each row.
| Sample pixel | Original RGBA | Preserve image alpha | Color the full canvas |
|---|---|---|---|
| Top row, third | 0, 0, 255, 255 | 128, 0, 128, 255 | 128, 0, 128, 255 |
| Bottom row, second | 64, 128, 192, 128 | 160, 64, 96, 128 | 191, 43, 64, 192 |
| Bottom row, third | 18, 37, 92, 0 | 18, 37, 92, 0 | 255, 0, 0, 128 |
W3C Compositing and Blending Level 1, source overW3C Portable Network Graphics Third Edition, image layout
Combine the hex alpha and opacity control
Set the color to #FF000080 and keep Opacity at 50%. The hex suffix 80 means alpha 128 out of 255. Multiplying by one half makes the effective overlay alpha 64 out of 255.
With Color the full canvas, the clear third pixel in the bottom row now stores 255, 0, 0, 64. Select Preserve image alpha if that pixel should stay clear.
W3C CSS Color 4, hexadecimal color notationW3C Compositing and Blending Level 1, source over
Check the file at its final placement
The preview checkerboard shows clear areas. Place the exported PNG over the background where it will appear to evaluate the result at normal scale.
The output contains 8-bit sRGB. The overlay mixes the encoded channel values. When the decoder recognizes an embedded input color profile, it converts the pixels to sRGB before applying the effect.
W3C CSS Color 4, hexadecimal color notationW3C Portable Network Graphics Third Edition, image layout
Common questions
Why does a transparent edge gain alpha in full-canvas coverage?
A source-over layer contributes opacity as well as color. Use Preserve image alpha to retain the edge’s original coverage.
How do three- and four-digit hex values expand?
Each digit repeats. For example, #F008 expands to #FF000088, with alpha 136 out of 255.