]> gitweb.factorcode.org Git - factor.git/commitdiff
colors.xyz: some refactoring.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Jun 2014 14:04:09 +0000 (07:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Jun 2014 14:04:09 +0000 (07:04 -0700)
extra/colors/luv/luv.factor
extra/colors/xyy/summary.txt
extra/colors/xyy/xyy-docs.factor
extra/colors/xyz/summary.txt
extra/colors/xyz/xyz-docs.factor
extra/colors/xyz/xyz.factor

index 465bea8945149cf3ae6d83fe4a714585b57640b4..c756e8230be03994919971c5d4e27d4f5cd1284a 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2014 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: accessors colors colors.xyz kernel locals math
-math.functions ;
+USING: accessors colors colors.xyz colors.xyz.private kernel
+locals math math.functions ;
 
 IN: colors.luv
 
@@ -12,18 +12,11 @@ C: <luva> luva
 
 <PRIVATE
 
-CONSTANT: xyz_epsilon 216/24389
-CONSTANT: xyz_kappa 24389/27
-
 :: xyz-to-uv ( x y z -- u v )
     x y 15 * z 3 * + + :> d
     4 x * d /
     9 y * d / ; foldable
 
-CONSTANT: wp_x 0.95047
-CONSTANT: wp_y 1.00000
-CONSTANT: wp_z 1.08883
-
 PRIVATE>
 
 M: luva >rgba >xyza >rgba ;
index 2f28ff18679126de63773e4bfc57bf1e5cf47d69..8c52adb77d0fcbe9a8d59741f6f0e9130c322115 100644 (file)
@@ -1 +1 @@
-CIE xyY colors
+CIE 1931 xyY colors
index f99eb97d54a8f65addd165cce33123bd84d2aa37..dca7582e4d5cb7f556ac5d098467251a7bda4d1f 100644 (file)
@@ -2,10 +2,10 @@ USING: help.markup help.syntax ;
 IN: colors.xyy
 
 HELP: xyYa
-{ $class-description "The class of CIE xyY colors with an alpha channel." } ;
+{ $class-description "The class of CIE 1931 xyY colors with an alpha channel." } ;
 
-ARTICLE: "colors.xyy" "CIE xyY colors"
-"The " { $vocab-link "colors.xyy" } " vocabulary implements CIE xyY colors, together with an alpha channel."
+ARTICLE: "colors.xyy" "CIE 1931 xyY colors"
+"The " { $vocab-link "colors.xyy" } " vocabulary implements CIE 1931 xyY colors, together with an alpha channel."
 { $subsections
     xyYa
     <xyYa>
index 358c776a38019f54d2dc15120c43a221d8d45bd9..a0dce8c17a6beb512456ace857d2357c3bcb42cf 100644 (file)
@@ -1 +1 @@
-CIE XYZ colors
+CIE 1931 XYZ colors
index 15659be8443c24f71c4ff5e4e78ebafa3a7d02ee..e234ad668804212f15cb87ff6033b6289e0e2193 100644 (file)
@@ -2,10 +2,10 @@ USING: help.markup help.syntax ;
 IN: colors.xyz
 
 HELP: xyza
-{ $class-description "The class of CIE XYZ colors with an alpha channel." } ;
+{ $class-description "The class of CIE 1931 XYZ colors with an alpha channel." } ;
 
-ARTICLE: "colors.xyz" "CIE XYZ colors"
-"The " { $vocab-link "colors.xyz" } " vocabulary implements CIE XYZ colors, together with an alpha channel."
+ARTICLE: "colors.xyz" "CIE 1931 XYZ colors"
+"The " { $vocab-link "colors.xyz" } " vocabulary implements CIE 1931 XYZ colors, together with an alpha channel."
 { $subsections
     xyza
     <xyza>
index 3b1e368e4746cdd04fc610101ccf2bcaa3559061..7a60549b6a5d0fa8e1be560436f8c05cd723ad6e 100644 (file)
@@ -12,6 +12,13 @@ C: <xyza> xyza
 
 <PRIVATE
 
+CONSTANT: xyz_epsilon 216/24389
+CONSTANT: xyz_kappa 24389/27
+
+CONSTANT: wp_x 0.95047
+CONSTANT: wp_y 1.00000
+CONSTANT: wp_z 1.08883
+
 : srgb-compand ( v -- v' )
     dup 0.0031308 <= [ 12.92 * ] [ 2.4 recip ^ 1.055 * 0.055 - ] if ;