]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "colors.hcl: adding HCL color space"
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 11 Jan 2022 21:18:41 +0000 (13:18 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 11 Jan 2022 21:18:41 +0000 (13:18 -0800)
This reverts commit 52ef49cdfe92a4dc36aa5562adc801e364941523.

basis/colors/hcl/authors.txt [deleted file]
basis/colors/hcl/hcl-docs.factor [deleted file]
basis/colors/hcl/hcl-tests.factor [deleted file]
basis/colors/hcl/hcl.factor [deleted file]
basis/colors/hcl/summary.txt [deleted file]

diff --git a/basis/colors/hcl/authors.txt b/basis/colors/hcl/authors.txt
deleted file mode 100644 (file)
index e091bb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-John Benediktsson
diff --git a/basis/colors/hcl/hcl-docs.factor b/basis/colors/hcl/hcl-docs.factor
deleted file mode 100644 (file)
index 80bcb65..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-USING: help.markup help.syntax ;
-IN: colors.hcl
-
-HELP: hcla
-{ $class-description "The class of HCL (Hue, Chroma, Luminance) colors with an alpha channel. All slots store values in the interval " { $snippet "[0,1]" } "." } ;
-
-ARTICLE: "colors.hcl" "HCL colors"
-"The " { $vocab-link "colors.hcl" } " vocabulary implements colors specified by their hue, chroma, and luminance components, together with an alpha channel."
-{ $subsections
-    hcla
-    <hcla>
-    >hcla
-}
-"The HCL color space is simply the polar representation of the CIELUV color space. For more information."
-{ $see-also "colors" "colors.luv" } ;
-
-ABOUT: "colors.hcl"
diff --git a/basis/colors/hcl/hcl-tests.factor b/basis/colors/hcl/hcl-tests.factor
deleted file mode 100644 (file)
index 8c5f6d9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-! Copyright (C) 2022 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: arrays colors colors.hcl kernel locals math.functions
-ranges sequences tools.test ;
-
-{ t } [
-    0.0 1.0 0.1 <range> [| r |
-        0.0 1.0 0.1 <range> [| g |
-            0.0 1.0 0.1 <range> [| b |
-                r g b 1.0 <rgba> dup >hcla >rgba
-                [ >rgba-components 4array ] bi@
-                [ 0.00001 ~ ] 2all?
-            ] all?
-        ] all?
-    ] all?
-] unit-test
diff --git a/basis/colors/hcl/hcl.factor b/basis/colors/hcl/hcl.factor
deleted file mode 100644 (file)
index 64dd655..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-! Copyright (C) 2022 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: accessors colors colors.luv combinators kernel locals math
-math.constants math.functions math.libm math.order ;
-
-IN: colors.hcl
-
-TUPLE: hcla
-{ hue read-only }
-{ chroma read-only }
-{ luminance read-only }
-{ alpha read-only } ;
-
-C: <hcla> hcla
-
-INSTANCE: hcla color
-
-<PRIVATE
-
-: deg2rad ( degree -- radian ) pi 180.0 / * ; inline
-
-: rad2deg ( radian -- degree ) 180.0 pi / * ; inline
-
-PRIVATE>
-
-M: hcla >luva
-    [let
-        {
-            [ hue>> ] [ chroma>> ] [ luminance>> ] [ alpha>> ]
-        } cleave :> ( h c l a )
-
-        l
-        h deg2rad :> angle
-        c angle cos *
-        c angle sin *
-        a
-        <luva>
-    ] ;
-
-M: hcla >rgba >luva >rgba ;
-
-GENERIC: >hcla ( color -- hcla )
-
-M: object >hcla >luva >hcla ;
-
-M: hcla >hcla ; inline
-
-M: luva >hcla
-    [let
-        {
-            [ l>> ] [ u>> ] [ v>> ] [ alpha>> ]
-        } cleave :> ( l u v a )
-
-        u sq v sq + sqrt :> c
-        v u fatan2 rad2deg
-        [ dup 360 > ] [ 360 - ] while
-        [ dup 0 < ] [ 360 + ] while :> h
-
-        h c l a <hcla>
-    ] ;
diff --git a/basis/colors/hcl/summary.txt b/basis/colors/hcl/summary.txt
deleted file mode 100644 (file)
index 4911790..0000000
+++ /dev/null
@@ -1 +0,0 @@
-HCL colors