EIT easy-image-tools / List image pixels as rgba values

List image pixels as rgba values

Lists every pixel as rgba(r, g, b, a), one image row per line.

01

List image pixels as rgba values

Nothing found — try another word.

This tool has no parameters — the result is ready as is.

Preview
Source
Drop a PNG here or click / paste (Ctrl+V) — processed locally
Result
no result yet

List image pixels as rgba values prints every pixel as rgba(r, g, b, a), with whole numbers from 0 to 255 and the alpha running through the same range. That is the CSS spelling of a color, and the same form turns up in canvas scripts, design tokens and documentation — the convenient one to read when a number has to be understandable rather than compact. The pixels are listed one image row per line, so you can still count the width by counting the values on a line. What you get is always the decoded pixels: a JPG has no alpha channel, so its fourth value is 255 on every line.

  • Decoded entirely in your browser: no upload, no server, no signup.
  • rgba(r, g, b, a) per pixel, one image row per line.
  • Alpha runs 0 to 255 — multiply a CSS 0-to-1 opacity by 255.
  • The RGB values to PNG tool rebuilds the image from exactly this form.
  • Free with no daily limit, no watermark and no account, also for commercial use.

How to use it

  1. Drop the image into the source area, or pick a file from your device.
  2. Read the rgba(r, g, b, a) groups in the result panel, one image row per line.
  3. Press the copy button to put the whole list on the clipboard.
  4. Paste it into a stylesheet, a canvas script or a token file.

Questions

Why is the alpha written as 255 and not as a fraction?

A channel is a byte, so it runs from 0 to 255. CSS opacity uses 0 to 1, so a value from a stylesheet must be multiplied by 255.

Which of the three pixel formats should I pick?

Use the rgba list when a person has to read the numbers, hex when you want half as many characters, and plain bytes for a typed array.

Can I turn the list back into an image?

Yes. The RGB values to PNG tool rebuilds the picture from exactly this form as soon as you give it the width of a row.

Does the listing show the transparent parts?

Yes, as rgba(..., 0). If every alpha reads 255, the source had no transparency to begin with - a JPG cannot hold any.

Related tools