Solved

Specifying colours.

Posted on 1997-10-30
3
210 Views
Last Modified: 2006-11-17
I was sent a procedure that allowed me to specify the red green and blue of a color. unfortunatly, all I have is a scribbled down copy of it and I cant seem to make it work, can someone tell me if the following is correct and how to use it:

PROCEDURE Setcolor(Col,R,G,B:Byte);
BEGIN
          port [$03c8] := Col;
          port [$03c9] := R;
          port [$03c9] := G;
          port [$03c9] := B;
END;
0
Comment
Question by:xizor
3 Comments
 

Expert Comment

by:mes
Comment Utility
I think it should work. Do you use it in textmode or graphmode?

MES.

0
 
LVL 2

Accepted Solution

by:
omsec earned 150 total points
Comment Utility
Hi there !

The procedure is right !

How ya can see, it expects 4 arguments : COL is the number of the VGA - Color you wanna change. R is the part of RED you wanna put into this color, G stands for GREEN and B for blue.

For example :

If ya wanna change color 11 known as LightCyan you have to do it
as followed :

{Text message in normal color 11}
SetColor(11, 15, 32, 19);
{Set color 11 with its new properties again}
{write the message again}

Now you have your own color, defined

Omsec
0
 
LVL 2

Author Comment

by:xizor
Comment Utility
but how do i now set the colour of a line?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
A procedure for exporting installed hotfix details of remote computers using powershell
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now