图片灰度转换
使用加权 RGB 亮度近似生成灰度 PNG。
输入
提示:按 Ctrl + Enter 运行
下方的详细帮助目前仅提供英文版。
关于此工具
Converting to grayscale is useful for printing on black-and-white printers, for a classic photo look, for checking contrast in a design, and for preparing scans and documents. Simply averaging red, green and blue gives a flat, unnatural result because the eye is much more sensitive to green than to blue.
This tool uses the standard luminance weights from the sRGB/Rec. 709 colour standard, so bright greens stay light and deep blues become dark, as they appear to the eye. The result is saved as a lossless PNG.
Grayscale versions are also a quick accessibility check: if two important colours in a chart or logo turn into the same gray, people with colour-vision deficiencies may struggle to tell them apart too.
使用方法
- Choose a colour image.
- Run it.
- Download the grayscale PNG.
计算原理
For each pixel, gray = 0.2126 × R + 0.7152 × G + 0.0722 × B (rounded), and red, green and blue are all set to that value. Transparency is kept.
gray = 0.2126R + 0.7152G + 0.0722B计算示例
A teacher wants a colour map to print clearly on the school’s black-and-white printer. Converted to grayscale, the green parks stay light and the blue lake becomes a darker gray, so areas remain distinguishable: a plain average would have made them almost the same shade.
示例输入和结果
RGB → 灰度
局限性
- Fixed luminance formula; no channel mixer or tint.
- Output is PNG only.
- Very large images are limited by device memory.
最后更新:
常见问题
Is grayscale the same as black and white?
Grayscale has 256 shades of gray; pure black-and-white (1-bit) has only two.
Can I adjust contrast?
Not here; use the photo enhancer first if the image is flat.
Is the original changed?
No. A new file is created and nothing is uploaded.
故障排除
The result looks washed out.
The original had low contrast; enhance it before converting.
File size increased.
PNG is lossless; convert to JPG if size matters.
Transparent areas look black in a viewer.
They are still transparent; some viewers show black.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。