source: project/wiki/eggref/5/color @ 37600

Last change on this file since 37600 was 37600, checked in by svnwiki, 21 months ago

Anonymous wiki edit for IP [183.78.57.250]: update source to use chicken 5 import

File size: 1.9 KB
Line 
1[[toc:]]
2[[tags: egg]]
3
4== color
5
6Measurement-based Color Spaces
7
8
9=== Description
10
11A 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(import 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
41Aubrey Jaffer
42
43
44=== Maintainer
45
46Erik 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
57Copyright 2001, 2002 Aubrey Jaffer
58
59Permission to copy this software, to modify it, to redistribute it,
60to distribute modified versions, and to use it for any purpose is
61granted, subject to the following restrictions and understandings.
62
631.  Any copy made of this software must include this copyright notice
64in full.
65
662.  I have made no warranty or representation that the operation of
67this software will be error-free, and I am under no obligation to
68provide any services, by way of maintenance, update, or otherwise.
69
703.  In conjunction with products arising from the use of this
71material, there shall be no use of my name in any advertising,
72promotional, or sales literature without prior written consent in
73each case.
Note: See TracBrowser for help on using the repository browser.