Reference · Color

Color

64 words. Sorted alphabetically.

->1886-EOTF
  • ( -- eotf:eotf )

Push a fresh BT.1886 EOTF with canonical reference levels (Lb=0, Lw=100 nits, gamma=2.4).

->ACEScc-EOTF
  • ( -- eotf:eotf )

Push an ACES ACEScc EOTF (working-space log).

->ACEScct-EOTF
  • ( -- eotf:eotf )

Push an ACES ACEScct EOTF (working-space log with linear toe).

->CLog3-EOTF
  • ( -- eotf:eotf )

Push a Canon Log 3 EOTF.

->DLog-EOTF
  • ( -- eotf:eotf )

Push a DJI D-Log EOTF.

->EOTF
  • ( name:string -- eotf:eotf )

Build an EOTF from a name string (e.g. "PQ", "BT1886", "sRGB", "GammaEotf(2.2)").

->FLog-EOTF
  • ( -- eotf:eotf )

Push a Fujifilm F-Log EOTF.

->GAMMA-EOTF
  • ( gamma:number -- eotf:eotf )

Build a Gamma EOTF y = x^gamma. Stack: ( gamma -- eotf ).

->HLG-EOTF
  • ( -- eotf:eotf )

Push a fresh HLG (Hybrid Log-Gamma) EOTF.

->ICtCp
  • ( I:number Ct:number Cp:number -- ictcp:ictcp )
  • ( xyy:xyy -- ictcp:ictcp )

Construct or convert to ICtCp: from I/Ct/Cp doubles, or from xyY.

->JLog1-EOTF
  • ( -- eotf:eotf )

Push a JVC J-Log1 EOTF.

->Lab
  • ( L:number a:number b:number white:xyy -- lab:lab )
  • ( sample:xyy white:xyy -- lab:lab )

Construct a Lab from a reference-white xyY plus L*/a*/b* doubles, or from a reference-white xyY plus a sample xyY.

->Log3G10-EOTF
  • ( -- eotf:eotf )

Push a RED Log3G10 EOTF (signed-log, supports negative linear inputs).

->LogC3-EOTF
  • ( -- eotf:eotf )

Push an Arri LogC3 (LogC v3) EOTF.

->LogC4-EOTF
  • ( -- eotf:eotf )

Push an Arri LogC4 EOTF (Alexa 35 / Alexa Mini LF).

->NLog-EOTF
  • ( -- eotf:eotf )

Push a Nikon N-Log EOTF.

->PQ-EOTF
  • ( -- eotf:eotf )

Push a fresh PQ (SMPTE ST 2084) EOTF. Default range 0..10000 nits.

->qRGB
  • ( r:number g:number b:number quant:number -- qrgb:qrgb )

Construct a QuantRgb from r/g/b/qfactor doubles, with qfactor as the integer divisor (255 for 8-bit, 1023 for 10-bit, etc.).

->qYCbCr
  • ( y:number cb:number cr:number quant:number -- qycbcr:qycbcr )

Construct a QuantYCbCr from Y/Cb/Cr/qfactor doubles, with qfactor as the integer divisor (255 for 8-bit, 1023 for 10-bit, etc.).

->RGB
  • ( r:number g:number b:number -- rgb:rgb )
  • ( xyy:xyy -- rgb:rgb )
  • ( ycc:ycbcr -- rgb:rgb )
  • ( qrgb:qrgb -- rgb:rgb )

Construct or convert to Rgb: from r/g/b doubles, from xyY (using the working space), from YCbCr (using the working space), or from QuantRgb (dequantize).

->RgbSpace
  • ( name:string eotf:eotf white:xyy blue:xyy green:xyy red:xyy -- space:rgbspace )

Build an RgbSpace from name + EOTF + white + blue + green + red xyY primaries.

->SLog3-EOTF
  • ( -- eotf:eotf )

