### ImageMagick version

7.1.1-8

### Operating system

Linux

### Operating system, version and so on

Gentoo

### Description

I tried every combination of `-colorspace gray`, `-type gray` and `-define png:color-type=0` (which produces an error) but can't get a grayscale PNG when using the builtin `logo:` as input.

### Steps to Reproduce

```
$ magick convert -colorspace gray -type gray logo: logo.png
$ magick identify logo.png
logo.png PNG 640x480 640x480+0+0 8-bit sRGB 174c 26205B 0.000u 0:00.000
$ magick convert -colorspace gray -type grayscale -define png:color-type=0 logo: logo.png
convert: Cannot write image with defined png:bit-depth or png:color-type. `logo.png' @ warning/png.c/MagickPNGWarningHandler/1526.
```

### Images

_No response_
Force grayscale PNG output for paletted input
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Force grayscale PNG output for paletted input
Issue date:

--- start body ---
### ImageMagick version

7.1.1-8

### Operating system

Linux

### Operating system, version and so on

Gentoo

### Description

I tried every combination of `-colorspace gray`, `-type gray` and `-define png:color-type=0` (which produces an error) but can't get a grayscale PNG when using the builtin `logo:` as input.

### Steps to Reproduce

```
$ magick convert -colorspace gray -type gray logo: logo.png
$ magick identify logo.png
logo.png PNG 640x480 640x480+0+0 8-bit sRGB 174c 26205B 0.000u 0:00.000
$ magick convert -colorspace gray -type grayscale -define png:color-type=0 logo: logo.png
convert: Cannot write image with defined png:bit-depth or png:color-type. `logo.png' @ warning/png.c/MagickPNGWarningHandler/1526.
```

### Images

_No response_
--- end body ---
