Solved

Specifying colours.

Posted on 1997-10-30
3
341 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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 …

803 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