Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL5C palette color control

Status
Not open for further replies.

map7

Programmer
Oct 6, 2003
5
AU
I've been trying to build my own palette, here is the code which doesn't work for me:

ESC&v0M
ESC&p1I
ESC&p6C
ESC&p1S
ESC*v255a255b255c0I
ESC*v100a50b200c1I
ESC*p0P
ESC*v0STest1
ESC*v1STest2

All i really want to do is to be able to switch between a few different specific colors. For instance one is going to be light blue, one dark, black and white. That's all i really want in my palette for now. The code above was a test to see if i could print Test1 in white and Test2 in purple. The white worked but the purple came out black.

can any help me?

~Mick
 
You are missing the Configure Image Data command.

Color Reference Page 2-5.

Jim Asman
jlasman@telus.net
 
I tried this

ESC&v0M
ESC&p1I
ESC&p6C
ESC&p1S
ESC*v255a255b255c0I
ESC*v100a50b200c1I
ESC*v6W020308080808
ESC*t3J
ESC*v0STest1
ESC*v1STest2

and this gave me blue, but now when I change the values in the 5th and 6th line none of the colors change I still get white and light blue. I've also tried ESC&p0C to clear all the palettes.

Could you please send me an example of a working palette with a few basic colors in, simular to the format above.

~Mick
 
<esc>*v6W 01 01 08 08 08 08
<esc>*v255a255b255c0I
<esc>*v0a255b255c1I
<esc>*v75a75b0c2I
<esc>*v0SBLACK
<esc>*v1SRED
<esc>*v2SBLUISH
<esc>*v0SBLACK AGAIN

The above should be all you need. Note that those are hex values given in the first command. 6 hex bytes of data.


Jim Asman
jlasman@telus.net
 
I did it :)

That CID was supposed to go before I define my colors.

ESC&v0M
ESC&p2I
ESC&pC
ESC&p6C
ESC&p2S
ESC*v6W020308080808
ESC*v020a200b100c0I
ESC*v255a255b50c1I
ESC*v0STest1
ESC*v1STest2

Thanks for your help Jim
 
Mapl7
When I run your I see 080808. Seems like I always have this problem.

Any thoughts?

James
 
When I run ... I see 080808"

This is almost certainly because, in the CID sequence:

<esc>*v6W 01 01 08 08 08 08

you have ignored Jim's caveat that

"Note that those are hex values given in the first command. 6 hex bytes of data."

and have instead inserted them as 12 characters.
 
Thanks for the response...


I must be missing something 01 01 08 08 08 08 to hex
30 31 20 30 31 20 30 38 20 30 38 20 30 38 20 30 38 ??

James
 
NO!

How you get it into a file will depend on your editor.

Hex 01 = CTRL-A = CHR$(1)
Hex 08 = CTRL-B = CHR$(8)

You will have to figure out the mechanism for your editor to enter the "special" characters.



Jim Asman
 
Wow there it is .... I use CHR() thanks Jim. Finally found a place for pcl.
 
OOPS!

That should have been ...

HEX 08 = CTRL-H = CHR$(8)


Jim Asman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top