语言

Menu
Sites
Language
Call of Color Picker

What is the way to call Color Picker (https://developer.tizen.org/documentation/ux-guide/design-library/picker)?

 

The only way I found is to create element

<input type="color" name="color" id="color" value="black" />

 

But I want to make a button or any other element, bind some event to it and call Color Picker.

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

16 回复
Lakshmi Grandhi
Can you please try the code given in http://jsfiddle.net/z6Ddy/
Maksym
I tried, but ColorPicker is undefined if I use Tizen web UI framework, since it is External Resources. I've been expected to get the same Color Picker which appears for input with type="color".
Lakshmi Grandhi
Hi, the color picker is associated only with for web applications, tizen native platform supports ColorPicker Control, you can use it through hybird application.
Maksym
It is unclear for me, why the color picker available for only one element only I mentioned before?
Maksym
And why it is not possible to call this controll from web api?
Lakshmi Grandhi
Hi, There is no html element or widget for color picker as per W3c standards. The webkit engine has has been designed the color picker for only input field.
Maksym
Is it possible to design it also for other elements?
konduri sai swathi
Hi, Try the JQuery color picker plugin mentioned in this link : http://jscolor.com/download.php
Alex Dem
Hi, < input type="color" > is HTML5 standard support . Not sure what other ways to invoke color picker should be supported for Web Apps. Just simple workaround how you could use color picker for any element without additional plugins: 1) do your < input type="color" > completely transparent: < input id="color" style="opacity:0" type="color" name="color" value="black" / > 2) create in javascript handler which will be called on required event: function eventHandler() { $("#color").trigger('click'); } this function will initiate click on invisible < input type="color" > element via JQuery 3) get selected color from invisible < input type="color" > via JQuery: $("#color").attr('value') Alexey.
Alex Dem
your 'input' should be modified with style="position: absolute" also < input id="color" style="position: absolute; opacity:0" type="color" name="color" value="black" / > to exclude its from html stream. Alexey.
Maksym
Interesting solution
Maciej

Hello

 

Could somebody please confirm that the HTML5 color picker (<input type="color") is implemented and works on the Gear S2 device?

 

When I try on the emulator, I get a rectangular clickable icon, however, when I click it, nothing happens. I don't have a physical device, so I would be grateful if someone could check it for me.

 

Thanks!

AVSukhov

Hello,

You can use any third-party library that implements Color Picker widget:

http://www.jqueryrain.com/demo/jquery-color-picker/

http://www.sitepoint.com/10-color-pickers-plugin/

Seoghyun Kang

Dear Maciej,

 

You can create the simple color picker easily.

If you want to watch the simple sample code, please check the "TouchPaint" wearable sample in the SDK.

 

It will be helpful to you.

Thanks.

Seoghyun Kang

By the way,

When we create the TouchPaint sample for mobile profile, we used the the HTML5 color picker (<input type="color").

But when we create the TouchPaint sample for wearable profile, we create the simple color picker.

 

I recommend that you create the simple color picker for the wearable profile.

 

Please refer it.

Vikram

Hi,

Do you know what is the different by create the simple color picker between mobile with wearable profile. 

Thanks.