Color Picker with uCreate

325 views
Skip to first unread message

tshe...@alphagraphics.com

unread,
Jan 29, 2019, 11:34:19 AM1/29/19
to XMPie Interest Group
Just a quick question to see if this is even remotely possible. I don't think uCreate offers this functionality, but is there a way to offer a color picker option in the uStore when editing a dynamic product to change the color of various objects and text?

Andrew Davies

unread,
Jan 29, 2019, 2:38:12 PM1/29/19
to XMPie Interest Group
The easy way: look into XLIM and uEdit.

The hard way:
Have a look into XNIP formatted text. (right click on some selected text in a XMPie document).

This exports a text string like this:
...
<ucreate:colors>
    <ucreate:color id="#13"
        color="rgb(65.88%,12.28%,12.61%)"
        ucreate:cmyk-color="cmyk(22.92%,100%,100%,16.37%)"
        ucreate:name="Test RGB Swatch"/>
</ucreate:colors>
...
Test<fo:inline color="id(#13)">colored</fo:inline> text
...

So, you can see you could edit the color.


amanda....@bluenorth.ca

unread,
Jan 29, 2019, 3:12:45 PM1/29/19
to XMPie Interest Group
Another option would be setting up GREPs in InDesign and add tags to the text based on the color the user chose. That could work for text. (see this thread for info on how to use them: https://groups.google.com/d/msg/xmpie-users/NR55KQaB_90/kWUjbEuCAAAJ)
What kinds of objects are you changing the color of? Could you pull them in as images and have the correct color of image get pulled in based on a trigger in the data?

Another option would be, if you don't have too many color options you could set up different layers in your file and have visibility adors trigger the correct layers to show.

couch

unread,
Jan 29, 2019, 4:47:18 PM1/29/19
to XMPie Interest Group
Another option (for allowing specific colour choices rather than fully open selection)  is to define (object/character) colour styles in InDesign and use a Style ADOR. 

uStore can define drop-down-list; gallery list or grid view, or html generic dial control to pass back the name of the style that the customer selects into the plan for that style ADOR to apply in the document.

tshe...@alphagraphics.com

unread,
Jan 29, 2019, 6:05:04 PM1/29/19
to XMPie Interest Group
My hope would be to create something that they can choose any color they want to apply to a certain object or text. I'm assuming that there isn't any color picker type functionality built into the system for that need (I think it should be as that would be really nice) but these are all interesting ideas you've shared and I may be able to make something of just not as free.

amanda....@bluenorth.ca

unread,
Jan 30, 2019, 2:46:35 PM1/30/19
to XMPie Interest Group
I have never done this before, but if you use the Style ADOR like Couch suggested what if you tried passing the CMYK value back as a variable when they pick the color from your picker and then replace the color with that string? So the string would be "| Times New Roman | Normal | 12 | ["&CMYK values as percentages&"]" Not sure if that would work... now I want to try it!

amanda....@bluenorth.ca

unread,
Jan 30, 2019, 4:22:59 PM1/30/19
to XMPie Interest Group
I just tested it and it works like a charm, so if you're able to pass the CMYK value as percentages this could work for passing a variety of colors at run time for text.

tshe...@alphagraphics.com

unread,
Jan 30, 2019, 6:55:12 PM1/30/19
to XMPie Interest Group
Could you explain how you got it to work?

Tyrone

unread,
Jan 31, 2019, 6:34:31 AM1/31/19
to xmpie...@googlegroups.com

I just tested this on a quick store and this will work for styling color, you may need to tweak the variables to suit.

 

Regards,

 

Tyrone O’Brien

Customer Engagment Manager (CEM)

 

emailsignature

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at https://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.

image001.jpg
style.cpkg

amanda....@bluenorth.ca

unread,
Jan 31, 2019, 8:17:01 AM1/31/19
to XMPie Interest Group
What Tyrone just posted is gold! Let me know if you still need more info :)

tshe...@alphagraphics.com

unread,
Jan 31, 2019, 6:29:06 PM1/31/19
to XMPie Interest Group
That's awesome and works like a charm. Any ideas on how to get the color values from a color picker? I've been able to pull the value from the html color picker, the one used with the label tag, but it outputs a hex code, so I'm not sure how to convert that to cmyk as we need to.

Wayne

unread,
Jan 31, 2019, 7:46:26 PM1/31/19
to XMPie Interest Group
JavaScript would be your best option, checkout http://www.javascripter.net/faq/hex2cmyk.htm 

Regards,
Wayne

tshe...@alphagraphics.com

unread,
Jan 31, 2019, 10:41:47 PM1/31/19
to XMPie Interest Group
With the help of a friend, we got it working. Using Javascript as you suggested.


Jon Chan

unread,
Oct 31, 2019, 4:36:40 PM10/31/19
to XMPie Interest Group
Is it possible to use qlingo override for an object style color?
If so, what is the syntax?

Jon Chan

unread,
Nov 7, 2019, 5:04:02 PM11/7/19
to XMPie Interest Group
Hi guys,

Got this working with this color picker:

and converted the Hex to CMYK via Wayne's link below

XMPie please allow us to override object styles via QLingo!
Screen Shot 2019-11-07 at 5.01.45 PM.JPG

Tanner Shelton

unread,
May 4, 2020, 5:16:58 PM5/4/20
to XMPie Interest Group
Jon, how did you implement that spectrum color picker? 
Reply all
Reply to author
Forward
0 new messages