AggrorJorn Posted March 24, 2016 Share Posted March 24, 2016 Creating a script with the color picker property wont return the correct color based on its default values. Only after changing the values in the property picker, the right color is set. Create a new script Add a color property with a default green color : Script.color = Vec4(0,255,0,255) --color "Color" Attach the script to an object in the scene The property looks like this: Click on one of the arrows in the color property and color updates to the correct color. Link to comment Share on other sites More sharing options...
macklebee Posted March 25, 2016 Share Posted March 25, 2016 Everything color related in the engine uses the 0-1 scale. The color picker is set with a 0-1 scale and it will return a 0-1 scale. Only within the actual picker will it show the 0-255 scale. See the bug report from a year ago that explains why this is the case: http://www.leadwerks.com/werkspace/topic/12241-script-color-property-returns-unexpected-results/ Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 25, 2016 Author Share Posted March 25, 2016 Thanks for the clarification macklebee. Link to comment Share on other sites More sharing options...
Josh Posted June 6, 2016 Share Posted June 6, 2016 Mack is right, but it's fixed anyways for the next build. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts