Vocabulary

colors.lab

Class description

The class of CIE 1976 LAB (commonly called CIELAB) colors with an alpha channel.

Definition

Methods

colors.lab

Class description

The class of CIE 1976 LAB (commonly called CIELAB) colors with an alpha channel.

Definition

Methods

USING: accessors colors.lab colors.lch kernel locals.backend

math math.functions math.libm math.trig ;

math math.functions math.libm math.trig ;

M: laba >LCHab

[

[ l>> ] [ a>> ] [ b>> ] tri 3 load-locals

0 get-local -1 get-local fatan2 rad>deg

[ dup 360 > ] [ 360 - ] while

[ dup 0 < ] [ 360 + ] while load-local

-3 get-local -2 get-local sq -1 get-local sq +

sqrt 0 get-local 4 drop-locals

] [ alpha>> ] bi <LCHab> ;

[

[ l>> ] [ a>> ] [ b>> ] tri 3 load-locals

0 get-local -1 get-local fatan2 rad>deg

[ dup 360 > ] [ 360 - ] while

[ dup 0 < ] [ 360 + ] while load-local

-3 get-local -2 get-local sq -1 get-local sq +

sqrt 0 get-local 4 drop-locals

] [ alpha>> ] bi <LCHab> ;

USING: accessors colors.lab colors.xyz colors.xyz.private kernel

locals.backend math math.functions ;

locals.backend math math.functions ;

M: laba >xyza

[

[ l>> ] [ a>> ] [ b>> ] tri 3 load-locals

-2 get-local 16 + 116 / load-local -2 get-local 500 /

0 get-local + load-local -1 get-local -2 get-local 200 /

- load-local -1 get-local 3 ^ load-local

-1 get-local 3 ^ load-local -1 get-local xyz_epsilon >

-1 get-local

[ load-local 0 get-local 1 drop-locals ] curry

-3 get-local [

load-local 116 0 get-local * 16 - xyz_kappa /

1 drop-locals

] curry if load-local

-8 get-local xyz_kappa xyz_epsilon * > -8 get-local

[ load-local 0 get-local 16 + 116 / 3 ^ 1 drop-locals ]

curry -8 get-local

[ load-local 0 get-local xyz_kappa / 1 drop-locals ]

curry if load-local -2 get-local xyz_epsilon >

-2 get-local

[ load-local 0 get-local 1 drop-locals ] curry

-4 get-local [

load-local 116 0 get-local * 16 - xyz_kappa /

1 drop-locals

] curry if load-local -2 get-local wp_x *

-1 get-local wp_y * 0 get-local wp_z * 11 drop-locals

] [ alpha>> ] bi <xyza> ;

[

[ l>> ] [ a>> ] [ b>> ] tri 3 load-locals

-2 get-local 16 + 116 / load-local -2 get-local 500 /

0 get-local + load-local -1 get-local -2 get-local 200 /

- load-local -1 get-local 3 ^ load-local

-1 get-local 3 ^ load-local -1 get-local xyz_epsilon >

-1 get-local

[ load-local 0 get-local 1 drop-locals ] curry

-3 get-local [

load-local 116 0 get-local * 16 - xyz_kappa /

1 drop-locals

] curry if load-local

-8 get-local xyz_kappa xyz_epsilon * > -8 get-local

[ load-local 0 get-local 16 + 116 / 3 ^ 1 drop-locals ]

curry -8 get-local

[ load-local 0 get-local xyz_kappa / 1 drop-locals ]

curry if load-local -2 get-local xyz_epsilon >

-2 get-local

[ load-local 0 get-local 1 drop-locals ] curry

-4 get-local [

load-local 116 0 get-local * 16 - xyz_kappa /

1 drop-locals

] curry if load-local -2 get-local wp_x *

-1 get-local wp_y * 0 get-local wp_z * 11 drop-locals

] [ alpha>> ] bi <xyza> ;

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.99 x86.64 (2173, heads/master-f3ee5c5979, Sep 18 2022 13:17:51)