How can I apply a current fill color to a stroke, then adjust that stroke color's build?
Hi all, I'm trying to figure out a way to automate a simple, yet repetative process I do countless times a day. Ideally, I'd like to tie it to a keystroke to speed up my workflow.
I work on line art and colorways for footwear, so the way I'm coloring these shapes and strokes helps to break apart the different materials and pieces of the shoe.
While coloring line art, I work with Pantone spot colors as fills for closed path objects. I then have to manually apply that same color to the stroke, set the stroke to 0.5px weight, convert that spot stroke color to CMYK, and add 15% to the K value.
I found some code in an older post for applying the actively selected object's fill color to the stroke, but I'm having but I'm having trouble with the next step of figuring out how to take that spot stroke color and convert it to a CMYK build that I can then add 15% black to. Is this something that's even possible? I've spent about an hour playing with the script and have only had luck matching the fill color or turning the stroke white. Thanks for the help!
ok try this one, I added the spot color option
// make stroke color same as fill color + 15% black increase
if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0) {
for (var a=0; a<app.selection.length; a++) {
try {
var sel = app.selection[a];
var fillcolor = sel.fillColor;
if (fillcolor.typename == "CMYKColor")
var cmkycolor = fillcolor;
else if (fillcolor.typename == "SpotColor")
var cmkycolor = fillcolor.spot.color;
var col = new CMYKColor;
col.cyan = cmkycolor.cyan;
col.magenta = cmkycolor.magenta;
col.yellow = cmkycolor.yellow;
var black = cmkycolor.black + cmkycolor.black +15;
col.black = black>100 ? 100 : black;
sel.strokeColor = col;
sel.strokeWidth = 0.5;
catch (e){alert(e)
Similar Messages
-
How can I apply a timestretch to different null objects and then use them to parent layers?
I am using several hundred stills which are held on screen for different lengths of time. Is there a way to create null objects with various timestretch values and then use them to parent my stills?
I'm trying to find an equivalent to the 'paste attributes' function in Final Cut Pro.
Thanks in advance
AIf you have movement on the stills you can set up expressions based on in and out points. That's what I do. I then drop all my stills in order into a comp then set the out point for all stills for the longest duration. I then set group colors for layers that I want to make different lengths, do a group select and then adjust the out points for those layers. When I'm done I sequence the layers using the keyframe assistant.
The other way I work is to use an audio track with markers for timing. I have an expression that reads the markers and sets opacity for the layers based on pairs of markers. The motion is also controlled by expressions. That's an even faster way to set up an animated slide show.
The last way I work is just to set in an out points for all layers, sequence the layers, use expressions to do the motion and then use time remapping on a pre-comp to adjust the timing of the slide show. All methods are quick and easy.
Here's a fly in bounce and then drop out fxx preset that will give you an idea of how expressions based on in and out point work for slide shows. You just drag the layer to it's resting position, apply the animatiokn preset and the layer flys in, bounces, and then drops out the bottom of the comp. Works in 2D and 3D space. -
How can i apply different color for each cell in jlist component?
hi guys i need your help and sorry if my english is very bad..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..
Edited by: ryrene on Mar 21, 2010 12:13 AMryrene wrote:
hi guys i need your help and sorry if my english is very bad.
..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..I'll see your tnx, and raise you dve bmbrs & nplm. -
How can I make the current row in a different color in ADF Table 10.1.3
Hi all
in JDeveloper 10.1.3 ADF Table ,
How can I make the current row in a different color ?
thanksAnd what exactly would "the component" be?
I tried the af:outputText, but it just creates a <span> around the value of the cell, and if I try the af:column it just won't use it at all!
Any suggestions? -
How Can I Apply Color into my Datagrif
I Have a Datagrid and the data provider is from database. the
format is :
[No] [JobID] [TargetTime]
How can i apply a color into Datagrid if the TargetTime is
Overdue, can you help me.May I suggest: Layer - New Adjustment Layer - Black & White, then use the Tint facility.
Personally, I often find it more handy (and providing more control) to use a Curves adjustment layer above all the others. Grab the curves of individual color channels and pull them this way and that to alter the color of what's underneath. It's not hard to keep whites white, blacks black, and give the stuff in between believable coloration.
-Noel -
How can i apply gradient...
I have a rectangular shape movie Clip (Size :130px X40 px). I
want to apply linear gradient on it using action script. Can
anybody help me how can I apply gradient on it.
Note: This movie clip is made manually. Not by using
createEmptyMovieClip method.i already checked this -
MAKE A OVAL ON YOUR STAGE AND GIVE THIS INSTANCE NAME 'ovl'
(withought single quote) and use the code under
here i am creating two movie clips on stage --
1st is 'ovl' and 2nd one is 'mc'
But to apply gradient on ovl i have to use setMask method
like this _root.mc.setMask(_root.ovl)
i do not want to use SetMask... I want to apply gradient
directly on 'ovl'
How can i do ??????????????
// create emtpy movieclip
mc = createEmptyMovieClip("mc",1);
// set the constants for the gradient fill
// the colors
col = [0x000066,0x0033FF];
// the alphas
alp = [100,30];
// the ratios
rat = [100,255];
//this.onMouseMove = function () {
// we will make a radial gradient
// and make it move with the mouse
// first we clear the previous gradient fill
mc.clear();
// get the mouse-position
// the x-coordinate
x = _xmouse-200;
// the y-coordinate
y = _ymouse-200;
// set the matrix for the transformation
matrix = { matrixType:"box",x:x,y:y,w:400,h:400,r:0 }
// now make the new gradient fill
mc.beginGradientFill("linear",col,alp,rat,matrix);
// now make the shape to fill
mc.lineTo(400,0);
mc.lineTo(400,400);
mc.lineTo(0,400);
// end the fill
mc.endFill();
_root.mc.setMask(_root.ovl)
Text
Text -
How can i apply this java program for a jsp page?
import java.io.*;
import java.util.*;
public class FileProcessing
//create a vector container for the input variables
Vector variables = new Vector();
//create a vector container for the constants
Vector constants = new Vector();
/*create a string expression container for the equation
as read from the file */
String expression = " ";
//create double result container for the final result
double result = 0;
public boolean processFile(String filename,String delim)
//index for values vector
int num_values = 0;
//index for constants vector
int num_constants = 0;
//current line being read from the external file.
String curline = " ";
//start reading from the external file
try
FileReader fr = new FileReader(filename);
BufferedReader br = new BufferedReader(fr);
while(true)
curline = br.readLine();
if(curline == null)
break;
//determine the type of current interaction
boolean variable = curline.startsWith("input");
boolean constant = curline.startsWith("constant");
boolean equation = curline.startsWith("equation");
boolean output = curline.startsWith("result");
//on input variables
if(variable)
StringTokenizer st = new StringTokenizer(curline,delim);
int num = st.countTokens();
int count=0;
while(st.hasMoreTokens())
String temp = st.nextToken();
if(count==1)
byte b[]= new byte[100];
System.out.println(temp);
System.in.read(b);
String inputval = (new String(b)).trim();
variables.add(num_values,inputval);
num_values++;
count++;
// on constant values
if(constant)
StringTokenizer st = new StringTokenizer(curline,delim);
int num = st.countTokens();
int count = 0;
while(st.hasMoreTokens())
String temp = st.nextToken();
if(count==1)
byte b[]= new byte[100];
System.out.println(temp);
System.in.read(b);
String cons = (new String(b)).trim();
constants.add(num_constants,cons);
num_constants++;
count++;
// on equation
if(equation)
StringTokenizer st = new StringTokenizer(curline,delim);
int num = st.countTokens();
int count = 0;
while(st.hasMoreTokens())
String temp = st.nextToken();
if(count==2)
this.expression = temp;
count++;
// now we are ready to evaluate the expression
if(output)
org.nfunk.jep.JEP myparser= new org.nfunk.jep.JEP();
myparser.setAllowAssignment(true);
for(int i=1;i<variables.size()+1;i++)
String name = "arg"+Integer.toString(i);
myparser.addVariable(name,new Double(variables.get(i-1)
.toString()).doubleValue());
for(int i=1;i<constants.size()+1;i++)
String name = "arg" +Integer.
toString(i+variables.size());
myparser.addConstant(name,new Double(constants.get(i-1).toString()));
//output is obtained as follows
myparser.parseExpression(expression);
result = myparser.getValue();
System.out.println("Assay value: "+result);
catch(Exception e)
System.out.println(e.toString());
return true;
public static void main(String[] args)
FileProcessing fp = new FileProcessing();
fp.processFile("input.eqn",":");
}//my text file name is: "input.eqn" (given below)
input:Enter Value1:arg1
input:Enter Value2:arg2
input:Enter Value3:arg3
constant:arg4
constant:arg5
Equation:arg1+arg2+arg3
result:how can i apply this java program for a jsp pagewhy do you want to do this ?
Your program reads from a file on the disk and formats based on a patterm.
Jsp is not intended for such stuff.
ram. -
How can i apply border for fluid grid layout div
How can i apply border for fluid grid layout div
<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]> <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled Document</title>
<link href="boilerplate.css" rel="stylesheet" type="text/css">
<link href="CSS/Layout.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="flexslider.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="jquery.flexslider.js"></script>
<!-- Place in the <head>, after the three links -->
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider();
</script>
<!--
To learn more about the conditional comments around the html tags at the top of the file:
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
* insert the link to your js here
* remove the link below to the html5shiv
* add the "no-js" class to the html tags at the top
* you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="respond.min.js"></script>
</head>
<body>
<div class="gridContainer clearfix">
<div id="LayoutDiv1"><img src="SJV-Images/Banners/Dark-green-curved-header.png"/></div>
<div id="LayoutDiv2">
<div class="flex-container">
<div class="flexslider">
<ul class="slides">
<li>
<img src="SJV-Images/Stud1.jpg"/>
</li>
<li>
<img src="SJV-Images/Stud2.jpg" />
</li>
<li>
<img src="SJV-Images/Stud3.jpg" />
</li>
</ul>
</div>
</div> </div>
<div id="Nav">This is the content for Layout Div Tag "Nav"</div>
<div id="Special_Features"><h3 align="center">SPECIAL FEATURES</h3>
<ul>
<li>
It is one of the oldest school.</li>
<li>It was first started as an orphanage for the children of British soldiers, and later moved to its current location.</li>
<li>Rich in Anglo-Indian tradition dating back to three centuries.</li>
<li>The campus now has separate buildings within the campus for year 1 to year 8 (Junior and Sub Junior block) and year 9 to year 12 (Senior and Super Senior block).</li>
<li>The school has montessori facilities in a separate building.</li>
<li>The School also has boarding facilities for students from distant places.</li>
</ul></div>
<div id="History"><img src="SJV-Images/His_Image.png" alt="Hisimage" class="floatleft">
<h3>HISTORY OF OUR SCHOOL</h3><P>In 1750 – a very long time ago,a missionary and a teacher, Christian Frederick Schwartz came to India to work in the Danish Mission at Tranquebar.Due to his own personal charm, genius and integrity, soon he became a trusted envoy to the court of Princes ,both hostile and friendly. He even helped in the training and education of Serfogee Rajah, the adopted son of the Tanjore Raja Tuljagee.</P></div>
<div id="Photo_Gall"><center>
<strong>PHOTO GALLERY</strong>
</center>
<p><img src="SJV-Images/Photogall.png" width="174" height="70" class="floatright"/></p>
</div>
<div id="News_Events"><center>
<strong>NEWS & EVENTS</strong>
</center><center>Annual Day<br><center>
Alumni Meet<br>
Exam Time Table<br>Parents-Teacher's Meet</center>
</center>
<br></div>
<div id="footer">This is the content for Layout Div Tag "footer"</div>
</div>
</body>
</html> -
How can i apply adobe bridge in my ipad 2?
how can i apply adobe bridge in my ipad 2?
As when installing an app on a computer, there must be a version for the app that is compatible with the computer and the OS running the computer.
Is there an Adobe Bridge app for the iPad available via the iTunes app store? -
I want to update iCloud account with new apple id but don't know password for old apple id. Plus can no longer receive email at old apple id. How can I delete the current iCloud account on my iPhone if the previously stated conditions exist?
If the old ID is yours, and if it is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID. Click edit next to the primary email account, change it back to your old email address and save the change. Then edit the name of the account to change it back to your old email address. You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll. When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud). Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was. Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.
-
How can I apply my CS Photoshop membership to a second computer?
how can I apply my CS Photoshop membership to a second computer?
Thank You!
I felt like I was wandering through mazes to get that question to the right
venue.
Thanks again,
Gayatri -
How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text? Please help! I'm technologically challenged.
Most forms (99% or more) are created for simple text input, where you cannot change anything.
The creator of the form could allow Rich Text input (which allows you to change font, text size, color, etc.), but frankly I have never seen such a form, and I wouldn't know how they look. But I'm sure they would show some kind of controls to alter the text appearance. -
How can I save my current Firefox customization to install on a new Windows 7 installation
This is not asking for a problem fix.
How can I save my current Firefox 3.6 customization, toolbar set-up, plug-ins, add-ons, etc. to a file or files so I can install it, pre-customized, after I do a re-format and clean install of a new Windows 7 operating system?
I am currently in Windows Vista.
I'm just trying to make it so I don't have to re-customize everything I already have done by doing a fresh installation of Firefox.
Or can I just save the existing Mozilla Firefox program folder and then drag and drop it into the new programs folder in Windows 7?
Thanks,
numetroA couple of links that can help with this, [[Backing up your information]] and [http://kb.mozillazine.org/Profile_backup Profile backup - MozillaZine Knowledge Base]. The second one includes a link to a free utility that can make this easier.
Just saving the progams folder will not work, the user data is stored elsewhere. -
How can I apply text position attributes (e.g. lower third) to more than one title at a time?
jhb3243
What version of Premiere Elements are you using and on what computer operating system is it running?
In the case of this theoretical lower third to be applied to more than one title at a time
a. Is there text in the lower third besides a graphic of some kind?
b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
Thanks.
ATR -
How can I return the current Date in Java?
I am new to Java, and basically I want to know how I can return the current date as a variable, so for example, I have declared the following date variable
private java.util.Date currentDate;How can I return the current date, do I have to write a method? To be more specific, I need to write a setMethod, that simply returns the current Date in Java.
Please point me in the right direction.
Thanks,If all you want is a date for printing or displaying, the easiest way is to use Date as shown below. If you need something more complex, look at the Calendar API.
import java.util.Date;
class DateEx
public static void main(String args[])
Date now = new Date();
System.out.println(now);
}
Maybe you are looking for
-
I downloaded the new update on my Iphone. When I plugged it into my computer it wouldn't let me sync because my computer didn't have an updated i-tunes version. When I tried to update Itunes, it said I needed Mac OS 10.6.6 or higher. Then when I trie
-
Anyone experience incorrect modification dates with 10.4 server?
Maybe this is a bug, maybe not, but I have received numerous reports from coworkers of a problem with the finder's 'modification' date for files hosted on 10.4 servers (running 10.4.3 now) in two separate locations. This behavior was not occurring pr
-
File size differences between Acrobat 5.0 and Acrobat 8.0
We have a system where we incorporate .pdf files into word documents. When we use v8.0 the .pdf files suddenly become very much larger (e.g. the word document containing the v5.0 PDFs, around 29 of them, is 1,224kb but is 2,376kb when we use v8.0 PDF
-
Trying to buy more icloud storage and keep getting "an unknown error has occurred"
I am trying to buy more icloud storage with my iphone and I keep getting "an unknown error has occurred"
-
Gnome 3 launcher customization
I use Gnome 3.4 on ArchLinux. How I can move the Gnome launcher called "Activites" from the left side of screen to the right?