0.4
2017-11-29
@@ -124,7 +132,7 @@
Note: The goal of this algorithm is to convert arbitrary text into a scalar value which can then be used to calculate a color. As it happens, the CbCr plane of the YCbCr space determines the color (while Y merely defines the lightness); thus, an angle in the CbCr plane serves as a good scalar value to select a color.
- Run the input through SHA-1 (&rfc3174;).
- - Treat the output as little endian and extract the last-significant 16 bits. (These are the first two bytes of the output, with the second byte being the most significant one.)
+ - Treat the output as little endian and extract the least-significant 16 bits. (These are the first two bytes of the output, with the second byte being the most significant one.)
- Divide the value by 65536 (use float division) and multiply it by 2π (two Pi).