<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Dear Herbert,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Many years ago, I generated custom vector fields using the \code command in PSTricks. You can see various examples here:
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
  <a href="https://users.math.msu.edu/users/hensh/courses/234/fall2022/lectures/exam2/16.1.pdf">
https://users.math.msu.edu/users/hensh/courses/234/fall2022/lectures/exam2/16.1.pdf</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Unfortunately, when I try to generate new vector fields, the arrows are no longer affected by my color selections. The MWE below is part of a \multido loop, and I need to set the arrow color to match the line color on-the-fly.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
\documentclass{standalone}
<div class="ContentPasted1">\usepackage{pstricks-add}</div>
<div class="ContentPasted1">\begin{document}</div>
<div class="ContentPasted1">\psset{unit=30mm}</div>
<div class="ContentPasted1">\begin{pspicture}(-2,-2)(2,2)</div>
<div class="ContentPasted1">  \pscustom[linewidth=2pt,arrowscale=1.5]{%</div>
<div class="ContentPasted1">  \arrows{->}</div>
<div class="ContentPasted1">  \code{%</div>
<div class="ContentPasted1">  0 0 5 5 ArrowA %</div>
<div class="ContentPasted1">  30 30 110 75 ArrowB %</div>
<div class="ContentPasted1 elementToProof">  1 0 0 setrgbcolor % Only sets the line color to red.<br>
</div>
<div class="ContentPasted1">  lineto %</div>
<div class="ContentPasted1">  stroke %</div>
<div class="ContentPasted1">  }</div>
<div class="ContentPasted1">  }</div>
<div class="ContentPasted1">\end{pspicture}</div>
\end{document}</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
The above code generates a red line with a black arrow. I must be able to do this within the \code block. Can you help?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
thanks</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
rick</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
</body>
</html>