a color value association to color name does not match w3c color name for green...
PPAC37 opened this issue · comments
if we want to name the color as in https://www.w3.org/TR/css-color-3/#svg-color
case 0x00ff00:// = w3c "lime" https://www.w3.org/TR/css-color-3/#normative
name = "lime";
break;
case 0x008000:// = w3c "green" https://www.w3.org/TR/css-color-3/#normative
name = "green";
break;
yes it's not a big deal but ...
You think of color sets that match some theme ?
like "christmas" = { "red", "green", "white", ... }
and
Or a way to present / group the colors that would be close to each other in a color chart ?
( a bit like what is done on https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#color )
It's an idea, but need to ask for permission unless free to use their associated name / color list ... from what I can read,
https://fr.wikipedia.org/wiki/Pantone_(company)
"Pantone's color list is subject to intellectual property rights (as a copyright and not as a software patent) and is therefore not free to use, which is why Pantone values are not available in free software such as GNU Image Manipulation Program (GIMP)."
maybe there is a way around this, like making a voluntary typo so that it is not exactly the same name but that it is easily guessed like Bleu => BeBleu , Red => ReRed? ;)
why not just the name as defined in the w3c ? no copyright problem and names on the list are already chosen...
Yes to use W3C color naming.
It will just be necessary to agree on when there are several names for the same value which one is used.
ex :
case 0x00ffff: name = "aqua"; // [aqua, cyan]
break;
case 0xff00ff: name = "fuchsia"; // [fuchsia, magenta]
break;
case 0x808080: name = "gray"; // [gray, grey]
break;
case 0x2f4f4f: name = "darkslategray"; // [darkslategray, darkslategrey]
break;
case 0x696969: name = "dimgray"; // [dimgray, dimgrey]
break;
case 0x708090: name = "slategray"; // [slategray, slategrey]
break;
case 0x778899: name = "lightslategray"; // [lightslategray, lightslategrey]
break;
case 0xa9a9a9: name = "darkgray"; // [darkgray, darkgrey]
break;
case 0xd3d3d3: name = "lightgray"; // [lightgray, lightgrey]
break;