Grayscale Image
Open a picture and see it grey next to the colour original. The recipe for the grey matters, so you can switch it.
https://flxcode.com/grayscale-image/
or drop it here, or paste with Ctrl+V
JPG, PNG, WebP, HEIC, AVIF, GIF and BMP, up to 25 megapixels. Nothing is uploaded.
Works offline: load this page, edit one picture, turn off Wi-Fi, edit more. A JPG has no see-through areas, so they turn white.
Nothing you open or type is uploaded. How we count What this tool keeps and sends.
Problem or idea? Email us
How to make a picture grayscale
- Choose a picture, or drop or paste one. It opens in this tab.
- The grey version shows next to the original. "Standard" is right for most photos.
- Try "Red filter" on a landscape: blue sky goes dark and clouds stand out. Lower the amount to keep some colour.
- Press Save as PNG, or Save as JPG for a smaller file.
How the grey is found
Grayscale means red, green and blue get the same value. Which value is the whole question. The eye sees green much brighter than blue, so the standard recipe weights them: grey = 0.2126 R + 0.7152 G + 0.0722 B. These are the Rec. 709 weights, and the CSS grayscale() filter uses them too. Pure green comes out 182 and pure blue only 18.
Video and Pillow use the older Rec. 601 weights, 0.299, 0.587 and 0.114. Pure green is then 150 and pure blue 29. A plain average gives both 85, so a green and a blue look equally bright, which they do not on a screen.
"Light-true" decodes the sRGB values to linear light first, applies the Rec. 709 weights, then encodes again. Pure red goes from 54 to 127. A single channel (red, green or blue) copies that channel into all three, like a colour filter on black and white film.
Rec. 709: grey = 0.2126 R + 0.7152 G + 0.0722 B
Rec. 601: grey = 0.299 R + 0.587 G + 0.114 B
Light-true: grey = encode(0.2126 lin(R) + 0.7152 lin(G) + 0.0722 lin(B))
Amount: out = v + (grey - v) × amount
Five colours, five recipes
Grey levels from 0 to 255. The numbers come from the same code as the tool, run when this page was built.
| Colour | Code | Rec. 709 | Rec. 601 | Light-true | Average | Red only |
|---|---|---|---|---|---|---|
| Pure green | #00FF00 | 182 | 150 | 220 | 85 | 0 |
| Pure blue | #0000FF | 18 | 29 | 76 | 85 | 0 |
| Pure red | #FF0000 | 54 | 76 | 127 | 85 | 255 |
| Sky blue | #3A7BD5 | 116 | 114 | 123 | 131 | 58 |
| Skin tone | #E0AC8C | 181 | 184 | 183 | 179 | 224 |
At amount 50% a pure red pixel comes out #9B1B1B: half way between red and its grey. Alpha is copied as it is.
What it can not do
- It does not mix channels by hand like a photo editor black and white panel. You pick one of eight recipes, nothing in between.
- The weights assume sRGB. A picture with a wide-gamut or CMYK profile is read as sRGB and goes out as sRGB.
- The result is still an RGB file with three equal channels. It is not saved as a one-channel grey file, so it is not smaller for that reason.
- Up to 25 megapixels. A JPG is saved at quality 92 and has no see-through areas.
Next: cut the greys into a few flat levels · colour the greys with a ramp · make the file smaller
FAQ
Why does my grayscale look different in another program?
Programs pick different weights. This page defaults to Rec. 709, like browsers do. Pillow and old video tools use Rec. 601. The difference is small on most photos, but a pure blue shifts from 18 to 29.
Which setting is best for a portrait?
Standard is a safe start. The red filter makes skin lighter and smoother, because skin has a lot of red. The blue-only channel does the opposite and shows blemishes.
What does "Light-true" do?
It does the sum in linear light, which is how light adds up physically, then goes back to sRGB. Saturated colours come out brighter than with Standard. Neither is wrong, they are two definitions.
Can I keep one colour and make the rest grey?
Not here. This page grays the whole picture. Lower the amount to keep a weak trace of colour everywhere.
Is a grayscale picture the same as a black and white one?
Here it is a grey picture with 256 levels. A strict black and white picture has two levels only. For that, use Posterize with 2 levels and then grey the result.
More from FLXCode
- Posterize ImageCut each colour channel to a few flat levels, or keep only the top bits. Save as PNG or JPG. Nothing is uploaded.
- Gradient Map and DuotoneColour a picture by brightness with 2 to 5 colours. Two make a duotone. PNG or JPG. Nothing is uploaded.
- Invert Image ColorsFlip every colour of a picture, or single channels, or only the lightness. Save as PNG or JPG. Nothing is uploaded.
- Remove Background from ImageCut the background out of product and pet photos in your browser, fix it with a brush or clicks. Nothing is uploaded.