lib/parsecolor: add magenta

This commit is contained in:
Nigel Tao committed 2026-05-01 09:07:11 +10:00
1 parent f731cfc72f
commit a3ae753865
3 files changed
+11 -4

No files matched your search

+4 -1
View File
@@ -133,7 +133,10 @@ var offsets = [...]uint32{
0x43FF9800, // orange
0x48795548, // brown
0x4C9E9E9E, // gray
// Ad-hoc synonyms for some of the official Material Design names.
0x509E9E9E, // grey
0x579C27B0, // magenta
}
const names = "blackwhiteredpinkpurpleindigobluecyantealgreenlimeyellowamberorangebrowngraygrey"
const names = "blackwhiteredpinkpurpleindigobluecyantealgreenlimeyellowamberorangebrowngraygreymagenta"
+1
View File
@@ -30,6 +30,7 @@ func TestParse(tt *testing.T) {
{color.NRGBA{0xff, 0x98, 0x00, 0xff}, true, "orange"},
{color.NRGBA{0xcf, 0xcf, 0xcf, 0xff}, true, "lightgray"},
{color.NRGBA{0x9e, 0x9e, 0x9e, 0xff}, true, "grey"},
{color.NRGBA{0x9c, 0x27, 0xb0, 0xff}, true, "magenta"},
{color.NRGBA{0xab, 0xc1, 0x23, 0xff}, true, "#abc123"},
{color.NRGBA{0xab, 0xc1, 0x23, 0xff}, true, "abc123"},