Color and Pattern Library

Author(s): Isabel Martín García.

This module contains predicates to access and check conformance to the available colors and patterns.

Usage and interface

Documentation on exports

REGTYPE
color(Color)

color('GreenYellow').
color('Yellow').
color('White').
color('Wheat').
color('BlueViolet').
color('Violet').
color('MediumTurquoise').
color('DarkTurquoise').
color('Turquoise').
color('Thistle').
color('Tan').
color('Sienna').
color('Salmon').
color('VioletRed').
color('OrangeRed').
color('MediumVioletRed').
color('IndianRed').
color('Red').
color('Plum').
color('Pink').
color('MediumOrchid').
color('DarkOrchid').
color('Orchid').
color('Orange').
color('Maroon').
color('Magenta').
color('Khaki').
color('Grey').
color('LightGray').
color('DimGray').
color('DarkSlateGray').
color('YellowGreen').
color('SpringGreen').
color('SeaGreen').
color('PaleGreen').
color('MediumSpringGreen').
color('MediumSeaGreen').
color('LimeGreen').
color('ForestGreen').
color('DarkOliveGreen').
color('DarkGreen').
color('Green').
color('Goldenrod').
color('Gold').
color('Brown').
color('Firebrick').
color('Cyan').
color('Coral').
color('SteelBlue').
color('SlateBlue').
color('SkyBlue').
color('Navy').
color('MidnightBlue').
color('MediumSlateBlue').
color('MediumBlue').
color('LightSteelBlue').
color('LightBlue').
color('DarkSlateBlue').
color('CornflowerBlue').
color('CadetBlue').
color('Blue').
color('Black').
color('MediumAquamarine').
color('Aquamarine').
Defines available colors for elements such as points, lines or bars.

PREDICATE

Usage:color(C1,C2)

Test whether the color C1 is a valid color or not. If C1 is a variable the predicate will choose a valid color randomly. If C1 is a ground term that is not a valid color an exception (error9) will be thrown

  • The following properties should hold at call time:
    (color_pattern:color/1)color_pattern:color(C1)
  • The following properties should hold upon exit:
    (color_pattern:color/1)color_pattern:color(C2)

REGTYPE
pattern(Pattern)

pattern(pattern1).
pattern(pattern2).
pattern(pattern3).
pattern(pattern4).
pattern(pattern5).
pattern(pattern6).
pattern(pattern7).
pattern(pattern8).
pattern(pattern9).
Defines valid patterns used in the stipple style bar attribute.

PREDICATE

Usage:pattern(P1,P2)

Test whether the pattern P1 is a valid pattern or not. If P1 is a variable the predicate will choose a valid pattern randomly. If P1 is a ground term that is not a valid pattern an exception (error10) will be thrown.

  • The following properties should hold at call time:
    (color_pattern:pattern/1)color_pattern:pattern(P1)
  • The following properties should hold upon exit:
    (color_pattern:pattern/1)color_pattern:pattern(P2)

PREDICATE
random_color(Color)

This predicate choose a valid color among the availables randomly.

Usage:

  • The following properties should hold at call time:
    (color_pattern:color/1)color_pattern:color(Color)

PREDICATE
random_lightcolor(Color)

This predicate choose a valid light color among the availables randomly.

Usage:

  • The following properties should hold at call time:
    (term_typing:var/1)Color is a free variable.
  • The following properties should hold upon exit:
    (color_pattern:color/1)color_pattern:color(Color)

PREDICATE
random_darkcolor(Color)

This predicate choose a valid dark color among the availables randomly.

Usage:

  • The following properties should hold at call time:
    (term_typing:var/1)Color is a free variable.
  • The following properties should hold upon exit:
    (color_pattern:color/1)color_pattern:color(Color)

PREDICATE
random_pattern(Pattern)

This predicate choose a valid pattern among the availables randomly.

Usage:

  • The following properties should hold at call time:
    (term_typing:var/1)Pattern is a free variable.
  • The following properties should hold upon exit:
    (color_pattern:pattern/1)color_pattern:pattern(Pattern)