Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
175: Add feature "random" for random color generation using `rand` crate r=Ogeon a=okaneco Implement `Distribution<T> for Standard` from rand for all color types, LabHue, and RgbHue Implement `SampleUniform ` for all color types, LabHue, and RgbHue Color sampling is supported for `gen`, `gen_range`, and `Uniform`. See #174 for design discussion Color models are sampled based on their geometric space with special consideration for HSV (cone) and HSL (bicone). Geometry of each color model: `Hsv` and `Hwb` - Cone. `Hwb` is expressed in terms of `Hsv`. `Hsl` - Bicone. Sampled as a random selection between two cones. `Lab`, `Rgb`, `Xyz` and `Yxy` - Cubes and blocks. Each component can be sampled independently. `Luma` - A line. A single value. `Alpha` - Samples the contained color and the alpha channel independently. Closes #174 Co-authored-by: okaneco <47607823+okaneco@users.noreply.github.com>
- Loading branch information
Showing
15 changed files
with
1,228 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.