Thanks Eric - that got me on the right track. In the end, the following, 
simple code worked:

<$edit-text tiddler="$:/_opTaskStore" type="color" tag="input" 
field="backcolor"/>


On Sunday, 11 August 2019 20:08:39 UTC+1, Eric Shulman wrote:
>
> On Sunday, August 11, 2019 at 11:07:59 AM UTC-7, MagoArcade wrote:
>>
>> How can I insert a small color picker into a tiddler and have it output 
>> to R,G,B format. The standard color picker has way too much associated with 
>> it (Doc link 
>> <https://tiddlywiki.com/static/colour-picker%2520Macro%2520(Example%25201).html>).
>>  
>> eg:
>> All I really want is the button at the bottom, next to the text box. 
>> Also, I'm needing a way to save it to a field in this format:
>> 198,3,7
>> i.e. RGB in decimal
>>
>
> The "button at the bottom" is actually an HTML input, with type="color", 
> and if you dig into the TWCore "colour-picker" code 
> ($:/core/macros/colour-picker), you will find this line:
>
> <$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/>
>
> This creates the button you want.  However... the actual appearance AND 
> function of the color input depends your specific platform and browser.  If 
> your browser doesn't support the color button directly, it may render as a 
> regular input field into which you can TYPE the color value.  Of course, 
> you should change the target tiddler name to the title of the tiddler in 
> which you want the color selection to be stored.
>
> Unfortunately, this will only achieve half your desired goal.  The problem 
> is that the browser-supplied HTML control will ONLY write the chosen color 
> using a CSS-compatible *hexadecimal* value (e.g., "#rrggbb"), rather than 
> the comma-separated decimal R,G,B values you want.
>
> For more details, see 
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools: "Small Tools for Big Ideas" (tm) 
> http://tiddlytools.github.io/
> InsideTiddlyWiki: The Missing Manuals
>
> (NOTE NEW HOSTING LOCATION)
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/edb201ac-fa01-410e-8538-d5d8c42be4f9%40googlegroups.com.

Reply via email to