Jump to content

Color picker bug


Recommended Posts

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.

  1. Create a new script
  2. Add a color property with a default green color :
    Script.color = Vec4(0,255,0,255) --color "Color"
    


  3. Attach the script to an object in the scene
  4. The property looks like this:
    post-45-0-69588200-1458854890.jpg
  5. Click on one of the arrows in the color property and color updates to the correct color.post-45-0-18717100-1458854897.jpg

Link to comment
Share on other sites

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

  • 2 months later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...