1 | [[toc:]] |
---|
2 | [[tags: egg]] |
---|
3 | |
---|
4 | == color |
---|
5 | |
---|
6 | Measurement-based Color Spaces |
---|
7 | |
---|
8 | |
---|
9 | === Description |
---|
10 | |
---|
11 | A port of the [[http://people.csail.mit.edu/jaffer/SLIB|SLIB]] color library. For documentation see: |
---|
12 | |
---|
13 | [[http://people.csail.mit.edu/jaffer/slib/Color.html#Color|color]] |
---|
14 | |
---|
15 | |
---|
16 | === Requirements |
---|
17 | |
---|
18 | [[srfi-13]], [[fmt]], [[records]] |
---|
19 | |
---|
20 | |
---|
21 | === Examples |
---|
22 | |
---|
23 | <enscript hightlight=scheme> |
---|
24 | ;;; construct some colors in various color spaces |
---|
25 | ;;; and measure their distance from the D65 white-point |
---|
26 | |
---|
27 | (use color) |
---|
28 | |
---|
29 | (let ((rgb-red (make-color 'sRGB '(255 0 0))) |
---|
30 | (lab-yellow (make-color 'L*a*b* '( 76 7 130))) |
---|
31 | (luv-blue (make-color 'L*u*v* '( 32 -9 -132)))) |
---|
32 | (print "rgb-red's distance from the D65 whitepoint is " (CIE:DE* rgb-red D65 D65)) |
---|
33 | (print "lab-yellow's distance from the D65 whitepoint is " (CIE:DE* lab-yellow D65 D65)) |
---|
34 | (print "luv-blue's distance from the D65 whitepoint is " (CIE:DE* luv-blue D65 D65)) |
---|
35 | (print "D65's distance from the D65 whitepoint is " (CIE:DE* D65 D65 D65))) |
---|
36 | </enscript> |
---|
37 | |
---|
38 | |
---|
39 | === Author |
---|
40 | |
---|
41 | Aubrey Jaffer |
---|
42 | |
---|
43 | |
---|
44 | === Maintainer |
---|
45 | |
---|
46 | Erik Falor <ewfalor at gmail dot com> |
---|
47 | |
---|
48 | |
---|
49 | === Version history |
---|
50 | |
---|
51 | ; 1.1 : Ported to CHICKEN 5 |
---|
52 | ; 1.0 : Initial release as CHICKEN Scheme egg |
---|
53 | |
---|
54 | |
---|
55 | === License |
---|
56 | |
---|
57 | Copyright 2001, 2002 Aubrey Jaffer |
---|
58 | |
---|
59 | Permission to copy this software, to modify it, to redistribute it, |
---|
60 | to distribute modified versions, and to use it for any purpose is |
---|
61 | granted, subject to the following restrictions and understandings. |
---|
62 | |
---|
63 | 1. Any copy made of this software must include this copyright notice |
---|
64 | in full. |
---|
65 | |
---|
66 | 2. I have made no warranty or representation that the operation of |
---|
67 | this software will be error-free, and I am under no obligation to |
---|
68 | provide any services, by way of maintenance, update, or otherwise. |
---|
69 | |
---|
70 | 3. In conjunction with products arising from the use of this |
---|
71 | material, there shall be no use of my name in any advertising, |
---|
72 | promotional, or sales literature without prior written consent in |
---|
73 | each case. |
---|