Skip to content

[BUG]: Problems converting "sRGB" to "Munsell Renotation System". #1173

@notevenstickmen

Description

@notevenstickmen

Question

I'm having problems converting some colours from sRGB to Munsell. I'm no expert in this field so can well believe I'm doing something daft but I don't know what.

I have a spreadsheet (2547 rows) of the main Munsell colours with their sRGB equivalents (I think this came via Paul Centore's work; the numbers check back to this anyway). I've written routine to convert sRGB to Munsell & have been using this spreadsheet to check my results.

Code:
import colour
import numpy as np
rgb = np.array([141,116,121])
XYZ = colour.sRGB_to_XYZ(rgb / 255)
xyY = colour.XYZ_to_xyY(XYZ)
munsell = colour.xyY_to_munsell_colour(xyY, chroma_decimals=1)

Issues:

  1. I have about 55 Assertation errors e.g.
    Most of the colours here seem to be relatively low value & chroma but not all
    e.g. 02.5RP-9-02 RGB(241,222,239)
    AssertionError: ""array([ 3.08954081, 9.02276054, 1.84797444, 8. ])"" specification chroma must be normalised to domain [2, 50]!
    The 4th argument looks v strange to me & all cases have this format i.e. n.spaces.

  2. I'm getting quite a lot of hue discrepances in those areas where one hue family changes to another.
    e.g.

10.0R -7-08 RGB( 242,150,128) my result: 0.1YR 7.0/8.0
10.0R -7-10 RGB( 254,144,114) my result: 0.1YR 7.0/9.9
10.0R -7-12 RGB( 255,136,97) my result: 0.6YR 6.8/11.0

I most cases, the sub-hue group in my result is < 1 rather than 10.0.

Can anyone advise me?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions