PreviousNext
Help > Software > The <graphics.h> Library for C.impl > Colours
Colours

C.impl operates natively with 24-bit colours, however in a monochrome graphic system like the ELLO 1A, any colour greater than 0 is the same. Simulated “colours” are however possible, by using specific graphical patterns. Those simulated colours are given to the interpreter as negative numbers.

The <platform.h> library for ELLO 1A includes many such predefined patters:

Colour constant

Numeric value

Pattern

COL_SOLID

0xFFFFFF

Main colour (solid white/active)

COL_NONE

 0

No colour   (solid black)

COL_INVERT

-1

Opposite to the current colour

COL_TRANSP

-2

No colour   (transparent)

COL_GREY50

-3

50% grey

COL_GREY25

-4

25% grey

COL_HLN50

-5

50% horizontal lines

COL_HLN33

-6

33% horizontal lines

COL_HLN25

-7

25% horizontal lines

COL_VLN50

-8

50% vertical lines

COL_VLN33

-9

33% vertical lines

COL_VLN25

-10

25% vertical lines

Reserved

-11

 

COL_DGL33

-12

33% / diagonal lines

COL_DGL25

-13

25% / diagonal lines

Reserved

-14

 

COL_DGR33

-15

33% \ diagonal lines

COL_DGR25

-16

25% \ diagonal lines

COL_SPL33

-17

33% / dotted diagonal lines

COL_SPL25

-18

25% / dotted diagonal lines

COL_SPR33

-19

33% \ dotted diagonal lines

COL_SPR25

-20

25% \ dotted diagonal lines

Reserved

-21 … -29

 

Percentage fill

-30 … -50

A pixel is turned on with specific probability.

 

The value -30 is equivalent to probability 0 (pixel is never on).

 

Every next value is increasing the probability by 5%.

 

Thus, value -31 is probability 5%, value -32 is probability 10%, and so on.

 

Value -50 represents probability 100% (pixel is always on).