{"id":17449,"date":"2021-09-01T13:24:28","date_gmt":"2021-09-01T13:24:28","guid":{"rendered":"https:\/\/www.jurn.link\/dazposer\/?p=17449"},"modified":"2022-08-19T16:06:49","modified_gmt":"2022-08-19T16:06:49","slug":"color-codes-for-poserpython-coders","status":"publish","type":"post","link":"https:\/\/jurn.link\/dazposer\/index.php\/2021\/09\/01\/color-codes-for-poserpython-coders\/","title":{"rendered":"Color codes for PoserPython coders"},"content":{"rendered":"<p>A useful Poser colour-code chart for Python coders, at <a href=\"http:\/\/latexcolor.com\/\">LaTeX Color Definitions<\/a>. You can see how the colour chart allows you to translate a colour to the three RGB values in a format needed for a PoserPython script. For instance, the chart&#8217;s Amethyst purple&#8230;<\/p>\n<p><a href=\"https:\/\/www.jurn.link\/dazposer\/oldimages\/am.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.jurn.link\/dazposer\/oldimages\/am.jpg\" alt=\"\" width=\"700\" height=\"78\" class=\"alignnone size-full wp-image-17450\" \/><\/a><\/p>\n<p>&nbsp;&nbsp;&nbsp;{amethyst}{rgb}{<strong>0.6, 0.4, 0.8<\/strong>}<\/p>\n<p>This becomes in PoserPython, with spaces removed&#8230;<\/p>\n<p>&nbsp;&nbsp;&nbsp;nodeInput = root.InputByInternalName(&#8216;AlternateDiffuse&#8217;)<br \/>\n&nbsp;&nbsp;&nbsp;nodeInput.SetColor(<strong>0.6<\/strong>0,<strong>0.4<\/strong>0,<strong>0.8<\/strong>0)<\/p>\n<p>A mid grey, useful in toning down neon-like Preview colours arising due to a Scatter node plugged into the Alternate_Diffuse, would then be&#8230;<\/p>\n<p>&nbsp;&nbsp;&nbsp;nodeInput = root.InputByInternalName(&#8216;AlternateDiffuse&#8217;)<br \/>\n&nbsp;&nbsp;&nbsp;nodeInput.SetColor(<strong>0.7<\/strong>0,<strong>0.7<\/strong>0,<strong>0.7<\/strong>0)<\/p>\n<p>Note that some nodes need a _ and some don&#8217;t. I&#8217;ve no idea exactly why, but perhaps it&#8217;s the &#8216;internal\/external name thing&#8217; that Poser has. Thus you&#8217;ll see Alternate_Diffuse in the Material room, but it has to be AlternateDiffuse in the script. If one such name doesn&#8217;t work in a script, just add or remove the _ and try again.<\/p>\n<p>Possibly there is some colour-wheel freeware somewhere that offers something similar to the chart, but the chart is a nice friendly solution. If saved out as a PDF it can be indexed by your PC&#8217;s local keyword search.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A useful Poser colour-code chart for Python coders, at LaTeX Color Definitions. You can see how the colour chart allows you to translate a colour to the three RGB values in a format needed for a PoserPython script. For instance, the chart&#8217;s Amethyst purple&#8230; &nbsp;&nbsp;&nbsp;{amethyst}{rgb}{0.6, 0.4, 0.8} This becomes in PoserPython, with spaces removed&#8230; &nbsp;&nbsp;&nbsp;nodeInput [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,27,12],"tags":[],"class_list":["post-17449","post","type-post","status-publish","format-standard","hentry","category-poser","category-python-scripts","category-tutorials"],"_links":{"self":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/17449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/comments?post=17449"}],"version-history":[{"count":1,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/17449\/revisions"}],"predecessor-version":[{"id":19413,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/17449\/revisions\/19413"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/media?parent=17449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/categories?post=17449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/tags?post=17449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}