index

Varkon MBS Programmers manual

# cre_color - Procedure

## Description

Sets the RGB color value for a pen. Pen numbers range from 0 to 255. Pen 0 is used for background in graphics windows and pen 1 is the default pen for drawing. Pen 0 and 1 are always defined in Varkon's ini-file. Additional default pen colors may be defined in the ini-file but usually not all 256. It is good advice not to change the default RGB values of pen 0 and 1.

A pen color is defined by mixing different intensities of Red, Green and Blue color (RGB). No intensity is 0 and full intensity is 255. This gives what is often referred to as 24 bits of color or True Color. If the hardware of the computer does not support true color Varkon uses the closest match to the desired color.

## Syntax

      cre_color(pen, red, green, blue);

      int pen;
      int red;
      int green;
      int blue;

## Principal parameters

pen | - Pen number, 2 - 255
red | - Red intensity, 0 - 255
green | - Green intensity, 0 - 255
blue | - Blue intensity, 0 - 255

## Optional parameters

None.

## Comments

Colors may look different on different computers due to differences in hardware. Varkon uses the specified RGB-triplet as it is without gamma correction.

See also:

get_color(), cre_material(), get_material()

Varkon version 1.19C svn# 97