Alpha Channel
Alpha Channel (Transparency Mask)
An alpha channel stores transparency information for each pixel in an image, with values ranging from fully transparent to fully opaque. It is the fourth channel in RGBA color, enabling smooth blending of images over backgrounds.
Technical Detail
Alpha values are typically stored as 8-bit (0-255) or floating point (0.0-1.0) per pixel. Pre-multiplied alpha multiplies color values by opacity for faster compositing, while straight alpha stores them independently.
Example
```javascript
// Convert RGB to HSL
function rgbToHsl(r, g, b) {
r /= 255; g /= 255; b /= 255;
const max = Math.max(r, g, b), min = Math.min(r, g, b);
const l = (max + min) / 2;
let h = 0, s = 0;
if (max !== min) {
const d = max - min;
s = l > 0.5 ? d/(2-max-min) : d/(max+min);
}
return [h, s, l];
}
```
Related Tools
C
Compress Image
R
Resize Image
C
Crop Image
R
Rotate Image
F
Flip Image
C
Convert Image
W
Watermark Image
S
SVG to PNG
I
Image to Base64
R
Round Corners
A
Add Border
I
Image Filters
A
Adjust Image
B
Blur Image
S
Sharpen Image
M
Make Square
G
Grayscale Image
S
Sepia Image
P
Pixelate Image
S
Strip Image Metadata
Related Terms
Alpha Compositing
Aspect Ratio
AVIF
Batch Resize
Bit Depth
Canvas
Channel
Chroma Subsampling
Chromatic Aberration
Color Grading (Image)
Color Profile
Color Space
Compression Artifact
Content-Aware Fill
Convolution
Crop
Dithering (Image)
DPI
DPI/PPI
EXIF
Feature Matching
Focus Stacking
Gamma
Gamut Mapping
HDR
Histogram
ICC Profile
Image Histogram
Image Interpolation
Image Optimization
Image Pyramid
Image Registration
Image Segmentation
IPTC
Lossless Compression
Lossy Compression
Metadata
Mipmap
Morphological Operations
Noise Reduction (Image)
Object Detection
Panorama Stitching
Raster Graphics
Rasterization
Resize
Resolution
Sprite Sheet
Texture Atlas
Thumbnail
Tone Mapping
Vector Graphics
Vignetting
WebP
XMP