yastrebovks / dat-gui

Automatically exported from code.google.com/p/dat-gui
0 stars 0 forks source link

Color Pickers return strings instead of the original format if I click into the value field #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open attached file in a web browser.
2. Click into the color text field of the dat GUI.
3. Click into the document's body. (Actually you can click anywhere, just make 
sure the text field loses focus.)

What is the expected output? What do you see instead?
The span in the upper left of the page should contain: {"r":255,"g":0,"b":0}
In particular it should be an RGB object.
Instead I get: "#ff0000"

This behavior contradicts the documentation:
http://workshop.chromeexperiments.com/examples/gui/#4--Color-Controllers
"dat.GUI will modify colors in the format defined by their initial value."

What version of the product are you using? On what operating system?
I am using Google Chrome on Mac OS X 10.7, but I guess this issue is platform 
independent.

Please provide any additional information below.

Original issue reported on code.google.com by lysann.k...@gmail.com on 1 Feb 2012 at 5:22

Attachments:

GoogleCodeExporter commented 8 years ago
This is a good catch. While I'm manipulating the color via dragging, the type 
remains true to the original. Its once you focus and unfocus the *text-box* 
component that it forces it over to hex.

Original comment by georgebr...@google.com on 27 Feb 2012 at 3:56