Push a Sony S-Log3 EOTF (linear-toe-log with Sony's published constants).

->sRGB-EOTF
  • ( -- eotf:eotf )

Push a fresh sRGB EOTF (IEC 61966-2-1 piecewise gamma).

->VLog-EOTF
  • ( -- eotf:eotf )

Push a Panasonic V-Log EOTF.

->xyY
  • ( x:number y:number Y:number -- xyy:xyy )
  • ( rgb:rgb -- xyy:xyy )
  • ( xyz:xyz -- xyy:xyy )

Construct or convert to xyY: from x/y/Y doubles, from Rgb (via the working space), or from XYZ.

->XYZ
  • ( X:number Y:number Z:number -- xyz:xyz )
  • ( xyy:xyy -- xyz:xyz )
  • ( rgb:rgb -- xyz:xyz )

Construct or convert to XYZ: from X/Y/Z doubles, from xyY, or from Rgb (via the working space).

->YCbCr
  • ( y:number cb:number cr:number -- ycc:ycbcr )
  • ( rgb:rgb -- ycc:ycbcr )

Construct or convert to YCbCr: from Y/Cb/Cr doubles, or from Rgb (via the working space's YCbCr matrix).

BLUE
  • ( space:rgbspace -- blue:xyy )

Push the blue primary of an RgbSpace as an xyY value.

CHAD
  • ( source:xyy target:xyy m:mx3 -- chad:mx3 )
  • ( source:xyz target:xyz m:mx3 -- chad:mx3 )

Compute a chromatic adaptation matrix from source and destination white points (xyY or XYZ) and a CHAD matrix (Bradford / vonKries / identity).

CYAN
  • ( space:rgbspace -- cyan:xyy )

Push the derived cyan secondary of an RgbSpace as an xyY value.

DE2000
  • ( a:rgb b:xyy -- de:number )
  • ( a:xyy b:xyy -- de:number )
  • ( a:xyy b:rgb -- de:number )
  • ( a:rgb b:rgb -- de:number )

Compute Delta-E 2000 between two colors, each given as Rgb or xyY (uses the working space's white point as the Lab reference).

DEITP
  • ( a:rgb b:xyy -- de:number )
  • ( a:xyy b:xyy -- de:number )
  • ( a:xyy b:rgb -- de:number )
  • ( a:rgb b:rgb -- de:number )

Compute Delta-E ITP (Rec.2100 perceptual difference) between two colors, each given as Rgb or xyY.

EOTF
  • ( eotf:eotf value:number -- light:number )

Apply an EOTF forward. Stack: ( eotf value -- light ). Pops the signal value at TOS and an EOTF at NOS; pushes the corresponding light value (nits).

GREEN
  • ( space:rgbspace -- green:xyy )

Push the green primary of an RgbSpace as an xyY value.

ICtCp->
  • ( ictcp:ictcp -- I:number Ct:number Cp:number )

Explode an ICtCp into I/Ct/Cp doubles.

iEOTF
  • ( eotf:eotf value:number -- signal:number )

Apply an EOTF inverse. Stack: ( eotf value -- signal ). Pops the light value at TOS and an EOTF at NOS; pushes the corresponding signal level.

iQUANT
  • ( qrgb:qrgb -- rgb:rgb )
  • ( qycbcr:qycbcr -- ycc:ycbcr )

Dequantize a QuantRgb or QuantYCbCr to its normalized Rgb or YCbCr equivalent.

Lab->
  • ( lab:lab -- L:number a:number b:number white:xyy )

Explode a Lab into L*/a*/b* doubles plus its reference-white xyY.

MAGENTA
  • ( space:rgbspace -- magenta:xyy )

Push the derived magenta secondary of an RgbSpace as an xyY value.

qRGB->
  • ( qrgb:qrgb -- r:number g:number b:number quant:number )

Explode a QuantRgb into r/g/b/quant integers.

QUANT
  • ( rgb:rgb bits:integer -- qrgb:qrgb )
  • ( ycc:ycbcr bits:integer -- qycbcr:qycbcr )

Quantize an Rgb or YCbCr at the given bit depth (TOS integer): produces a QuantRgb or QuantYCbCr with quant = 2^bits - 1.

RED
  • ( space:rgbspace -- red:xyy )

Push the red primary of an RgbSpace as an xyY value.

RGB->
  • ( rgb:rgb -- r:number g:number b:number )

Explode an Rgb into r/g/b doubles.

RgbMx
  • ( space:rgbspace -- m:mx3 )

Push the RGB -> XYZ matrix of an RgbSpace.

RgbMx1
  • ( space:rgbspace -- m:mx3 )

Push the XYZ -> RGB matrix of an RgbSpace (inverse of RgbMx).

RgbRgbMx
  • ( src:rgbspace dst:rgbspace -- m:mx3 )

Push the conversion matrix that maps RGB values from the source RgbSpace to the destination RgbSpace.

RgbSpace->
  • ( space:rgbspace -- name:string eotf:eotf white:xyy blue:xyy green:xyy red:xyy )

Explode an RgbSpace into name, EOTF, white, blue, green, red xyY primaries.

SET-WORKING-RGBSPACE
  • ( space:rgbspace )

Set the working RGB space. Subsequent conversions and matrix accessors use this space.

test-rgb
  • ( -- result:object )

Push a sample of one each of Rgb, RgbSpace, xyY, XYZ, YCbCr, EOTF onto the stack. For exercising the cards.

wBLUE
  • ( -- blue:xyy )

Push the blue primary of the working RGB space as an xyY value.

wCYAN
  • ( -- cyan:xyy )

Push the derived cyan secondary of the working RGB space as an xyY value.

wGREEN
  • ( -- green:xyy )

Push the green primary of the working RGB space as an xyY value.

WHITE
  • ( space:rgbspace -- white:xyy )

Push the white point of an RgbSpace as an xyY value.

wMAGENTA
  • ( -- magenta:xyy )

Push the derived magenta secondary of the working RGB space as an xyY value.

wRED
  • ( -- red:xyy )

Push the red primary of the working RGB space as an xyY value.

wRgbSpace->
  • ( -- space:rgbspace )

Push the current working RGB space.

wWHITE
  • ( -- white:xyy )

Push the white point of the working RGB space as an xyY value.

wYCbCrMx
  • ( -- m:mx3 )

Push the YCbCr -> RGB matrix derived from the working RGB space's primaries.

wYELLOW
  • ( -- yellow:xyy )

Push the derived yellow secondary of the working RGB space as an xyY value.

xyY->
  • ( xyy:xyy -- x:number y:number Y:number )

Explode an xyY into x/y/Y doubles.

XYZ->
  • ( xyz:xyz -- X:number Y:number Z:number )

Explode an XYZ into X/Y/Z doubles.

YCbCr->
  • ( ycc:ycbcr -- y:number cb:number cr:number )

Explode a YCbCr into Y/Cb/Cr doubles.

YCbCrMx
  • ( space:rgbspace -- m:mx3 )

Push the YCbCr -> RGB matrix derived from the given RgbSpace's primaries.

YELLOW
  • ( space:rgbspace -- yellow:xyy )

Push the derived yellow secondary of an RgbSpace as an xyY value.

Contact

Send us a message — we'll reply by email.