Skip to content

Commit 39a9c7a

Browse files
authored
Merge pull request #407 from Ogeon/chromatic_adaptation
Rework chromatic adaptation
2 parents 0a69512 + c9c7491 commit 39a9c7a

File tree

7 files changed

+433
-51
lines changed

7 files changed

+433
-51
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"rust-analyzer.imports.granularity.enforce": true,
99
"rust-analyzer.imports.granularity.group": "crate",
1010
"rust-analyzer.imports.group.enable": true,
11-
"rust-analyzer.check.command": "clippy"
11+
"rust-analyzer.check.command": "clippy",
12+
"rust-analyzer.imports.preferNoStd": true
1213
}

palette/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ use palette::{
215215
encoding,
216216
white_point,
217217
rgb::Rgb,
218-
chromatic_adaptation::AdaptFrom,
219218
Srgb
220219
};
221220

@@ -227,9 +226,6 @@ type EqualEnergyStandard = (encoding::Srgb, white_point::E, encoding::Srgb);
227226
type EqualEnergySrgb<T> = Rgb<EqualEnergyStandard, T>;
228227

229228
let ee_rgb = EqualEnergySrgb::new(1.0, 0.5, 0.3);
230-
231-
// We need to use chromatic adaptation when going between white points.
232-
let srgb = Srgb::adapt_from(ee_rgb);
233229
```
234230

235231
It's also possible to implement the traits for a custom type, for when the built-in options are not enough.

0 commit comments

Comments
 (0)