This file is indexed.

/usr/share/axiom-20170501/src/algebra/PALETTE.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
)abbrev domain PALETTE Palette
++ Author: Jim Wen
++ Date Created: May 10th 1989
++ Date Last Updated: Jan 19th 1990
++ Description:
++ This domain describes four groups of color shades (palettes).
 
Palette() : SIG == CODE where

  I ==> Integer
  C ==> Color
  SHADE ==> ["Dark","Dim","Bright","Pastel","Light"]

  SIG ==> SetCategory with

    dark : C -> %
      ++ dark(c) sets the shade of the indicated hue of c to it's lowest value.

    dim : C -> %
      ++ dim(c) sets the shade of a hue, c,  above dark, but below bright.

    bright : C -> %
      ++ bright(c) sets the shade of a hue, c, above dim, but below pastel.

    pastel : C -> %
      ++ pastel(c) sets the shade of a hue, c,  above bright, but below light.

    light : C -> %
      ++ light(c) sets the shade of a hue, c,  to it's highest value.

    hue : % -> C
      ++ hue(p) returns the hue field of the indicated palette p.

    shade : % -> I
      ++ shade(p) returns the shade index of the indicated palette p.

    coerce : C -> %
      ++ coerce(c) sets the average shade for the palette to that of the 
      ++ indicated color c.
 
  CODE ==> add

    Rep := Record(shadeField:I, hueField:C)

    dark   c == [1,c]

    dim    c == [2,c]  

    bright c == [3,c]  

    pastel c == [4,c]  

    light  c == [5,c]  

    hue    p == p.hueField

    shade  p == p.shadeField

    sample() == bright(sample())

    coerce(c:Color):% == bright c

    coerce(p:%):OutputForm ==
      hconcat ["[",coerce(p.hueField),"] from the ",_
               SHADE.(p.shadeField)," palette"]