This is the colored Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:50:15 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
colored
System for colour representation, conversion, and operation.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/colored.git)
zlib
1.0.0
documentation-utils
(system).
package.lisp
(file).
whitepoints.lisp
(file).
conversion-matrices.lisp
(file).
type.lisp
(file).
ops.lisp
(file).
constants.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
colored/colored.asd
colored/package.lisp
colored/whitepoints.lisp
colored/conversion-matrices.lisp
colored/type.lisp
colored/ops.lisp
colored/constants.lisp
colored/documentation.lisp
colored/whitepoints.lisp
package.lisp
(file).
colored
(system).
compute-d-whitepoint
(function).
define-whitepoint
(macro).
whitepoint
(function).
(setf whitepoint)
(function).
*whitepoints*
(special variable).
xy-to-xyz
(function).
colored/conversion-matrices.lisp
whitepoints.lisp
(file).
colored
(system).
conversion-matrix
(function).
(setf conversion-matrix)
(function).
define-conversion
(macro).
*conversion-matrices*
(special variable).
reduce-row
(function).
colored/type.lisp
conversion-matrices.lisp
(file).
colored
(system).
a
(reader).
a*
(reader).
b
(reader).
b*
(reader).
c
(reader).
channels
(generic function).
cmyk
(compiler macro).
cmyk
(function).
cmyk
(structure).
color
(compiler macro).
color
(function).
color
(structure).
color-equal
(compiler macro).
color-equal
(function).
color=
(compiler macro).
color=
(function).
convert
(generic function).
g
(reader).
h
(reader).
hsi
(compiler macro).
hsi
(function).
hsi
(structure).
hsl
(compiler macro).
hsl
(function).
hsl
(structure).
hsv
(compiler macro).
hsv
(function).
hsv
(structure).
i
(reader).
k
(reader).
l
(reader).
l*
(reader).
lab
(compiler macro).
lab
(function).
lab
(structure).
m
(reader).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
oklab
(compiler macro).
oklab
(function).
oklab
(structure).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
r
(reader).
rgb
(compiler macro).
rgb
(function).
rgb
(structure).
s
(reader).
srgb
(compiler macro).
srgb
(function).
srgb
(structure).
v
(reader).
x*
(reader).
xyz
(compiler macro).
xyz
(function).
xyz
(structure).
y
(reader).
y*
(reader).
z*
(reader).
%cmyk
(function).
%hsi
(function).
%hsl
(function).
%hsv
(function).
%hue-type
(function).
%lab
(function).
%oklab
(function).
%rgb
(function).
%srgb
(function).
%xyz
(function).
2color-equal
(generic function).
2color=
(generic function).
_color
(function).
define-color-type
(macro).
hue-type
(compiler macro).
hue-type
(function).
hue-type
(structure).
colored/ops.lisp
type.lisp
(file).
colored
(system).
alpha
(function).
black
(function).
blue
(function).
c*
(method).
c+
(method).
c-
(method).
c/
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
convert
(method).
cyan
(function).
decode
(function).
encode
(function).
gradient
(function).
green
(function).
hue
(function).
intensity
(function).
lerp
(method).
lerp
(method).
lightness
(function).
magenta
(function).
red
(function).
saturation
(function).
temperature-color
(function).
value
(function).
yellow
(function).
%hue
(function).
define-channel-reader
(macro).
define-cwise-op
(macro).
hue-space-rgb
(function).
colored/constants.lisp
ops.lisp
(file).
colored
(system).
define-color
(macro).
colored/documentation.lisp
constants.lisp
(file).
colored
(system).
Packages are listed by definition order.
org.shirakumo.alloy.colored
common-lisp
.
a
(reader).
a*
(reader).
alpha
(function).
b
(reader).
b*
(reader).
black
(function).
blue
(function).
c
(reader).
c*
(generic function).
c+
(generic function).
c-
(generic function).
c/
(generic function).
channels
(generic function).
cmyk
(compiler macro).
cmyk
(function).
cmyk
(structure).
color
(compiler macro).
color
(function).
color
(structure).
color-equal
(compiler macro).
color-equal
(function).
color=
(compiler macro).
color=
(function).
compute-d-whitepoint
(function).
conversion-matrix
(function).
(setf conversion-matrix)
(function).
convert
(generic function).
cyan
(function).
decode
(function).
define-color
(macro).
define-conversion
(macro).
define-whitepoint
(macro).
encode
(function).
g
(reader).
gradient
(function).
green
(function).
h
(reader).
hsi
(compiler macro).
hsi
(function).
hsi
(structure).
hsl
(compiler macro).
hsl
(function).
hsl
(structure).
hsv
(compiler macro).
hsv
(function).
hsv
(structure).
hue
(function).
i
(reader).
intensity
(function).
k
(reader).
l
(reader).
l*
(reader).
lab
(compiler macro).
lab
(function).
lab
(structure).
lerp
(generic function).
lightness
(function).
m
(reader).
magenta
(function).
oklab
(compiler macro).
oklab
(function).
oklab
(structure).
r
(reader).
red
(function).
rgb
(compiler macro).
rgb
(function).
rgb
(structure).
s
(reader).
saturation
(function).
srgb
(compiler macro).
srgb
(function).
srgb
(structure).
temperature-color
(function).
v
(reader).
value
(function).
whitepoint
(function).
(setf whitepoint)
(function).
x*
(reader).
xyz
(compiler macro).
xyz
(function).
xyz
(structure).
y
(reader).
y*
(reader).
yellow
(function).
z*
(reader).
%cmyk
(function).
%hsi
(function).
%hsl
(function).
%hsv
(function).
%hue
(function).
%hue-type
(function).
%lab
(function).
%oklab
(function).
%rgb
(function).
%srgb
(function).
%xyz
(function).
*conversion-matrices*
(special variable).
*whitepoints*
(special variable).
2color-equal
(generic function).
2color=
(generic function).
_color
(function).
define-channel-reader
(macro).
define-color-type
(macro).
define-cwise-op
(macro).
hue-space-rgb
(function).
hue-type
(compiler macro).
hue-type
(function).
hue-type
(structure).
reduce-row
(function).
xy-to-xyz
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Define a new color constant.
NAME should be a symbol for the constant’s name. If the symbol is not
interned in any package, the name will automatically be used as a
symbol designator in the ORG.SHIRAKUMO.ALLOY.COLORED.COLORS package.
If the package is ORG.SHIRAKUMO.ALLOY.COLORED.COLORS, then the symbol
is also automatically exported from that package.
INT should be an integer describing the full colour, as interpreted by the CONVERSION function. By default this should be an RGB integer.
Note that once the constant is defined, its value cannot be changed.
See RGB
Defines a new colour space conversion matrix.
The matrix should be expressed via 9 entries that form a 3x3
matrix.
See CONVERSION-MATRIX
Defines a new whitepoint.
The whitepoint should be a list of two values, the xy chromaticity
coordinates in the xyY space. They are then automatically converted
and internally stored in the XYZ format.
See WHITEPOINT
See COMPUTE-D-WHITEPOINT
Returns the alpha channel component.
0 means transparent, 1 opaque.
See COLOR (type)
a
.
Returns the green/red channel component.
See LAB
a*
.
Returns the alpha component of the colour.
See A
Returns the blue channel component.
See RGB
See BLUE
b
.
Returns the blue/yellow channel component.
See LAB
b*
.
Returns the black component of the colour.
If not in CMYK format, is first converted to CMYK.
See K
Returns the blue component of the colour.
If not in RGB format, is first converted to RGB.
See B
Returns the cyan channel component.
See CMYK
See CYAN
c
.
Create a Cyan/Magenta/Yellow/Black component colour.
See COLOR (type)
See C
See M
See Y
See K
Returns true if all colours match in the RGB channels.
Unlike COLOR=, this ignores the alpha channel.
See COLOR (type)
See COLOR=
Returns true if all colours match in all channels.
See COLOR (type)
See COLOR-EQUAL
Computes the xyY coordinates for the CIE standard illuminant series D.
CCT must be a CCT reference temperature.
See DEFINE-WHITEPOINT
Returns a linear conversion matrix for the two given colour spaces.
Signals an error if no conversion matrix to fit the from/to
spaces is known. Standard conversions are known for converting
to/from XYZ and the following:
:ADOBE-RGB
:APPLE-RGB
:BEST-RGB
:BETA-RGB
:BRUCE-RGB
:CIE-RGB
:COLORMATCH-RGB
:DON-RGB-4
:ECI-RGB
:EKTA-SPACE-PS5
:NTSC-RGB
:PAL-RGB
:PROPHOTO-RGB
:SMPTE-C-RGB
:SRGB
:WIDE-GAMUT-RGB
The conversion method may be passed to CONVERT via the keywords
:SPACE (for a name of a colour space) or :MATRIX for passing a
9-element vector directly.
See DEFINE-CONVERSION
Returns the cyan component of the colour.
If not in CMYK format, is first converted to CMYK.
See C
Constructs a colour from the given integer colour representation.
CHANNEL-SIZE should be the number of bits per channel, and CHANNELS a
list in order of the channels. The list should contain symbols naming
the channels available to the requested TYPE.
For instance, to decode a 16bpc BGRA integer, you would use
(decode-color int 16 ’(b g r a))
See COLOR (type)
See ENCODE
Constructs an integer for the colour using the given integer colour representation.
CHANNEL-SIZE should be the number of bits per channel, and CHANNELS a
list in order of the channels. The list should contain symbols naming
channels available for the colour being encoded.
For instance, to encode a 16bpc BGRA integer, you would use
(encode-color color 16 ’(b g r a))
See COLOR (type)
See DECODE
Returns the green channel component.
See RGB
See GREEN
g
.
Evaluate a colour gradient at a specific point.
Returns the linear interpolation of the two colours between the stops
designated by X. Each stop in STOPS should be a cons of its position
along the gradient and the colour at that stop.
See LERP
Returns the green component of the colour.
If not in RGB format, is first converted to RGB.
See G
Returns the hue channel component.
see HSV
See HSL
See HSI
See HUE
h
.
Create a Hue/Saturation/Intensity component colour.
The Hue should be in [0,360[ degrees, the other two values in the
[0,1] range.
See TO-HSI
See HUE
See INTENSITY
See COLOR (type)
Create a Hue/Saturation/Lightness component colour.
The Hue should be in [0,360[ degrees, the other two values in the
[0,1] range.
See TO-HSL
See HUE
See LIGHTNESS
See COLOR (type)
Create a Hue/Saturation/Value component colour.
The Hue should be in [0,360[ degrees, the other two values in the
[0,1] range.
See TO-HSV
See HUE
See SATURATION
See VALUE
See COLOR (type)
Returns the hue component of the colour in degrees [0,360[.
If not in HSL/HSV/HSI format, is first converted to HSV.
See H
Returns the intensity channel component.
See HSI
See INTENSITY
i
.
Returns the intensity component of the colour.
If not in HSI format, is first converted to HSI.
See I
Returns the black channel component.
See CMYK
See BLACK
k
.
Returns the lightness channel component.
See HSL
See LIGHTNESS
l
.
Returns the lightness channel component.
See LAB
l*
.
Create a CIE LAB colour instance.
See COLOR (type)
See L*
See A*
See B*
Returns the lightness component of the colour.
If not in HSL format, is first converted to HSL.
See L
Returns the magenta channel component.
See CMYK
See MAGENTA
m
.
Returns the magenta component of the colour.
If not in CMYK format, is first converted to CMYK.
See M
Returns the red channel component.
See RGB
See RED
r
.
Returns the red component of the colour.
If not in RGB format, is first converted to RGB.
See R
Create a new RGB color instance.
See COLOR (type)
Returns the saturation channel component.
see HSV
See HSL
See HSI
See SATURATION
s
.
Returns the saturation component of the colour.
If not in HSL/HSV/HSI format, is first converted to HSV.
See S
Create a new sRGB color instance.
This is distinct from RGB by being in a non-linear space.
See COLOR (type)
See RGB
Compute the colour for the corresponding light temperature.
The temperature is given in Kelvin and is valid in the range [0,40’000]. Values outside this range will not yield correct colours.
Note that the range [0,1’000] is denormalised and will simply correspond to the colour for 1’000K linearly scaled down to zero.
Daylight temperatures occur in the range [5’000,6’5000], moonlight
temperature is around 4’100K.
See COLOR (type)
Returns the value channel component.
See HSV
See VALUE
v
.
Returns the value component of the colour.
If not in HSV format, is first converted to HSV.
See V
Returns a reference whitepoint XYZ triplet for the requested name.
Signals an error if no whitepoint is known for the given name.
The following whitepoints are defined by default:
:A
:B
:C
:D50
:D55
:D60
:D65
:D70
:D75
:E
:F1
:F2
:F3
:F4
:F5
:F6
:F7
:F8
:F9
:F10
:F11
:F12
:LED-B1
:LED-B2
:LED-B3
:LED-B4
:LED-B5
:LED-BH1
:LED-RGB1
:LED-V1
:LED-V2
The whitepoint may be passed to CONVERT via the :WHITEPOINT keyword,
as either the name of a defined whitepoint, or a vector exprsesing the
XYZ triplet.
See DEFINE-WHITEPOINT
Create a CIE XYZ colour instance.
See COLOR (type)
See X*
See Y*
See Z*
Returns the yellow channel component.
See CMYK
See YELLOW
y
.
Returns the yellow component of the colour.
If not in CMYK format, is first converted to CMYK.
See Y
Returns the list of available channels in the colour.
Accepts both a COLOR instance and a color type name.
See COLOR (type)
(eql org.shirakumo.alloy.colored:oklab)
)) ¶(eql org.shirakumo.alloy.colored:lab)
)) ¶(eql org.shirakumo.alloy.colored:xyz)
)) ¶(eql org.shirakumo.alloy.colored:cmyk)
)) ¶(eql org.shirakumo.alloy.colored:hsi)
)) ¶(eql org.shirakumo.alloy.colored:hsl)
)) ¶(eql org.shirakumo.alloy.colored:hsv)
)) ¶(eql org.shirakumo.alloy.colored::hue-type)
)) ¶(eql org.shirakumo.alloy.colored:srgb)
)) ¶(eql org.shirakumo.alloy.colored:rgb)
)) ¶(eql org.shirakumo.alloy.colored:color)
)) ¶Convert a colour to a different colour space (type).
Direct conversions between any colour space and any other is not
guaranteed to be available, and you may have to convert to a
common space such as RGB or LAB first and then to your target
colour space of choice.
Certain conversions may accept additional arguments that influence
the process and colour range.
See COLOR (type)
Linearly interpolate between two colours from the same colour space.
If the colours are of a different colour space (type), an error is
signalled.
Each of the colours’ channels are interpolated separately.
Representation of a colour in some space.
A colour is an immutable object and can be emitted into FASLs. Colors
can and are cached aggressively thanks to their immutability.
Note that an instance returned by a constructor may or may not be EQ
to a previously constructed color instance with the same channel
values. To properly test equality, use COLOR= or COLOR-EQUAL.
Note that the colour channels are stored as SINGLE-FLOATs. Conversion
functions to and from integers are available as operations. The floats
are not constrained to be within [0,1] and can thus be used to encode
high dynamic range.
See CHANNELS
See A
See COLOR (function)
See COLOR=
See COLOR-EQUAL
See RGB
See HSV
See HSL
See HSI
See CMYK
See LAB
srgb
.
Jump to: | %
(
2
_
A B C D E F G H I K L M O P R S T V W X Y Z |
---|
Jump to: | %
(
2
_
A B C D E F G H I K L M O P R S T V W X Y Z |
---|
Jump to: | *
A B C G H I K L M R S V X Y Z |
---|
Jump to: | *
A B C G H I K L M R S V X Y Z |
---|
Jump to: | C D F H L O P R S T W X |
---|
Jump to: | C D F H L O P R S T W X |
---|