{"id":67690,"date":"2024-06-28T20:07:08","date_gmt":"2024-06-28T16:37:08","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/turning-adobe-illustrator-into-a-people-generator-aka-a-dress-up-doll-maker-29j1\/"},"modified":"2024-06-28T20:07:08","modified_gmt":"2024-06-28T16:37:08","slug":"turning-adobe-illustrator-into-a-people-generator-aka-a-dress-up-doll-maker-29j1","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/turning-adobe-illustrator-into-a-people-generator-aka-a-dress-up-doll-maker-29j1\/","title":{"rendered":"\u062a\u0628\u062f\u06cc\u0644 Adobe Illustrator \u0628\u0647 \u06cc\u06a9 \u062a\u0648\u0644\u06cc\u062f\u06a9\u0646\u0646\u062f\u0647 \u0645\u0631\u062f\u0645 (\u0645\u0639\u0631\u0648\u0641 \u0628\u0647 \u0639\u0631\u0648\u0633\u06a9 \u0633\u0627\u0632 \u0644\u0628\u0627\u0633)"},"content":{"rendered":"<div data-article-id=\"1904355\" id=\"article-body\">\n<p><strong>\u0645\u0634\u06a9\u0644<\/strong><br \/>\u0627\u062e\u06cc\u0631\u0627\u064b \u06cc\u06a9 \u0633\u0648\u0627\u0644 \u0628\u0633\u06cc\u0627\u0631 \u0633\u062e\u062a \u062f\u0627\u0634\u062a\u0645: \u067e\u0631 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u0635\u062f\u0647\u0627 \u0634\u062e\u0635\u06cc\u062a \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u062f\u0631 \u06a9\u0645\u062a\u0631 \u0627\u0632 2 \u0647\u0641\u062a\u0647.  \u0627\u06cc\u0646 \u0628\u0647 \u0637\u0648\u0631 \u0637\u0628\u06cc\u0639\u06cc \u06cc\u06a9 \u062f\u0633\u062a\u0648\u0631 \u0628\u0633\u06cc\u0627\u0631 \u0628\u0644\u0646\u062f \u0627\u0633\u062a\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0646 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0634\u06a9\u0633\u062a\u0645.<\/p>\n<p>\u0645\u0646 \u0647\u0631\u06af\u0632 \u0627\u0632 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0631 \u0631\u0648\u06cc \u0647\u06cc\u0686 \u0686\u06cc\u0632 \u062f\u06cc\u06af\u0631\u06cc \u063a\u06cc\u0631 \u0627\u0632 \u0627\u0641\u062a\u0631 \u0627\u0641\u06a9\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0631\u062f\u0647 \u0627\u0645\u060c \u0627\u0645\u0627 \u0645\u06cc \u062f\u0627\u0646\u0633\u062a\u0645 \u06a9\u0647 \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0647\u0627 \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0627\u06cc\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0627\u062f\u0648\u0628\u06cc \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u0648 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f.  \u0645\u0646 \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0631\u062f\u0645 \u0648 \u0641\u0647\u0645\u06cc\u062f\u0645 \u06a9\u0647 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u0645 \u062e\u06cc\u0644\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0646\u06cc\u0633\u062a.<\/p>\n<p>\u062a\u0646\u0647\u0627 \u06a9\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0627\u062f\u0645 \u0627\u06cc\u0646 \u0628\u0648\u062f \u06a9\u0647 \u0628\u062e\u0634 \u0647\u0627\u06cc\u06cc \u0627\u0632 \u0628\u062f\u0646 \u0631\u0627 \u062a\u0631\u0633\u06cc\u0645 \u06a9\u0646\u0645 \u06a9\u0647 \u0642\u0627\u0628\u0644 \u062a\u0639\u0648\u06cc\u0636 \u0628\u0648\u062f\u0646\u062f.  \u0645\u0646 \u0642\u0628\u0644\u0627\u064b \u0628\u0627 \u0627\u06cc\u0646 \u0627\u06cc\u062f\u0647 \u0628\u0627\u0632\u06cc \u06a9\u0631\u062f\u0647 \u0627\u0645\u060c \u062f\u0631 \u0646\u0648\u062c\u0648\u0627\u0646\u06cc \u0627\u0645 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0641\u0644\u0634 \u0639\u0631\u0648\u0633\u06a9 \u0647\u0627\u06cc \u0622\u0631\u0627\u06cc\u0634\u06cc \u062f\u0631\u0633\u062a \u06a9\u0631\u062f\u0647 \u0627\u0645 \u0648 \u0627\u062e\u06cc\u0631\u0627\u064b \u0628\u0627 picrew \u0628\u0627\u0632\u06cc \u06a9\u0631\u062f\u0647 \u0627\u0645.  \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0646 \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0646\u0648\u06cc\u0633\u0645 \u06a9\u0647 \u0628\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u06a9\u0627\u0641\u06cc \u0647\u0648\u0634\u0645\u0646\u062f \u0628\u0627\u0634\u062f \u06a9\u0647 \u0628\u06af\u0648\u06cc\u062f &#8220;\u062f\u0631 \u0647\u0631 \u0644\u0627\u06cc\u0647\u060c \u062a\u0645\u0627\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0631\u0627 \u062e\u0627\u0645\u0648\u0634 \u06a9\u0646\u06cc\u062f\u060c \u0633\u067e\u0633 \u06cc\u06a9\u06cc \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0648\u0628\u0627\u0631\u0647 \u0631\u0648\u0634\u0646 \u06a9\u0646\u06cc\u062f.&#8221;  \u0627\u06af\u0631 \u0628\u062a\u0648\u0627\u0646\u0645 \u0631\u0646\u06af \u067e\u0648\u0633\u062a \u0648 \u0644\u0628\u0627\u0633\u200c\u0647\u0627 \u0631\u0627 \u0647\u0645 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0631\u0628\u06cc\u0627\u0648\u0631\u0645\u060c \u0627\u0645\u062a\u06cc\u0627\u0632 \u067e\u0627\u062f\u0627\u0634.<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u0646\u062d\u0648\u0647 \u0631\u0633\u06cc\u062f\u0646 \u0645\u0646 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0647\u0645 \u0627\u0633\u062a.<\/p>\n<p><strong>\u0631\u0648\u0634\u0646 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u062a\u0635\u0627\u062f\u0641\u06cc<\/strong><br \/>\u0634\u0631\u0648\u0639 \u06a9\u0631\u062f\u0645 \u0628\u0647 \u0622\u0632\u0645\u0627\u06cc\u0634 \u0627\u06cc\u062f\u0647 \u0627\u0645 \u0631\u0648\u06cc \u0627\u0634\u06a9\u0627\u0644.  \u0645\u06cc\u200c\u062f\u0627\u0646\u0633\u062a\u0645 \u0627\u06af\u0631 \u0628\u062a\u0648\u0627\u0646\u0645 \u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0628\u0631\u0627\u06cc 1 \u0644\u0627\u06cc\u0647 \u06a9\u0627\u0631 \u06a9\u0646\u0645\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0645 \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0686\u0646\u062f \u0644\u0627\u06cc\u0647 \u06a9\u0627\u0631 \u06a9\u0646\u0645.  \u06cc\u06a9 \u0633\u0646\u062f \u0628\u0627 1 \u0644\u0627\u06cc\u0647 \u0648 4 \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0631\u062f\u0645 \u0648 \u0631\u0648\u06cc \u0647\u0631 \u06a9\u062f\u0627\u0645 \u06cc\u06a9 \u0634\u06a9\u0644 \u0633\u0627\u062f\u0647 \u06a9\u0634\u06cc\u062f\u0645: \u0645\u0631\u0628\u0639\u060c \u062f\u0627\u06cc\u0631\u0647\u060c \u0633\u062a\u0627\u0631\u0647 \u0648 \u0645\u062b\u0644\u062b.<\/p>\n<p>\u0645\u0646 \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0627\u0632 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0628\u0647 \u062c\u0627\u06cc \u06af\u0631\u0648\u0647\u200c\u0647\u0627\/ \u0622\u06cc\u062a\u0645\u200c\u0647\u0627\u06cc \u0645\u0633\u06cc\u0631 \u0622\u0632\u0627\u062f\/ \u0645\u0633\u06cc\u0631\u0647\u0627\u06cc \u0645\u0631\u06a9\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0645\u060c \u0632\u06cc\u0631\u0627 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u0628\u0648\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0645 \u0622\u062b\u0627\u0631 \u0647\u0646\u0631\u06cc \u0631\u0627 \u0645\u0631\u062a\u0628 \u0646\u06af\u0647 \u062f\u0627\u0631\u0645 \u0648 \u06a9\u062f \u0645\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0633\u062a \u062b\u0627\u0628\u062a \u0628\u0645\u0627\u0646\u062f.<\/p>\n<p><\/p>\n<p>\u0645\u0646 adobe ExtendScript CC \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0631\u062f\u0645.  \u0645\u0646 \u062f\u0648\u0633\u062a \u062f\u0627\u0631\u0645 \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0645 \u0632\u06cc\u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0628\u062f\u0648\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0630\u062e\u06cc\u0631\u0647 \u0641\u0627\u06cc\u0644 jsx. \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u0628\u0647 illustrator \u0645\u062a\u0635\u0644 \u0634\u0648\u062f.<\/p>\n<p>\u0627\u0648\u0644\u06cc\u0646 \u06a9\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0627\u062f\u0645 \u0627\u06cc\u0646 \u0628\u0648\u062f \u06a9\u0647 \u0628\u0647 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u06af\u0648\u06cc\u0645 \u062a\u0645\u0627\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0631\u0627 \u0628\u0686\u0631\u062e\u0627\u0646\u062f <strong>\u062e\u0627\u0645\u0648\u0634<\/strong>.  \u0627\u06cc\u0646 \u0628\u0631\u0627\u06cc \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0648\u0642\u062a\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0686\u0646\u062f\u06cc\u0646 \u0628\u0627\u0631 \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f\u060c \u0647\u06cc\u0686 \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u0628\u0627\u0642\u06cc \u0646\u0645\u06cc \u0645\u0627\u0646\u062f.  \u0645\u0646 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062d\u0644\u0642\u0647\u200c\u0647\u0627\u06cc for \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var doc = app.activeDocument;\n\nfunction hideAll() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  for (a = 0; a &lt; doc.layers[i].layers.length; a++) {\n   doc.layers[i].layers[a].visible = false;\n   }\n  }\n };\n\nhideAll();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627\u060c \u0645\u0646 \u06cc\u06a9 \u0645\u062a\u063a\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0633\u0646\u062f \u0641\u0639\u0627\u0644 \u062e\u0648\u062f \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0631\u062f\u0645 \u062a\u0627 \u0627\u0632 \u062a\u0627\u06cc\u067e \u0645\u06a9\u0631\u0631 &#8220;app.activeDocument&#8221; \u062f\u0631 \u0637\u0648\u0644 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062e\u0648\u062f\u062f\u0627\u0631\u06cc \u06a9\u0646\u0645.  \u0633\u067e\u0633 \u062a\u0627\u0628\u0639 \u062e\u0648\u062f &#8220;hideAll&#8221; \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645.  \u0627\u0648\u0644\u06cc\u0646 \u062d\u0644\u0642\u0647 for \u062f\u0631 \u0647\u0631 \u0644\u0627\u06cc\u0647 \u062f\u0631 \u0633\u0646\u062f \u0628\u0647 \u0646\u0648\u0628\u0647 \u062e\u0648\u062f \u0686\u0631\u062e\u0647 \u0645\u06cc \u0632\u0646\u062f\u060c \u0633\u067e\u0633 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u062f\u0631 \u0647\u0645\u0647 \u0622\u0646\u0647\u0627 \u062d\u0644\u0642\u0647 \u0632\u062f \u0645\u062a\u0648\u0642\u0641 \u0645\u06cc \u0634\u0648\u062f (\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 &#8220;i < doc.layers.length\" \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u062a\u0639\u062f\u0627\u062f \u0644\u0627\u06cc\u0647 \u0647\u0627\u060c \u0648 \"i++\" \u0628\u0647 \u0635\u0648\u0631\u062a \u0627\u0641\u0632\u0627\u06cc\u0634\u06cc 1 \u0631\u0627 \u0628\u0647 \u0645\u0642\u062f\u0627\u0631 i \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0647 \u062d\u062f\u0627\u06a9\u062b\u0631 \u062a\u0639\u062f\u0627\u062f \u0644\u0627\u06cc\u0647 \u0628\u0631\u0633\u06cc\u0645).  \u062d\u0644\u0642\u0647 \u062f\u0648\u0645 \u062f\u0631 \u062a\u0645\u0627\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u062f\u0631 \u0647\u0631 \u0644\u0627\u06cc\u0647 \u062d\u0644\u0642\u0647 \u0645\u06cc \u0632\u0646\u062f\u060c \u0633\u067e\u0633 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u062f\u0631 \u0647\u0645\u0647 \u0622\u0646\u0647\u0627 \u062d\u0644\u0642\u0647 \u0632\u062f\u0647 \u0627\u0633\u062a \u0645\u062a\u0648\u0642\u0641 \u0645\u06cc \u0634\u0648\u062f (\u0627\u0631\u062c\u0627\u0639 \u0628\u0647 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u062f\u0631 illustrator \u0628\u0647 \u0633\u0627\u062f\u06af\u06cc \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06a9\u0631\u0631 \u0627\u0632 \"\u0644\u0627\u06cc\u0647 \u0647\u0627 \u062f\u0627\u0631\u062f.[index]\"\u060c \u0628\u0647 \u0647\u0645\u06cc\u0646 \u062f\u0644\u06cc\u0644 \u0627\u0633\u062a \u06a9\u0647 \u0645\u0646 \u0627\u06cc\u0646 \u06af\u0631\u062f\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062f\u0645. \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062d\u0644\u0642\u0647 \u0627\u0632 \u0647\u0631 \u0632\u06cc\u0631 \u0644\u0627\u06cc\u0647 \u0639\u0628\u0648\u0631 \u0645\u06cc \u06a9\u0646\u062f\u060c \u062f\u06cc\u062f \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u0631\u0627 \u0631\u0648\u06cc \"false\" \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0622\u0646 \u0631\u0627 \u062e\u0627\u0645\u0648\u0634 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fob9np4e69rs1trk1rxyp.jpg\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"540\" height=\"352\" title=\"\"><\/p>\n<p>\u0628\u0639\u062f \u0645\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0686\u0631\u062e\u0634 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0627\u0634\u062a\u0645 <strong>\u0628\u0631<\/strong> \u06cc\u06a9 \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u062a\u0635\u0627\u062f\u0641\u06cc  \u0641\u06a9\u0631 \u06a9\u0631\u062f\u0645 \u062a\u0645\u0627\u0645 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0634\u062a\u0645 \u06cc\u06a9 \u0645\u062a\u063a\u06cc\u0631 \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0648\u062f \u0648 \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0646\u0645\u0627\u06cc\u0627\u0646 \u0628\u0648\u062f\u0646 \u0644\u0627\u06cc\u0647 \u0641\u0631\u0639\u06cc \u0631\u0648\u06cc true.  \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0646 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>function showRandom() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  var randomLayerCount = Math.floor(Math.random() * doc.layers[i].layers.length);\n  doc.layers[i].layers[randomLayerCount].visible = true;\n  }\n };\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>showRandom \u0627\u0632 \u0647\u0631 \u0644\u0627\u06cc\u0647 \u062f\u0631 \u0633\u0646\u062f \u0639\u0628\u0648\u0631 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u06cc\u06a9 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0631\u0627\u06cc \u0645\u062a\u063a\u06cc\u0631 &#8220;randomLayerCount&#8221; \u0628\u06cc\u0646 0 \u0648 \u062a\u0639\u062f\u0627\u062f \u0632\u06cc\u0631 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0644\u0627\u06cc\u0647 \u0641\u0639\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f.  \u0627\u0632 &#8220;Math.random&#8221; \u0628\u0631\u0627\u06cc \u062a\u0635\u0627\u062f\u0641\u06cc \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u0639\u062f\u062f \u0628\u06cc\u0646 0 \u0648 1 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0622\u0646 \u0639\u062f\u062f \u0631\u0627 \u062f\u0631 \u062a\u0639\u062f\u0627\u062f \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0636\u0631\u0628 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u0627\u0632 &#8220;Math.floor&#8221; \u0628\u0631\u0627\u06cc \u06af\u0631\u062f \u06a9\u0631\u062f\u0646 \u0622\u0646 \u0639\u062f\u062f \u0628\u0647 \u06cc\u06a9 \u0639\u062f\u062f \u0635\u062d\u06cc\u062d \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.  \u0633\u067e\u0633 \u062d\u0644\u0642\u0647 for \u0632\u06cc\u0631 \u0644\u0627\u06cc\u0647 \u0627\u06cc \u0631\u0627 \u0631\u0648\u0634\u0646 \u0645\u06cc \u06a9\u0646\u062f \u06a9\u0647 \u0639\u062f\u062f \u0634\u0627\u062e\u0635 \u0622\u0646 \u0628\u0627 \u0639\u062f\u062f \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0628\u0647 \u0637\u0648\u0631 \u062a\u0635\u0627\u062f\u0641\u06cc \u0645\u0637\u0627\u0628\u0642\u062a \u062f\u0627\u0631\u062f.  \u0633\u067e\u0633 \u0647\u0631 \u062f\u0648 \u062a\u0627\u0628\u0639 \u0631\u0627 \u0628\u0627 \u0647\u0645 \u0627\u062c\u0631\u0627 \u0645\u06cc \u06a9\u0646\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>hideAll();\nshowRandom();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0628\u0631\u0627\u06cc \u0631\u0648\u0634\u0646 \u06a9\u0631\u062f\u0646 \u062a\u0635\u0627\u062f\u0641\u06cc \u06cc\u06a9\u06cc \u0627\u0632 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0634\u06a9\u0644.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8ugj7cqrtiujoni48xu.gif\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"611\" height=\"400\" data-animated=\"true\" title=\"\"><\/p>\n<p><strong>\u0631\u0646\u06af \u062a\u0635\u0627\u062f\u0641\u06cc<\/strong><br \/>\u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f!  \u062d\u0627\u0644\u0627 \u0628\u0647 \u0631\u0646\u06af \u0647\u0627 \u0641\u06a9\u0631 \u06a9\u0646\u06cc\u0645.  \u0627\u06af\u0631 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u0645\u0648\u0644\u062f \u0645\u0631\u062f\u0645 \u0648\u0627\u0642\u0639\u0627\u064b \u06a9\u0627\u0631 \u06a9\u0646\u062f\u060c \u0628\u0627\u06cc\u062f \u0628\u062a\u0648\u0627\u0646\u062f \u0631\u0646\u06af \u067e\u0648\u0633\u062a\u060c \u0631\u0646\u06af \u0645\u0648\u060c \u0631\u0646\u06af \u0644\u0628\u0627\u0633 \u0648 \u063a\u06cc\u0631\u0647 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u062f.<\/p>\n<p>\u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u0645\u0646 \u0628\u0647 \u062c\u0627\u06cc \u0627\u0631\u062c\u0627\u0639 \u0628\u0647 \u0646\u0645\u0648\u0646\u0647\u200c\u0647\u0627\u060c \u0631\u0646\u06af\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631\u0648\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645\u060c \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0633\u062a\u0645 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0628\u0631\u0627\u06cc \u0633\u0646\u062f \u062f\u06cc\u06af\u0631\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u0645.  \u0645\u0646 \u0631\u0646\u06af \u0647\u0627\u06cc\u0645 \u0631\u0627 \u0627\u06cc\u0646\u06af\u0648\u0646\u0647 \u0633\u0627\u062e\u062a\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var colour01 = new CMYKColor();\ncolour01.cyan = 3;\ncolour01.magenta = 11;\ncolour01.yellow = 18;\ncolour01.black = 0;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 \u0633\u0646\u062f \u0645\u0646 \u0628\u0627\u06cc\u062f \u0628\u0631\u0627\u06cc \u0686\u0627\u067e \u0628\u0627\u0634\u062f\u060c \u0627\u0632 CMYK \u0628\u0647 \u062c\u0627\u06cc RGB \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0645 (\u0627\u06af\u0631 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 RGB \u062f\u0627\u0631\u06cc\u062f\u060c \u0641\u0642\u0637 \u0627\u0632 &#8220;new RGBColor()&#8221; \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0647\u0631 \u0645\u0642\u062f\u0627\u0631 \u0631\u0646\u06af RGB \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f).  \u0645\u0646 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0631\u0646\u06af \u062c\u062f\u06cc\u062f\u0645 \u0631\u0627 \u062a\u0639\u06cc\u06cc\u0646 \u06a9\u0631\u062f\u0645 \u0648 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0647\u0631 \u0631\u0646\u06af\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u0645 \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f\u0645.<\/p>\n<p>\u0633\u067e\u0633 \u06cc\u06a9 \u0622\u0631\u0627\u06cc\u0647 \u0628\u0631\u0627\u06cc \u062a\u0645\u0627\u0645 \u0631\u0646\u06af\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0633\u062a\u0645 \u0686\u0631\u062e\u0647 \u0628\u0632\u0646\u0645 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645.  \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f\u060c \u0645\u0646 \u0645\u06cc\u200c\u062e\u0648\u0627\u0633\u062a\u0645 4 \u06af\u0632\u06cc\u0646\u0647 \u0645\u062e\u062a\u0644\u0641 \u0631\u0646\u06af \u067e\u0648\u0633\u062a \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var skinTones = [colour01, colour02, colour03, colour04];\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0648 \u06cc\u06a9 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0628\u0631\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0647\u0631 \u0631\u0646\u06af \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var skinRandom = Math.floor(Math.random() * skinTones.length);\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u062d\u0627\u0644\u0627 \u0627\u0634\u06a9\u0627\u0644 \u0631\u0627 \u0631\u0646\u06af \u06a9\u0646\u06cc\u062f.  \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u0645 \u0647\u0645\u0647 \u0634\u06a9\u0644\u200c\u0647\u0627 \u0631\u0627 \u0647\u0645\u0632\u0645\u0627\u0646 \u0631\u0646\u06af \u06a9\u0646\u0645\u060c \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u0645 \u0628\u0639\u062f \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062a\u0635\u0648\u06cc\u0631 \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u0645.  \u0627\u06cc\u0646 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u0628\u0648\u062f \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0631\u06af\u0631\u062f\u0645 <strong>\u0628\u0631<\/strong> \u062a\u0645\u0627\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc\u060c \u0628\u0647 \u0645\u0646\u0638\u0648\u0631 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646\u0647\u0627 \u0628\u0647 \u0627\u0647\u062f\u0627\u0641 \u0645\u0639\u062a\u0628\u0631 \u0628\u0631\u0627\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a.  \u0645\u0646 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645\u060c \u0628\u0631\u0639\u06a9\u0633 hideAll:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>function showAll() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  for (a = 0; a &lt; doc.layers[i].layers.length; a++) {\n   doc.layers[i].layers[a].visible = true;\n   }\n  }\n };\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u062d\u0627\u0644\u0627 \u0647\u0645\u0647 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0631\u0648\u0634\u0646 \u0628\u0648\u062f\u0646\u062f\u060c \u0645\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0633\u062a\u0645 \u062a\u0645\u0627\u0645 \u0627\u0634\u06a9\u0627\u0644 \u0631\u0627 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628 \u0645\u0631\u0648\u0631 \u06a9\u0646\u0645 \u0648 \u0631\u0646\u06af\u200c\u0647\u0627\u06cc\u0634\u0627\u0646 \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u062c\u062f\u06cc\u062f \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>function colourAll() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  doc.pathItems[i].fillColor = skinTones[skinRandom];\n  }\n };\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u06cc\u0646 \u062a\u0627\u0628\u0639 \u0627\u0632 \u062a\u0645\u0627\u0645 pathItem \u0647\u0627\u06cc \u0633\u0646\u062f \u0639\u0628\u0648\u0631 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0631\u0646\u06af \u0622\u0646\u0647\u0627 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc \u062f\u0647\u062f.  \u0645\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647 \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0641\u0642\u0637 \u0627\u0632 pathItems \u062f\u0631 \u0633\u0646\u062f \u062a\u0635\u0648\u06cc\u0631\u06af\u0631\u0645 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0647\u0627\u06cc \u0647\u0646\u0631\u06cc \u0646\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0645.  pathItem \u0647\u0627 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0627\u0635 \u0686\u06cc\u0633\u062a\u061f  \u0622\u0646\u0647\u0627 \u0647\u0631 \u0634\u06a9\u0644\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u062a\u0631\u0633\u06cc\u0645 \u062f\u0631 illustrator \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 &#8220;\u0645\u0633\u06cc\u0631&#8221; \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjmisgh3zuc8hklrco5cd.jpg\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"136\" height=\"49\" title=\"\"><\/p>\n<p>\u0627\u06cc\u0646 \u0628\u062f\u0627\u0646 \u0645\u0639\u0646\u0627\u0633\u062a \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0647 \u062e\u0627\u0637\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0645 \u06a9\u0647 \u0647\u0646\u06af\u0627\u0645 \u062a\u0631\u0633\u06cc\u0645 \u0642\u0637\u0639\u0627\u062a \u0628\u0631\u0627\u06cc \u0627\u0641\u0631\u0627\u062f\u0645 \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0633\u062a\u0645 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0639\u062f\u0627\u064b \u0631\u0646\u06af\u200c\u0622\u0645\u06cc\u0632\u06cc \u06a9\u0646\u062f (\u0648\u06af\u0631\u0646\u0647 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u06a9\u0627\u0631 \u0646\u0645\u06cc\u200c\u06a9\u0646\u062f) \u0627\u0632 \u0645\u0633\u06cc\u0631\u0647\u0627\u06cc \u0645\u0631\u06a9\u0628\u060c \u0627\u0644\u06af\u0648\u0647\u0627 \u06cc\u0627 \u0647\u0631 \u0686\u06cc\u0632 \u067e\u06cc\u0686\u06cc\u062f\u0647\u200c\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0646\u0645.<\/p>\n<p>\u0645\u0646 \u062a\u0648\u0627\u0628\u0639 \u062c\u062f\u06cc\u062f \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u0627\u0646\u062a\u0647\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>showAll();\ncolourAll();\nhideAll();\nshowRandom();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0647\u0645\u0647 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0631\u0627 \u0631\u0648\u0634\u0646 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0647\u0645\u0647 pathItems \u0631\u0627 \u0628\u0647 \u0631\u0646\u06af \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0632 \u0622\u0631\u0627\u06cc\u0647 \u0631\u0646\u06af \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0647\u0645\u0647 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0631\u0627 \u062e\u0627\u0645\u0648\u0634 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0633\u067e\u0633 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a 1 \u0631\u0627 \u0628\u0647\u200c\u0635\u0648\u0631\u062a \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u0631\u0648\u0634\u0646 \u0634\u0648\u062f.  \u0627\u06cc\u0646 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u06cc\u0634 \u0627\u0632 \u062d\u062f \u0645\u0633\u0627\u0626\u0644 \u0631\u0627 \u067e\u06cc\u0686\u06cc\u062f\u0647 \u06a9\u0646\u062f\u060c \u0627\u0645\u0627 \u0645\u062a\u0648\u062c\u0647 \u0634\u062f\u0645 \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0645\u0646\u060c \u0627\u06cc\u0646 \u0645\u0646\u0637\u0642\u06cc \u062a\u0631\u06cc\u0646 \u0645\u0639\u0646\u0627 \u0631\u0627 \u062f\u0627\u0631\u062f.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcrpmp5wv3bep3pjqklxm.gif\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"636\" height=\"400\" data-animated=\"true\" title=\"\"><\/p>\n<p><strong>\u0633\u0627\u062e\u062a\u0646 \u0645\u0631\u062f\u0645 \u0645\u0648\u0644\u062f<\/strong><br \/>\u0627\u0632 \u0627\u06cc\u0646\u062c\u0627\u060c \u0628\u0644\u0648\u06a9\u200c\u0647\u0627\u06cc \u0627\u0648\u0644\u06cc\u0647\u200c\u0627\u06cc \u0631\u0627 \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a\u0646 \u0646\u06cc\u0631\u0648\u06af\u0627\u0647\u0645 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0634\u062a\u0645\u060c \u062f\u0627\u0634\u062a\u0645.  \u0627\u06a9\u0646\u0648\u0646 \u0628\u0627\u06cc\u062f \u0641\u06a9\u0631 \u06a9\u0646\u0645 \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0628\u0631\u0627\u06cc \u0686\u0646\u062f\u06cc\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u0631\u0646\u06af \u0648 \u0686\u0646\u062f\u06cc\u0646 \u0644\u0627\u06cc\u0647 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f.  \u0645\u0646 \u0634\u06a9\u0644\u200c\u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc \u0631\u0627 \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 \u0645\u06a9\u0627\u0646\u06cc \u0628\u0631\u0627\u06cc \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0622\u062b\u0627\u0631 \u0647\u0646\u0631\u06cc \u062a\u0645\u0627\u0645\u200c\u0634\u062f\u0647\u200c\u0627\u0645\u060c \u062f\u0631 \u0686\u0646\u062f\u06cc\u0646 \u0644\u0627\u06cc\u0647 \u0648 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u0641\u0631\u0639\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645.<\/p>\n<p>\u0628\u0639\u062f \u0645\u0646 \u062f\u0631 \u0645\u062c\u0645\u0648\u0639 12 \u0631\u0646\u06af \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645 (\u0628\u0647 4 \u0631\u0646\u06af\u06cc \u06a9\u0647 \u0642\u0628\u0644\u0627\u064b \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u0634\u0648\u062f) \u062a\u0627 \u0631\u0646\u06af \u067e\u0648\u0633\u062a\u060c \u0645\u0648 \u0648 \u0644\u0628\u0627\u0633 \u0645\u0646 \u0628\u0627\u0634\u062f.  \u0633\u067e\u0633 \u0622\u0631\u0627\u06cc\u0647 \u0647\u0627 \u0648 \u0645\u0648\u0644\u062f\u0647\u0627\u06cc \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u0645\u060c \u0645\u0627\u0646\u0646\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var skinTones = [colour01, colour02, colour03, colour04];\nvar skinRandom = Math.floor(Math.random() * skinTones.length);\n\nvar clothesTones = [colour05, colour06, colour07, colour08];\nvar clothesRandom01 = Math.floor(Math.random() * clothesTones.length);\nvar clothesRandom02 = Math.floor(Math.random() * clothesTones.length);\nvar clothesRandom03 = Math.floor(Math.random() * clothesTones.length);\n\nvar hairTones = [colour09, colour10, colour11, colour12];\nvar hairRandom = Math.floor(Math.random() * hairTones.length);\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0645\u0646 \u0628\u0647 \u0644\u0628\u0627\u0633\u200c\u0647\u0627 3 \u0639\u062f\u062f \u0645\u0648\u0644\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u062f\u0627\u062f\u0645\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u067e\u06cc\u0631\u0627\u0647\u0646\u060c \u0634\u0644\u0648\u0627\u0631 \u0648 \u06a9\u0641\u0634 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0631\u0646\u06af\u200c\u0647\u0627\u06cc \u0645\u062a\u0641\u0627\u0648\u062a\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f.  \u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u0628\u06cc\u0634 \u0627\u0632 1 \u0622\u0631\u0627\u06cc\u0647 \u0631\u0646\u06af\u06cc \u062f\u0627\u0634\u062a\u0645\u060c \u0628\u0627\u06cc\u062f \u0628\u0647 \u0639\u0642\u0628 \u0628\u0631\u06af\u0631\u062f\u0645 \u0648 \u062a\u0627\u0628\u0639 &#8220;colourAll&#8221; \u062e\u0648\u062f \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u0645.  \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0627\u06cc\u0646 \u0631\u0627 \u0628\u0647 \u0686\u0646\u062f \u0639\u0645\u0644\u06a9\u0631\u062f \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0646\u0645: &#8220;colourSkin&#8221;\u060c &#8220;colourHair&#8221;\u060c &#8220;colourClothes01&#8243;\u060c &#8220;colourClothes02&#8221; \u0648 &#8220;colourClothes03&#8221;.  \u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646\u060c \u0645\u0646 \u0628\u0647 \u0631\u0627\u0647\u06cc \u0646\u06cc\u0627\u0632 \u062f\u0627\u0634\u062a\u0645 \u062a\u0627 \u0645\u0634\u062e\u0635 \u06a9\u0646\u0645 \u06a9\u062f\u0627\u0645 \u0645\u0633\u06cc\u0631 \u0628\u0627\u06cc\u062f \u0628\u0627 \u0631\u0646\u06af \u067e\u0648\u0633\u062a\u060c \u06a9\u062f\u0627\u0645 \u0644\u0628\u0627\u0633 \u0648 \u06a9\u062f\u0627\u0645 \u0645\u0648 \u0628\u0627\u06cc\u062f \u0631\u0646\u06af \u0634\u0648\u062f.  \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0627 \u0646\u0627\u0645\u06af\u0630\u0627\u0631\u06cc pathItems \u062e\u0648\u062f \u062f\u0631 illustrator \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u0645.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93j63wu6tayye7e3tqrd.jpg\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"323\" height=\"574\" title=\"\"><\/p>\n<p>\u0633\u067e\u0633 \u06cc\u06a9 \u062f\u0633\u062a\u0648\u0631 if \u0631\u0627 \u0628\u0647 \u062a\u0648\u0627\u0628\u0639 \u062c\u062f\u06cc\u062f \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0645\u060c \u0628\u0647 \u0637\u0648\u0631\u06cc \u06a9\u0647 \u0622\u0646\u0647\u0627 \u0641\u0642\u0637 pathItem \u0647\u0627\u06cc\u06cc \u0631\u0627 \u06a9\u0647 \u0646\u0627\u0645 \u0622\u0646\u0647\u0627 \u0628\u0627 \u062a\u0627\u0628\u0639 \u0645\u0637\u0627\u0628\u0642\u062a \u062f\u0627\u0631\u062f\u060c \u062f\u0648\u0628\u0627\u0631\u0647 \u0631\u0646\u06af \u0645\u06cc \u06a9\u0646\u0646\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>function colourSkin() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  if (doc.pathItems[i].name == \"skin\") doc.pathItems[i].fillColor = skinTones[skinRandom];\n  }\n };\n\nfunction colourHair() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  if (doc.pathItems[i].name == \"hair\") doc.pathItems[i].fillColor = hairTones[hairRandom];\n  }\n };\n\nfunction colourClothes01() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  if (doc.pathItems[i].name == \"clothes01\") doc.pathItems[i].fillColor = clothesTones[clothesRandom01];\n  }\n };\n\nfunction colourClothes02() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  if (doc.pathItems[i].name == \"clothes02\") doc.pathItems[i].fillColor = clothesTones[clothesRandom02];\n  }\n };\n\nfunction colourClothes03() {\n for (i = 0; i &lt; doc.pathItems.length; i++) {\n  if (doc.pathItems[i].name == \"clothes03\") doc.pathItems[i].fillColor = clothesTones[clothesRandom03];\n  }\n };\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0633\u067e\u0633 \u062a\u0648\u0627\u0628\u0639 \u0627\u0646\u062a\u0647\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0647 \u0631\u0648\u0632 \u06a9\u0631\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>showAll();\ncolourSkin();\ncolourHair();\ncolourClothes01();\ncolourClothes02();\ncolourClothes03();\nhideAll();\nshowRandom();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0645\u0646 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u0622\u0646\u062c\u0627 \u0628\u0648\u062f\u0645!  \u0645\u0646 \u0641\u06cc\u0644\u0645\u0646\u0627\u0645\u0647 \u0627\u06cc \u062f\u0627\u0634\u062a\u0645 \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u0633\u062a \u0631\u0646\u06af \u0647\u0627 \u0631\u0627 \u0622\u0646 \u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc \u062e\u0648\u0627\u0633\u062a\u0645 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u062f.  \u0627\u0645\u0627 \u0627\u06af\u0631 \u0645\u06cc\u200c\u062e\u0648\u0627\u0633\u062a\u0645 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u062f\u0633\u062a\u200c\u0647\u0627\u060c \u067e\u0627\u0647\u0627 \u0648 \u0645\u0648\u0647\u0627\u06cc\u0645 \u0631\u0627 \u062c\u062f\u0627 \u06a9\u0646\u0645 (\u06a9\u0647 \u0628\u0631\u0627\u06cc \u0647\u0645\u067e\u0648\u0634\u0627\u0646\u06cc \u062f\u0631\u0633\u062a \u0622\u062b\u0627\u0631 \u0647\u0646\u0631\u06cc \u0628\u0647 \u0622\u0646 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u0645) \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u062a\u063a\u06cc\u06cc\u0631 \u06a9\u0648\u0686\u06a9 \u062f\u0631 \u0639\u0645\u0644\u06a9\u0631\u062f showRandom \u062e\u0648\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u0645.  \u062f\u0631 \u063a\u06cc\u0631 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a\u060c \u0647\u0631 \u0644\u0627\u06cc\u0647 \u0628\u0627\u0632\u0648\u060c \u0645\u0648 \u0648 \u067e\u0627 \u0628\u0647 \u0637\u0648\u0631 \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0647\u200c\u0635\u0648\u0631\u062a \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u06a9\u0647 \u0637\u0648\u0644 \u0622\u0633\u062a\u06cc\u0646\u200c\u0647\u0627 \u0628\u0627 \u0647\u0645 \u0645\u0637\u0627\u0628\u0642\u062a \u0646\u062f\u0627\u0631\u0646\u062f \u0648 \u0622\u062b\u0627\u0631 \u0647\u0646\u0631\u06cc \u0628\u0647 \u0647\u0645 \u0645\u06cc\u200c\u062e\u0648\u0631\u062f!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnw5b30vruusiys2jc0fs.gif\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"602\" height=\"400\" data-animated=\"true\" title=\"\"><\/p>\n<p>\u0645\u0627\u0646\u0646\u062f \u0631\u0646\u06af\u200c\u0647\u0627\u060c \u062a\u0627\u0628\u0639 \u0631\u0627 \u0628\u0647 \u0686\u0646\u062f\u06cc\u0646 \u062a\u0627\u0628\u0639 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0631\u062f\u0645 \u0648 \u0627\u0632 \u0646\u0627\u0645 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc\u0645 \u0628\u0631\u0627\u06cc \u0628\u0631\u0686\u0633\u0628 \u0632\u062f\u0646 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0645.  \u0627\u06af\u0631 \u0627\u062b\u0631 \u0647\u0646\u0631\u06cc \u06cc\u06a9 \u0644\u0627\u06cc\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0633\u062a \u0645\u0633\u062a\u0642\u0644 \u0628\u0627\u0634\u062f \u0648 \u0628\u0647 \u0647\u0645\u0627\u0646 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u06cc\u06af\u0631\u06cc \u0646\u06cc\u0627\u0632 \u0646\u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f\u060c \u0646\u0627\u0645 \u0622\u0646 \u0631\u0627 &#8220;\u0648\u0627\u062d\u062f&#8221; \u06af\u0630\u0627\u0634\u062a\u0645.  \u0627\u06af\u0631 \u0644\u0627\u0632\u0645 \u0628\u0648\u062f \u0644\u0627\u06cc\u0647\u200c\u0627\u06cc \u0628\u0627 \u0647\u0645\u0627\u0646 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0627 \u0644\u0627\u06cc\u0647 \u062f\u06cc\u06af\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f\u060c \u0628\u0647 \u0622\u0646 \u0648 \u0647\u0645\u0647 \u0644\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631\u06cc \u06a9\u0647 \u0628\u0627 \u0622\u0646 \u0645\u0637\u0627\u0628\u0642\u062a \u062f\u0627\u0631\u0646\u062f\u060c \u06cc\u06a9 \u0646\u0627\u0645 \u062b\u0627\u0628\u062a \u0645\u0627\u0646\u0646\u062f &#8220;\u0628\u0627\u0632\u0648&#8221;\u060c &#8220;\u067e\u0627&#8221; \u06cc\u0627 &#8220;\u0645\u0648&#8221; \u0645\u06cc\u200c\u06af\u0630\u0627\u0631\u0645 \u0648 \u0645\u0637\u0645\u0626\u0646 \u0645\u06cc\u200c\u0634\u0648\u0645 \u06a9\u0647 \u0647\u0631 \u06cc\u06a9 \u062a\u0639\u062f\u0627\u062f \u06cc\u06a9\u0633\u0627\u0646 \u062f\u0627\u0631\u0646\u062f. \u0627\u0632 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u0641\u0631\u0639\u06cc\u060c \u0628\u0647 \u0647\u0645\u0627\u0646 \u062a\u0631\u062a\u06cc\u0628\u06cc \u06a9\u0647 \u0645\u06cc \u062e\u0648\u0627\u0633\u062a\u0645 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0634\u0648\u0646\u062f.<\/p>\n<p>\u0633\u067e\u0633\u060c \u0628\u0647 \u062c\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0645\u062a\u063a\u06cc\u0631 \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0631 \u062f\u0627\u062e\u0644 \u062d\u0644\u0642\u0647 for \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062a\u0648\u0627\u0628\u0639 \u0628\u0627\u0634\u062f\u060c \u0622\u0646 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0645 <strong>\u062e\u0627\u0631\u062c \u0627\u0632<\/strong> \u0627\u0632 \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0627\u0645\u0644:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>function showUnit() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  var randomUnitCount = Math.floor(Math.random() * doc.layers[i].layers.length);\n  if (doc.layers[i].name == \"unit\") doc.layers[i].layers[randomUnitCount].visible = true;\n  }\n };\n\nvar randomHairCount = Math.floor(Math.random() * doc.layers[\"hair\"].layers.length);\nfunction showHair() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  if (doc.layers[i].name == \"hair\") doc.layers[i].layers[randomHairCount].visible = true;\n  }\n };\n\nvar randomLegCount = Math.floor(Math.random() * doc.layers[\"leg\"].layers.length);\nfunction showLeg() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  if (doc.layers[i].name == \"leg\") doc.layers[i].layers[randomLegCount].visible = true;\n  }\n };\n\nvar randomArmCount = Math.floor(Math.random() * doc.layers[\"arm\"].layers.length);\nfunction showArm() {\n for (i = 0; i &lt; doc.layers.length; i++) {\n  if (doc.layers[i].name == \"arm\") doc.layers[i].layers[randomArmCount].visible = true;\n  }\n };\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0628\u062f\u0627\u0646 \u0645\u0639\u0646\u0627\u0633\u062a \u06a9\u0647 \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 \u0627\u0632 \u062d\u0644\u0642\u0647 for \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0648\u0628\u0627\u0631\u0647 \u067e\u062e\u0634 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f.  \u06cc\u06a9 \u0628\u0627\u0631 \u062f\u06cc\u06af\u0631\u060c \u0645\u0646 \u062a\u0648\u0627\u0628\u0639 \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u067e\u0627\u06cc\u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 \u0631\u0648\u0632 \u06a9\u0631\u062f\u0645:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>showAll();\ncolourSkin();\ncolourHair();\ncolourClothes01();\ncolourClothes02();\ncolourClothes03();\nhideAll();\nshowUnit();\nshowHair();\nshowLeg();\nshowArm();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0648 \u062a\u0645\u0627\u0645 \u0634\u062f!  \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0635\u0644\u06cc \u0628\u0631\u0627\u06cc \u062a\u0635\u0627\u062f\u0641\u06cc \u0633\u0627\u0632\u06cc \u0627\u0639\u0636\u0627\u06cc \u0628\u062f\u0646 \u062f\u0631 \u0627\u06cc\u0644\u0648\u0633\u062a\u0631\u06cc\u062a\u0648\u0631.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media.dev.to\/cdn-cgi\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xv4dh2i4pztdona2dfv.gif\" alt=\"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"613\" height=\"400\" data-animated=\"true\" title=\"\"><\/p>\n<p>\u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u062f\u0631 \u062a\u0645\u0627\u0645 \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0628\u0627 \u0645\u0646 \u0628\u0648\u062f\u06cc\u062f \u0645\u062a\u0634\u06a9\u0631\u0645!  \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0645 \u0627\u06cc\u0646 \u062a\u0641\u06a9\u06cc\u06a9 \u0645\u0641\u06cc\u062f \u0628\u0648\u062f\u0647 \u0628\u0627\u0634\u062f.  \u0644\u0637\u0641\u0627\u064b \u0627\u06af\u0631 \u0633\u0624\u0627\u0644\u06cc \u062f\u0627\u0631\u06cc\u062f \u06cc\u0627 \u0631\u0627\u0647 \u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u0628\u0647\u0628\u0648\u062f \u0641\u0631\u0622\u06cc\u0646\u062f \u062f\u0627\u0631\u06cc\u062f\u060c \u0646\u0638\u0631 \u0628\u062f\u0647\u06cc\u062f.<\/p>\n<p><strong>\u0641\u06cc\u0644\u0645\u0646\u0627\u0645\u0647 \u06a9\u0627\u0645\u0644:<\/strong><\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>var doc = app.activeDocument;\n\n\/\/colours\nvar colour01 = new CMYKColor();\ncolour01.cyan = 3;\ncolour01.magenta = 11;\ncolour01.yellow = 18;\ncolour01.black = 0;\n\nvar colour02 = new CMYKColor();\ncolour02.cyan = 9;\ncolour02.magenta = 29;\ncolour02.yellow = 46;\ncolour02.black = 0;\n\nvar colour03 = new CMYKColor();\ncolour03.cyan = 30;\ncolour03.magenta = 46;\ncolour03.yellow = 53;\ncolour03.black = 4;\n\nvar colour04 = new CMYKColor();\ncolour04.cyan = 37;\ncolour04.magenta = 77;\ncolour04.yellow = 100;\ncolour04.black = 46;\n\nvar colour05 = new CMYKColor();\ncolour05.cyan = 63;\ncolour05.magenta = 22;\ncolour05.yellow = 0;\ncolour05.black = 0;\n\nvar colour06 = new CMYKColor();\ncolour06.cyan = 55;\ncolour06.magenta = 0;\ncolour06.yellow = 96;\ncolour06.black = 0;\n\nvar colour07 = new CMYKColor();\ncolour07.cyan = 0;\ncolour07.magenta = 51;\ncolour07.yellow = 96;\ncolour07.black = 0;\n\nvar colour08 = new CMYKColor();\ncolour08.cyan = 0;\ncolour08.magenta = 96;\ncolour08.yellow = 89;\ncolour08.black = 0;\n\nvar colour09 = new CMYKColor();\ncolour09.cyan = 36;\ncolour09.magenta = 57;\ncolour09.yellow = 84;\ncolour09.black = 23;\n\nvar colour10 = new CMYKColor();\ncolour10.cyan = 5;\ncolour10.magenta = 0;\ncolour10.yellow = 93;\ncolour10.black = 0;\n\nvar colour11 = new CMYKColor();\ncolour11.cyan = 75;\ncolour11.magenta = 68;\ncolour11.yellow =67;\ncolour11.black = 90;\n\nvar colour12 = new CMYKColor();\ncolour12.cyan = 0;\ncolour12.magenta = 0;\ncolour12.yellow = 0;\ncolour12.black = 0;\n\nvar skinTones = [colour01, colour02, colour03, colour04];\nvar skinRandom = Math.floor(Math.random() * skinTones.length);\n\nvar clothesTones = [colour05, colour06, colour07, colour08];\nvar clothesRandom01 = Math.floor(Math.random() * clothesTones.length);\nvar clothesRandom02 = Math.floor(Math.random() * clothesTones.length);\nvar clothesRandom03 = Math.floor(Math.random() * clothesTones.length);\n\nvar hairTones = [colour09, colour10, colour11, colour12];\nvar hairRandom = Math.floor(Math.random() * hairTones.length);\n\n\/\/functions\nfunction showAll() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        for (a = 0; a &lt; doc.layers[i].layers.length; a++) {\n            doc.layers[i].layers[a].visible = true;\n            }\n        }\n    };\n\nfunction colourSkin() {\n    for (i = 0; i &lt; doc.pathItems.length; i++) {\n        if (doc.pathItems[i].name == \"skin\") doc.pathItems[i].fillColor = skinTones[skinRandom]; \n        }\n    };\n\nfunction colourHair() {\n    for (i = 0; i &lt; doc.pathItems.length; i++) {\n        if (doc.pathItems[i].name == \"hair\") doc.pathItems[i].fillColor = hairTones[hairRandom];\n        }\n    };\n\nfunction colourClothes01() {\n    for (i = 0; i &lt; doc.pathItems.length; i++) {\n        if (doc.pathItems[i].name == \"clothes01\") doc.pathItems[i].fillColor = clothesTones[clothesRandom01];\n        }\n    };\n\nfunction colourClothes02() {\n    for (i = 0; i &lt; doc.pathItems.length; i++) {\n        if (doc.pathItems[i].name == \"clothes02\") doc.pathItems[i].fillColor = clothesTones[clothesRandom02];\n        }\n    };\n\nfunction colourClothes03() {\n    for (i = 0; i &lt; doc.pathItems.length; i++) {\n        if (doc.pathItems[i].name == \"clothes03\") doc.pathItems[i].fillColor = clothesTones[clothesRandom03];\n        }\n    };\n\nfunction hideAll() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        for (a = 0; a &lt; doc.layers[i].layers.length; a++) {\n            doc.layers[i].layers[a].visible = false;\n            }\n        }\n    };\n\nfunction showUnit() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        var randomUnitCount = Math.floor(Math.random() * doc.layers[i].layers.length);\n        if (doc.layers[i].name == \"unit\") doc.layers[i].layers[randomUnitCount].visible = true;\n        }\n    };\n\nvar randomHairCount = Math.floor(Math.random() * doc.layers[\"hair\"].layers.length);\nfunction showHair() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        if (doc.layers[i].name == \"hair\") doc.layers[i].layers[randomHairCount].visible = true;\n        }\n    };\n\nvar randomLegCount = Math.floor(Math.random() * doc.layers[\"leg\"].layers.length);\nfunction showLeg() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        if (doc.layers[i].name == \"leg\") doc.layers[i].layers[randomLegCount].visible = true;\n        }\n    };\n\nvar randomArmCount = Math.floor(Math.random() * doc.layers[\"arm\"].layers.length);\nfunction showArm() {\n    for (i = 0; i &lt; doc.layers.length; i++) {\n        if (doc.layers[i].name == \"arm\") doc.layers[i].layers[randomArmCount].visible = true;\n        }\n    };\n\n\/\/run\nshowAll();\ncolourSkin();\ncolourHair();\ncolourClothes01();\ncolourClothes02();\ncolourClothes03();\nhideAll();\nshowUnit();\nshowHair();\nshowLeg();\nshowArm();\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u0634\u06a9\u0644\u0627\u062e\u06cc\u0631\u0627\u064b \u06cc\u06a9 \u0633\u0648\u0627\u0644 \u0628\u0633\u06cc\u0627\u0631 \u0633\u062e\u062a \u062f\u0627\u0634\u062a\u0645: \u067e\u0631 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u0635\u062f\u0647\u0627 \u0634\u062e\u0635\u06cc\u062a \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u062f\u0631 \u06a9\u0645\u062a\u0631 \u0627\u0632 2 \u0647\u0641\u062a\u0647. \u0627\u06cc\u0646 \u0628\u0647 \u0637\u0648\u0631 \u0637\u0628\u06cc\u0639\u06cc \u06cc\u06a9 \u062f\u0633\u062a\u0648\u0631 \u0628\u0633\u06cc\u0627\u0631 \u0628\u0644\u0646\u062f \u0627\u0633\u062a\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0646 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0634\u06a9\u0633\u062a\u0645. \u0645\u0646 \u0647\u0631\u06af\u0632 \u0627\u0632 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0631 \u0631\u0648\u06cc \u0647\u06cc\u0686 \u0686\u06cc\u0632 \u062f\u06cc\u06af\u0631\u06cc \u063a\u06cc\u0631 \u0627\u0632 \u0627\u0641\u062a\u0631 \u0627\u0641\u06a9\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0631\u062f\u0647 \u0627\u0645\u060c \u0627\u0645\u0627 \u0645\u06cc &hellip;<\/p>\n","protected":false},"author":2,"featured_media":67691,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-67690","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/67690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=67690"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/67690\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/67691"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=67690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=67690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=67690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}