forked from nannou-org/nannou
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Update palette crate to version 0.4.
The biggest update to account for here was the distinction between `RgbSpace`s. Nannou now uses the `Srgb` standard encoding as a default throughout the crate which should more accurately represents nannou's provided set of named colors (nannou-org#72) and likely close match users expectations of the behaviour. Closes nannou-org#72. Closes nannou-org#345. TODO: - [ ] Decide whether or not to re-add the `Rgb` and `Rgba` types to the `color` module? Or should we encourage use of the `Srgb` and `Srgba` types instead for clarity? - [ ] Clarify whether we should be useing `Srgb` or `Linear<Srgb>` RGB encoding for nannou's default draw API. I've opened up Ogeon/palette#133 to help clarify my understanding on this. - [ ] Add a suite of super simple constructor functions to the color module (e.g. `hsl`, `hsla`, `rgb`, `rgba`, etc) that produce color types that are easily compatible with nannou's `Draw` API. - [ ] Decide if we should keep the Tango based `named` colors provided by nannou (see [here][1]) or only use those provided [by palette][2]. Alternatively we could keep both, but this would mean removing the glob palette import to fix nannou-org#345 and re-exporting `palette`'s named colors into our own named module. - [ ] Decide what the most convenient type is for `named` colors. We should probably change them to the same type as `palette`'s named colors, but also ensure that these can be conveniently used within all areas of the `Draw` API. - [ ] Create a `colors.rs` example that demonstrates all named colors within the crate. Ensure that these colors visibly match their references. cc @SjorsVanGelderen. [1]: /~https://github.com/nannou-org/nannou/blob/master/src/color.rs#L12 [2]: https://docs.rs/palette/0.4.1/palette/named/index.html
- Loading branch information
1 parent
6108965
commit ac6052c
Showing
18 changed files
with
181 additions
and
163 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
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.