Next time you may want to have a look at the Gg.Color
module which has a few standard color spaces conversions.
dbuenzli to the rescue! You seem to have written better versions of anything I have, and published them. I was just looking at my crusty old Color module (written 12 years ago, based on 25yo C code)ā¦ considering how to spruce it up for sharing.
I had tried searching for āocaml colorspaceā to see if there might be anything currently fitting the role, and I didnāt see Gg.Colorā¦ which is slightly alarming. Searching on ocaml.org does a bit better, with āgg.0.9.3ā showing up a few places down, though itās not very clear that that would be what oneās looking for. And now I tried āopam search colorā and while gg also shows up (good!), itās also hard to tell that it would be relevant from the one-line description. I donāt know how to improve this discoverability ā just reporting what Iām seeing. I basically wouldnāt know without you showing up to tell me: āHey, you might like this!ā
Actually my message was rather for @EmileTrotignon who didnāt find writing color conversions fun (I did !). But in any case according to the release notes you couldnāt have found gg
12 years ago.
Very nice module. I do not see an easy way to plug such colors into graphics. It should be quite easy to do anyway, but using Gg to complement Graphics would be my first reflex. I know Graphics is pretty raw, but it very easy to access. Maybe there is an improved version with a nicer api somewere though, and I have a feeling you would know
Not really when I need to do graphics I turn to Vg
which depends on Gg
but we are getting OT.