?
Solved

Specifying colours.

Posted on 1997-10-30
3
Medium Priority
?
346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 450 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 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