Solved

Specifying colours.

Posted on 1997-10-30
3
289 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
ID: 1216386
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
ID: 1216387
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
ID: 1216388
but how do i now set the colour of a line?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Neural Networks with Delphi 3 1,533
Conversion ? 15 88
Object was open using ADO and Delphi 2007 33 192
creating manifest for my dll that called from activex 6 98
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

23 Experts available now in Live!

Get 1:1 Help Now