Last active
October 13, 2017 16:32
-
-
Save Magneticdud/10a78930115b37468e6894ef619c46f9 to your computer and use it in GitHub Desktop.
Make an XML which doesn't work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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