Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Implement support to generate the "Rösch-MacAdam" colour solid hue lines. #777

Merged
merged 3 commits into from
Feb 7, 2021

Conversation

KelSolaar
Copy link
Member

@KelSolaar KelSolaar commented Feb 7, 2021

This PR implements support for the argument I described in @scooperly's Sketches of Hue thread on ACEScentral.

I remembered about it only because I started to look at @gutenzwerg's work in #768. Note that #768 is different in the sense that the Optimal Colour Stimuli are computed for a given luminance level.

Sean produced a not-insignificant amount of work and our implementation of the CIE XYZ outer surface could/should have covered that with a few minor changes, namely the pulse waves ordering.

import colour

figure, axes = colour.plotting.plot_chromaticity_diagram_CIE1931(
    standalone=False)

bins = len(colour.volume.spectrum.SPECTRAL_SHAPE_OUTER_SURFACE_XYZ.range())

xy = colour.XYZ_to_xy(
    solid_RochMacAdam(
        point_order='Pulse Wave Width', filter_jagged_points=True)[1:-1])

for i, j in enumerate(range(0, xy.shape[0], (bins - 1) // 2)):
    hue_lines = np.vstack([xy[j:j + (bins - 1) // 2, :], xy[-1]])
    axes.plot(hue_lines[:, 0], hue_lines[:, 1], c='k')

colour.plotting.render()

image

I will merge as soon as tests pass and put the above code in the How-To Guide and on ACEScentral.

@KelSolaar KelSolaar added this to the v0.4.0 milestone Feb 7, 2021
@coveralls
Copy link

coveralls commented Feb 7, 2021

Coverage Status

Coverage increased (+9.0e-05%) to 99.724% when pulling d1cca65 on feature/rosch-macadam into 362ccee on develop.

@KelSolaar KelSolaar merged commit eb837b4 into develop Feb 7, 2021
@KelSolaar KelSolaar deleted the feature/rosch-macadam branch May 30, 2021 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants