You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--color transparent is accepted and listed as a known name, but produces solid black icons #158
transparent is one of the accepted colour names. The README lists it ("Choosing a Colour", line 111), and the validation error message prints it through ColorParser.KnownNames.
IconHelper deliberately discards the colour's alpha, because the output alpha carries the coverage. NamedColors.Transparent is #00000000, so its RGB is 0,0,0. Every icon therefore comes out as an opaque black coverage mask, and the tool exits 0. A user who asked for "transparent" gets the opposite of what the word means, and nothing tells them.
Evidence
IconHelper/ColorParser.cs:30: NamedColors.TryGet(trimmed, out color) accepts transparent.
In ktsu.Semantics.Color, NamedColors.Transparent is Color.FromHex("#00000000").
IconHelper.Test/ColorParserTests.cs:87 asserts that KnownNames contains "transparent".
Suggested fix
Reject transparent in ColorParser.TryParse or Arguments.Validate. The message should explain that the output alpha is the coverage, so a fully transparent colour has no meaning here.
Drop transparent from KnownNames, and update the README list and the test to match.
Optional: also reject any 8-digit hex whose alpha is 00. The README already says that alpha is ignored.
Acceptance criteria
iconhelper -c transparent … exits 1 with a clear message.
transparent no longer appears in the known-names list or in the README.
Priority: Low. Only someone who explicitly passes --color transparent is affected, and the result (black icons) is obvious as soon as they look at it. The fix is small: reject the name in ColorParser/Arguments.Validate, and update KnownNames, the README and ColorParserTests.
Area:IconHelper/ColorParser.cs (colour-argument parsing and validation)
Activity
matt-edmondson commentedon Oct 30, 2026
Triage
--color transparentis affected, and the result (black icons) is obvious as soon as they look at it. The fix is small: reject the name inColorParser/Arguments.Validate, and updateKnownNames, the README andColorParserTests.IconHelper/ColorParser.cs(colour-argument parsing and validation)Padding * 2overflows, and every icon comes out as 1–2 pixels of content with exit 0 #153 and Negative --padding passes validation and silently produces a wrongly-sized output image #115 are other inputs that pass validation but produce wrong output. Output PNGs keep the source's ICC profile, gAMA and EXIF orientation, so icons processed with the same --color render in different colours and rotations #126 is another way the output colour doesn't match what was asked.Generated by Claude Code