diff --git a/xep-0392.xml b/xep-0392.xml index 0d524c72..97d0cfd0 100644 --- a/xep-0392.xml +++ b/xep-0392.xml @@ -23,6 +23,16 @@ colors &jonaswielicki; + + 0.6.0 + 2018-10-02 + jsc + +

Fix CVD rules: they were incorrect in the last update.

+

Update test vectors after CVD fix.

+

Add note about floating-point modulo operator implementation interoperability.

+
+
0.5 2018-10-01 @@ -151,13 +161,14 @@

Input: Hue angle.

Output: Hue angle.

Note: This algorithm will re-map the angle to map it away from ranges which can not be distinguished by people with the respective &cvds;.

+

Note: Some floating-point modulo implementations will return negative outputs for negative inputs. This algorithm assumes that your implementation returns non-negative outputs for all inputs.

-

Take the angle modulo 180 and subtract 90.

+

Add 90 to the angle, take it modulo 180 and subtract 90. Take the result modulo 360 to ensure that it's in the range from 0 to 360.

Note: the same effect can be achieved by forcing the two most-significant bits of the angle to be equal to the second-most-significant bit before converting to a float in Angle generation. This avoids having to perform a floating-point modulo operation.

-

Subtract 90 from the angle, take the result modulo 180.

-

Note: the same effect can be achieved by setting the second-most-significant bit of the angle to the inverse of the most-significant bit and then setting the most-significant bit to zero before conversion to floating point in Angle generation. This avoids having to perform a floating-point modulo operation.

+

Take the angle modulo 180.

+

Note: the same effect can be achieved by setting the most-significant bit to zero before conversion to floating point in Angle generation. This avoids having to perform a floating-point modulo operation.

@@ -298,54 +309,54 @@ bc = 0.2*bb_inv + 0.8*bi;]]>

This section holds test vectors for the different configurations. The test vectors are provided as Comma Separated Values. Strings are enclosed by single quotes ('). The first line contains a header. Each row contains, in that order, the original text, the text encoded as UTF-8 as hexadecimal octets, the angle in degrees, the calculated hue in degrees (differs from angle only for CVD-corrected rows), and the Red, Green, and Blue values.

+'Romeo','526f6d656f',327.255249,327.255249,0.865,0.000,0.686 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',209.410400,209.410400,0.000,0.515,0.573 +'😺','f09f98ba',331.199341,331.199341,0.872,0.000,0.659 +'council','636f756e63696c',359.994507,359.994507,0.918,0.000,0.394 +'Board','426f617264',171.430664,171.430664,0.000,0.527,0.457]]> +'Romeo','526f6d656f',327.255249,327.255249,0.865,0.000,0.686 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',209.410400,29.410400,0.742,0.359,0.000 +'😺','f09f98ba',331.199341,331.199341,0.872,0.000,0.659 +'council','636f756e63696c',359.994507,359.994507,0.918,0.000,0.394 +'Board','426f617264',171.430664,351.430664,0.904,0.000,0.494]]> +'Romeo','526f6d656f',327.255249,147.255249,0.000,0.535,0.350 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',209.410400,29.410400,0.742,0.359,0.000 +'😺','f09f98ba',331.199341,151.199341,0.000,0.533,0.373 +'council','636f756e63696c',359.994507,179.994507,0.000,0.524,0.485 +'Board','426f617264',171.430664,171.430664,0.000,0.527,0.457]]>

The used palette can be generated by sampling the RGB cube evenly with six samples on each axis (resulting in 210 colors (grayscales are excluded)). The resulting palette is commonly known as the palette of so-called "Web Safe" colors.

+'Romeo','526f6d656f',327.255249,327,1.000,0.000,0.800 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',209.410400,226,0.000,0.800,1.000 +'😺','f09f98ba',331.199341,331,1.000,0.400,0.800 +'council','636f756e63696c',359.994507,359,0.800,0.200,0.400 +'Board','426f617264',171.430664,161,0.000,1.000,0.800]]> +'Romeo','526f6d656f',327.255249,327,1.000,0.000,0.800 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',29.410400,30,1.000,0.600,0.400 +'😺','f09f98ba',331.199341,331,1.000,0.400,0.800 +'council','636f756e63696c',359.994507,359,0.800,0.200,0.400 +'Board','426f617264',351.430664,353,0.400,0.000,0.200]]> +'Romeo','526f6d656f',147.255249,147,0.400,0.800,0.600 +'juliet@capulet.lit','6a756c69657440636170756c65742e6c6974',29.410400,30,1.000,0.600,0.400 +'😺','f09f98ba',151.199341,153,0.200,0.800,0.600 +'council','636f756e63696c',179.994507,192,0.000,0.800,0.800 +'Board','426f617264',171.430664,161,0.000,1.000,0.800]]>