Skip to content

Instantly share code, notes, and snippets.

@Magneticdud
Last active October 13, 2017 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Magneticdud/10a78930115b37468e6894ef619c46f9 to your computer and use it in GitHub Desktop.
Save Magneticdud/10a78930115b37468e6894ef619c46f9 to your computer and use it in GitHub Desktop.
Make an XML which doesn't work
var finalxml = "<?xml version=\"1.0\"?>\n";
finalxml += "<palette guid=\"";
var guid = '00000000-0000-0000-0000-000000000000';
finalxml += guid;
finalxml += '" name="Variazioni di quadricromia"><colors><page>'
//colori
var m,y,k;
//esempio: <color cs="CMYK" tints="0,0,0,1"/>
//<color tints="0.0431373,0.796078,0.745098,0.0431373" cs="CMYK"/>
for (var c = 0; c <= 1; c+=0.2)
{
for ( m = 0; m <= 1; m+=0.2)
{
for ( y = 0; y <= 1; y+=0.2)
{
for ( k = 0; k <= 0.8; k+=0.2)
{
finalxml+='<color cs="CMYK" tints="'+c+','+m+','+y+','+k+'"/>';
}
}
}
}
//chiusura
finalxml += '</page></colors></palette>';
console.log(finalxml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment