Feat/wide color gamut#31
Merged
Merged
Conversation
Add rec2020_rgbf_t, rec2020_rgbaf_t, linear_rec2020_rgbf_t, and linear_rec2020_rgbaf_t types following the Adobe RGB / Display P3 pattern. Includes construction and boundary tests. Co-Authored-By: Claude <noreply@anthropic.com>
…egistered) Add gamma encode/decode, XYZ matrices, and sRGB shortcut. Tests added but will fail to compile until graph edges are registered in next task. Co-Authored-By: Claude <noreply@anthropic.com>
Register Rec.2020 edges in index.hpp and add Rec.2020 color_traits to color_space_registry.hpp. Add Rec.2020 types to builtin_color_nodes in graph.hpp. Increase MaxNodes from 32 to 64. Bugfix: Fix XYZ channel range handling in rec2020, adobe_rgb, and prophoto_rgb conversion functions. XYZ channels have [0,2] range, so using to_unit()/from_unit() (which assume [0,1]) produces incorrect values when routing through the standard sRGB->XYZ->wide-gamut path. Changed to use direct reads and from_value() instead. Co-Authored-By: Claude <noreply@anthropic.com>
Add standalone chromatic_adaptation module with Bradford and Von Kries transforms, plus standard white point constants (D65, D50, D55, A, C). Tests verify round-trip fidelity and known reference values. Co-Authored-By: Claude <noreply@anthropic.com>
Replace combined D50/D65 matrices with stepwise conversion: pure ProPhoto primaries matrix + explicit bradford_adapt() call. Improves transparency and reusability of the chromatic adaptation logic. Also fix circular include in chromatic_adaptation.hpp by replacing the #include of conversion.hpp with a forward declaration of color_cast, enabling inclusion from within the conversion subsystem. Co-Authored-By: Claude <noreply@anthropic.com>
Add prophoto_rgb to gamut_type enum with gamma helpers, gamut check, and gamut clipping support. Tests verify in-gamut detection and clipping. Co-Authored-By: Claude <noreply@anthropic.com>
Refactor rec2020_to_rgbaf to use the new rec2020_rgbaf_t core type. Add parse_css_color overload for direct Rec.2020 parsing. Co-Authored-By: Claude <noreply@anthropic.com>
The 7 blocked tests (BlackConversion, WhiteConversion, AlphaPreserved, FloatRoundTrip, AlphaRoundTrip, LinearConversion, LinearRoundTrip) were prematurely disabled. Conversion code exists and is registered. Also fixes the display_p3af_t <-> rgbaf_t shortcut cost from shortcut_4_hop (5) to shortcut_2_hop (3) so the graph routing prefers the direct alpha-preserving path over the canonical 4-hop XYZ path that silently drops alpha. Co-Authored-By: Claude <noreply@anthropic.com>
Demonstrates construction, sRGB round-trip, chromatic adaptation, gamut checking, CSS parsing, and gamma encoding. Co-Authored-By: Claude <noreply@anthropic.com>
Demonstrates construction, gamut hierarchy comparison, round-trip, transfer function, and CSS parsing for the BT.2020 color space. Co-Authored-By: Claude <noreply@anthropic.com>
Demonstrates construction, sRGB round-trip, gamma encoding, cross-space chain, CSS parsing, and ANSI swatch output. Co-Authored-By: Claude <noreply@anthropic.com>
- Added missing newlines at the end of several files to adhere to coding standards. - Reordered includes in core.hpp, color_space_registry.hpp, and other files for consistency. - Improved formatting and readability in various functions, particularly in conversion functions for Adobe RGB, ProPhoto RGB, and Rec.2020. - Simplified lambda expressions in conversion functions for better clarity. - Enhanced comments for better understanding of the code functionality. - Updated tests to ensure consistency and clarity in test cases.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.