Restore the original PhotoCraft Black & White presets

This commit is contained in:
Dan committed 2026-12-01 17:02:08 +00:00
1 parent 4ab8225b5d
commit 788c0f2d1d
3 files changed
+28 -27

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ next to them.
| `assets/app-icon/photocraft-nightly.png`, `photocraft-nightly-1024.png`, `photocraft-nightly.ico`, `photocraft-nightly.icns` | PhotoCraft nightly deep-background derivatives | @skylartaylor | Original project-owned256 and padded1024 masters at the revision and hashes in [`nightly-provenance.json`](assets/app-icon/nightly-provenance.json); code-generated background-contribution change only, preserving foreground/alpha; no badge or crescent | MIT OR Apache-2.0, [`assets/app-icon/LICENSE.txt`](assets/app-icon/LICENSE.txt) |
| `packaging/nightly-archive-tests.py` (runtime-generated temporary files) | Synthetic flat-archive inventory and exclusive-output fixtures; regular-file payloads, not real image/executable validity | @skylartaylor | Original test-generated strings/files and symlinks from the committed script; no external media or user documents | MIT OR Apache-2.0 |
| `packaging/macos/dmg/` (all files) | PhotoCraft DMG window background and layout | @XusBadia, from the PhotoCraft app icon | Original work, see [`packaging/macos/dmg/README.md`](packaging/macos/dmg/README.md) | MIT OR Apache-2.0, like the code |
| `crates/ui-egui/src/dialogs/adjust_editors/black_white_presets.rs` | Built-in Black & White tonal and filter mixes | PhotoCraft contributors (@Bobderto) | Original weights chosen to produce the named tonal and color-filter effects, from [PhotoCraft `2b1afe637`](https://github.com/storytold/photocraft/commit/2b1afe637cabe3eba622c8edd3e92b279aa8dfe4) | MIT OR Apache-2.0 |
| `crates/ui-egui/src/theme.rs` (Solarized Dark palette) | Solarized colour scheme used by the Solarized Dark theme | Ethan Schoonover | <https://ethanschoonover.com/solarized/> | MIT, [`LICENSE-solarized.txt`](crates/ui-egui/src/LICENSE-solarized.txt) |
| `crates/ui-egui/src/theme.rs` (Breeze Light and Breeze Dark themes) | The Breeze Light and Breeze Dark themes are original colour values on PhotoCraft's Studio layout, chosen to look close to KDE Plasma's Breeze (cool blue-greys, blue accent, 5 px frame radius) so the app blends into a Plasma desktop. None of Breeze's colour values, files or code are copied; the values are a few levels away from its schemes and tuned for text contrast | PhotoCraft contributors | Inspired by the look of KDE Breeze, <https://invent.kde.org/plasma/breeze> (its colour schemes are LGPL-2.0-or-later) | Original work |
| `crates/ui-egui/src/theme.rs` (Soft Dark and Soft Light themes) | Original colour values and radii for two low-contrast themes on PhotoCraft's Studio layout; no third-party palette, file or code is used | PhotoCraft contributors | Original | Original work |
@@ -1,4 +1,4 @@
//! Preset grayscale mixes for the Black & White adjustment.
//! Original Black & White recipes for tonal shifts and the effect of color filters.
use std::sync::Arc;
@@ -19,18 +19,18 @@ fn entries() -> [Entry<Option<Mix>>; 16] {
[
Entry::new(Some(BlackWhite::DEFAULT_WEIGHTS), tl!("Default")),
Entry::separator(),
Entry::new(Some([0.0, 0.0, 0.0, 110.0, 110.0, 110.0]), tl!("Blue Filter")),
Entry::new(Some([30.0, 50.0, 30.0, 50.0, 10.0, 70.0]), tl!("Darker")),
Entry::new(Some([50.0, 120.0, 90.0, 50.0, 0.0, 0.0]), tl!("Green Filter")),
Entry::new(Some([-50.0, -50.0, -50.0, 150.0, 150.0, 150.0]), tl!("High Contrast Blue Filter")),
Entry::new(Some([120.0, 120.0, -10.0, -50.0, -50.0, 120.0]), tl!("High Contrast Red Filter")),
Entry::new(Some([-40.0, 235.0, 144.0, -68.0, -3.0, -107.0]), tl!("Infrared")),
Entry::new(Some([50.0, 70.0, 50.0, 70.0, 30.0, 90.0]), tl!("Lighter")),
Entry::new(Some([0.0; 6]), tl!("Maximum Black")),
Entry::new(Some([100.0; 6]), tl!("Maximum White")),
Entry::new(Some([128.0, 128.0, 100.0, 100.0, 128.0, 100.0]), tl!("Neutral Density")),
Entry::new(Some([120.0, 110.0, -10.0, -50.0, 0.0, 120.0]), tl!("Red Filter")),
Entry::new(Some([120.0, 110.0, 40.0, -30.0, 0.0, 70.0]), tl!("Yellow Filter")),
Entry::new(Some([22.0, 38.0, 25.0, 36.0, 10.0, 50.0]), tl!("Darker")),
Entry::new(Some([60.0, 77.0, 64.0, 78.0, 47.0, 92.0]), tl!("Lighter")),
Entry::new(Some([8.0; 6]), tl!("Deep Shadows")),
Entry::new(Some([92.0; 6]), tl!("Bright Highlights")),
Entry::new(Some([48.0; 6]), tl!("Even Color Weights")),
Entry::new(Some([86.0, 65.0, 33.0, 23.0, 15.0, 72.0]), tl!("Red Filter")),
Entry::new(Some([64.0, 91.0, 64.0, 41.0, 13.0, 53.0]), tl!("Yellow Filter")),
Entry::new(Some([28.0, 67.0, 91.0, 74.0, 17.0, 45.0]), tl!("Green Filter")),
Entry::new(Some([24.0, 35.0, 45.0, 77.0, 92.0, 53.0]), tl!("Blue Filter")),
Entry::new(Some([100.0, 73.0, 24.0, 7.0, 5.0, 64.0]), tl!("Strong Red Filter")),
Entry::new(Some([4.0, 12.0, 27.0, 71.0, 100.0, 44.0]), tl!("Strong Blue Filter")),
Entry::new(Some([58.0, 89.0, 97.0, 38.0, 8.0, 33.0]), tl!("Infrared Foliage")),
Entry::separator(),
Entry::new(None, tl!("Custom")),
]
@@ -499,7 +499,7 @@ fn assert_black_white_preset(h: &Harness<'_, Box<PhotocraftApp>>, name: &str) {
}
#[test]
fn black_white_presets_apply_the_requested_weights_and_keep_tint() {
fn black_white_presets_apply_the_authored_weights_and_keep_tint() {
let mut h = app_harness("blackWhite", "rgb", 8);
// Leave enough vertical space for the complete dropdown to be visible at once.
h.set_size(vec2(1440.0, 1350.0));
@@ -510,18 +510,18 @@ fn black_white_presets_apply_the_requested_weights_and_keep_tint() {
let Adjustment::BlackWhite { tint: original_tint, .. } = &original else { panic!("{original:?}") };
for (name, expected) in [
("Blue Filter", [0.0, 0.0, 0.0, 110.0, 110.0, 110.0]),
("Darker", [30.0, 50.0, 30.0, 50.0, 10.0, 70.0]),
("Green Filter", [50.0, 120.0, 90.0, 50.0, 0.0, 0.0]),
("High Contrast Blue Filter", [-50.0, -50.0, -50.0, 150.0, 150.0, 150.0]),
("High Contrast Red Filter", [120.0, 120.0, -10.0, -50.0, -50.0, 120.0]),
("Infrared", [-40.0, 235.0, 144.0, -68.0, -3.0, -107.0]),
("Lighter", [50.0, 70.0, 50.0, 70.0, 30.0, 90.0]),
("Maximum Black", [0.0; 6]),
("Maximum White", [100.0; 6]),
("Neutral Density", [128.0, 128.0, 100.0, 100.0, 128.0, 100.0]),
("Red Filter", [120.0, 110.0, -10.0, -50.0, 0.0, 120.0]),
("Yellow Filter", [120.0, 110.0, 40.0, -30.0, 0.0, 70.0]),
("Darker", [22.0, 38.0, 25.0, 36.0, 10.0, 50.0]),
("Lighter", [60.0, 77.0, 64.0, 78.0, 47.0, 92.0]),
("Deep Shadows", [8.0; 6]),
("Bright Highlights", [92.0; 6]),
("Even Color Weights", [48.0; 6]),
("Red Filter", [86.0, 65.0, 33.0, 23.0, 15.0, 72.0]),
("Yellow Filter", [64.0, 91.0, 64.0, 41.0, 13.0, 53.0]),
("Green Filter", [28.0, 67.0, 91.0, 74.0, 17.0, 45.0]),
("Blue Filter", [24.0, 35.0, 45.0, 77.0, 92.0, 53.0]),
("Strong Red Filter", [100.0, 73.0, 24.0, 7.0, 5.0, 64.0]),
("Strong Blue Filter", [4.0, 12.0, 27.0, 71.0, 100.0, 44.0]),
("Infrared Foliage", [58.0, 89.0, 97.0, 38.0, 8.0, 33.0]),
("Default", [40.0, 60.0, 40.0, 60.0, 20.0, 80.0]),
] {
let history = history_len(&h);
@@ -532,7 +532,7 @@ fn black_white_presets_apply_the_requested_weights_and_keep_tint() {
let (_, applied) = layer(&h);
let Adjustment::BlackWhite { weights, tint } = applied else { panic!("{applied:?}") };
assert_eq!(weights, expected, "{name} applies the requested mix");
assert_eq!(weights, expected, "{name} applies the authored mix");
assert_black_white_preset(&h, name);
assert_eq!(&tint, original_tint, "{name} preserves Tint");
assert_eq!(history_len(&h), history + 1, "{name} is one history step");