Summary
We take it for granted every day, but creating and displaying vivid colors in our digital media is a complicated and often difficult process. There are different ways to represent color, the ways in which they are displayed can cause them to look different, and translating between systems can cause losses of information. To simplify the process of working with color information in code Thomas Mansencal wrote the Colour project. In this episode we discuss his motiviation for creating and sharing his library, how it works to translate and manage color representations, and how it can be used in your projects.
Preface
- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- When you’re ready to launch your next app you’ll need somewhere to deploy it, so check out Linode. With private networking, shared block storage, node balancers, and a 200Gbit network, all controlled by a brand new API you’ve got everything you need to scale up. Go to podcastinit.com/linode to get a $20 credit and launch a new server in under a minute.
- Finding a bug in production is never a fun experience, especially when your users find it first. Airbrake error monitoring ensures that you will always be the first to know so you can deploy a fix before anyone is impacted. With open source agents for Python 2 and 3 it’s easy to get started, and the automatic aggregations, contextual information, and deployment tracking ensure that you don’t waste time pinpointing what went wrong. Go to podcastinit.com/airbrake today to sign up and get your first 30 days free, and 50% off 3 months of the Startup plan.
- To get worry-free releases download GoCD, the open source continous delivery server built by Thoughworks. You can use their pipeline modeling and value stream map to build, control and monitor every step from commit to deployment in one place. And with their new Kubernetes integration it’s even easier to deploy and scale your build agents. Go to podcastinit.com/gocd to learn more about their professional support services and enterprise add-ons.
- Visit the site to subscribe to the show, sign up for the newsletter, and read the show notes. And if you have any questions, comments, or suggestions I would love to hear them. You can reach me on Twitter at @Podcast__init__ or email hosts@podcastinit.com)
- Your host as usual is Tobias Macey and today I’m interviewing Thomas Mansencal about Colour, a python library for working with algorithms and transformations to explore color theory
Interview
- Introductions
- How did you get introduced to Python?
- What is color theory?
- How does Colour assist in the process of working with some of the practical applications of colour science?
- What was your motivation for creating Colour?
- What are some example use cases for colour?
- One of the aspects of color in digital environments that is often confusing is the number of different ways that it can be represented. What are the relative benefits of things like RGB, HSV, CMYK, etc.?
- How is the Colour library architected and how has that evolved over time?
- Are there new developments in the area of color theory that need to be periodically incorporated into the library?
- What have you found to be some of the most often misunderstood aspects of color?
- What have been some of the most difficult or frustrating aspects of building, maintaining, and promoting Colour?
- What are some of the most interesting or unexpected uses of Colour that you have seen?
- What are your plans for the future of Colour?
Keep In Touch
Picks
- Tobias
- Beasts of Olympus by Lucy Coates
- Thomas
Links
- Colour
- Color Theory
- Color Science
- Weta Digital
- Wingnut AR
- Visual Effects Artist
- Allegro
- AutoDesk Maya
- PyQT
- Isaac Newton
- Color Wheel
- Colorimetry
- CIE
- VY Canis Majoris (Red Hypergiant)
- Rigel (Blue-White Supergiant)
- Kelvin Temperature Scale
- Black Body Radiation
- HDRI (High Dynamic Range Imaging)
- Adobe DNG SDK
- ICC
- OpenColorIO
- MERCK Group
- Color Space
- RGB
- HSV
- CMYK
- CIE XYZ
- CIE RGB
- CIE Lab
- CIE Luv
- sRGB
- Gamma Correction
- Additive Color Space
- Subtractive Color Space
- Color Blindness
- Gustavo Machado
- Rods and Cones
- Dichromacy
- Color Appearance Model
- Uniform Color Spaces
- JOSS
- ArXiv
- CIECAM02 Color Appearance Model
- Cinematic Color
- Jeremy Selan (Author of OpenColorIO)
- Academy Color Encoding System
- Color Appearance Models by Mark D. Fairchild
- The Reproduction of Colour by Dr. R.W.G. Hunt
- Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition by Günther Wyszecki and W. S. Stiles
- Katherine Crowson
- Google Colab
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
Hello, and welcome to podcast dot in it, the podcast about Python and the people who make it great. When you're ready to launch your next app, you'll need somewhere to deploy it, so check out Linode. With private networking, shared block storage, node balancers, and a 200 gigabit network, all controlled brand new API, you've got everything you need to scale. Go to podcast init.com/linode to get a $20 credit and launch a new server in under a minute. Finding a bug in production is never a fun experience, especially when your users find it first. Air Brake error monitoring ensures that you'll always be the first to know so you can deploy a fix before anyone is impacted.
With open source agents for Python 23, it's easy to get started, and the automatic aggregations, contextual information, and deployment tracking ensure that you don't waste time pinpointing what went wrong. Go to podcastinnit.com/airbreak today to sign up and get your 1st 30 days free and 50% off 3 months of the start up plan. To get worry free releases, download Go CD, the open source continuous delivery server built by Thoughtworks. You can use their pipeline modeling and value stream app to build, control, and monitor every step from commit to deployment in 1 place. And with our new Kubernetes integration, it's even easier to deploy and scale your build agents.
Go to podcastthenit.com /gocd to learn more about their professional support services and enterprise add ons. And visit the site at podcast in it.com to subscribe to the show. Sign up for the newsletter and read the show notes. Your host as usual is Tobias Macy. And today, I'm interviewing Thomas Masingkal about color, a a Python library for working with algorithms and transformations to explore color theory. So Thomas, could you start by introducing yourself? Hello. So, yeah,
[00:01:51] Unknown:
my name is Thomas Massonka coming, from, France and, currently, living, in New Zealand and working for Waita Digital and, WingNet AR. So, yeah, basically, I'm I'm a visual effects artist And, I started, like, in the industry as a, like, as a self taught, person. I got my first computer around 8, I think, from my grandfather. And since then, like, I I've been hooked, you know, and got into programming. I'm not sure when, but, yeah. Basically, I was doing, demo, you know, as a demo maker, programming in c using, Allegro, I think was the name of the library back then with a friend. And, yeah, programming was a bit hard for me. So I went into content creation more while my friend, Bernard Jacque, was doing coding part of our demos. And, yeah, since then, like, I've been learning and, yeah, and, experimenting in the visual effects and
[00:02:59] Unknown:
what got me at Weta. And, yeah. And do you remember how you first got introduced to Python? So, yeah, Python,
[00:03:06] Unknown:
it was like, I guess, like, programming turned to be more like a way for me to produce tools that I need in my artistic workflow. Yeah. I got introduced to Python through, Maya, Autodesk Maya, which is a software we use, you know, to do, it's kind of the backbone of the the effects industry even though it's kind of shifting now. It has been, like, a very strong backbone to produce, visual effects. And Maya, until, like, 2006 or 2007, it's still it's still the case, but you add to script, like, using, which is, is kind of embedded language. It's very close to c but without pointers and memory management. But then, yeah, around 2006 or 7, like, they introduced, the Python plug in to the software, And, yeah, it was like a big relief, you know, like, object oriented programming, dictionaries, being able to tap into, like, Python extensive or a standard library. Yeah. It was a game changer. So, yeah, that's where first got, like, in touch with Python. And a few years later few years later, I wrote, like, a BYQT lighting assistant, compatible with various DCCs, so content creation application that was allowing user to quickly, create lighting scenarios in this application.
And, so, yeah, after that, I went hooked into neuroscience more for other reasons, but, yeah, that's where I started with Python, basically.
[00:04:47] Unknown:
And we've used the terms color theory and color science somewhat interchangeably so far, but I'm wondering if you can start at a high level of just explaining what is meant by the term color theory.
[00:05:00] Unknown:
So, yeah, like, yeah, I wanted to do a bit of, disambiguation on that because they might be, yeah, indeed using changeably, but, they are not really the same thing. Even though they share similarities, I mean, there are bridges between them. So, yeah, color theory, lays the foundation, you know, for the usage of color in visual arts. Basically, it will define the rules, of color scheme creation. You know? And the focus is really eye aesthetics and communication of a of of a message. So it's based on the work of, Isaac Newton. I think it's optics. You know? It's, it's book, like, publication he did, like, back then. And, so was describing, color wheels, you know, with primary colors, red, blue, yellow, secondary colors, that you create by mixing as a true primary color and intermediate tertiary ones, you know, by mixing primaries and secondary colors. So, yes, there is a strong psychological component to it. And from there, it's only loosely related to color science and colorimetry.
So color science and colorimetry, I will define colorimetry, because it's important and it's there like, for many of those terms I will use, you can find pretty much, like, an official definition by the CIE, which is a Comite International, de lacquersge. And, so they define colorimetry as a measurement of color stimuli based on a set of convention. So, yes, there there is, like, a measurement aspect to it, you know, involving apparatus and and gear, basically, like, in the former, you know, in coral theory, It's like, in the former, you know, in color theory, warm colors usually are associated with orange, reddish, you know, like a a sunset, while cool cool colors are actually bluish. You know, it would be kind of an overcast day or ice.
And, it contrast very deeply with the physical temperature of, like, a self luminous object. So if you were to take, like, a red giant star, you know, like, v y v y Canis Margeris, is, temperature in Kelvin degrees, is 3, 500 degree kelvins. And and we say that's a low temperature star even though it's red and orangey, you know. And, you would have, like, the opposite Rigel, which is a blue white star, and it's, like, 12, 000 degree Kelvin. So there is, like, almost a reverse in the scale of things, you know? I I don't know if it's clear or makes sense. But yeah. Basically, like, in coral science, low temperature bodies will be, yeah, yellowish orange, you know, reddish.
And I color temperature stuff. So warm stuff, is actually blue, which is opposite in color theory. Warm colors are actually
[00:08:21] Unknown:
red. Does that make sense? And and for a sort of closer to home example, if you're looking at flames, for instance, if you're looking at the flame output from a propane stove or something, it generally burns very blue and hot. But if you're looking at a wood fire, it generally burns, you know, reds and oranges that's actually a lower temperature than what you would get from a gas flame, but it is, visually more aesthetically appealing because of that dichotomy between the aspects of color theory that as you were saying deals more with the psychological effects of the color versus the color science that deals with the actual physical manifestation of how color relates to the actual temperature of the objects.
[00:09:04] Unknown:
Exactly. Yeah. Yeah. That's exactly it. So, yeah, if you were to plot, like, black bodies colors, you know, you will see, like and you can match stars' temperature with that. You yeah. You will see, like, yeah, big red giant, has a very low physical temperature in Kelvin degrees while, like, yeah, something like regel is super luminous and very, very hot, so it's bluish and
[00:09:31] Unknown:
And what is it about color science that has drawn your attention so much working in the visual effects field where I'm sure a number of your colleagues don't necessarily pay as close attention to that aspect of the way that color factors into the work that you're doing? So I guess, like,
[00:09:49] Unknown:
it started, I mean, there are a few aspects. There is like, there are concern when we were rendering and there were issues back then when we were rendering, you know, and, in some companies, we were rendering things, incorrectly, you know, and it's more like kind of differences between, linear and gamma space. But I won't really enter into these details now. But, yeah, basically, for years, like, many companies have been rendering things, in a nonlinear space. So the mass of the rendering, part were kind of wrong or and skewed by that. And, took me, like, a while initially, like, to understand why, but it's related to to what we do in ChorusScience in a way. And the second part is, is more like, at some point, I wanted to to open, an online shop to sell, high dynamic range, imagery, you know, high quality 1 because I was not really satisfied what with what was, available online. You know? Typical issues were you don't have any, colorimetric data. So you don't really know, like, what the image were encoded with. You don't have, like, color rendition chart or color checker, which is important to assess, like, yeah, what's, what's the colors are representing. So there was that like, and there was also clipping. You know? Typically, when you try to shoot HDR, you take many exposures that you you merge to a single image representing, like, the luminance of, like, the environment. Problem is, shooting the sun is tremendously hard. You need, like, neutral density filters, and, and everything was clamped. So it wasn't, like, a good representation of reality.
And as a result, when you use an image like that, because the sun is clipped, the sky will, take too much importance in your image, and the sun, yeah, is not strong. So you are losing a lot of contrast that you would have in nature and in the reality. So I wanted to fix that basically, and I started to look at what was available online, what tools and everything, and nothing was satisfying me. And, given that, the next step was to look at some stuff that was working well and, Adobe, and specifically, Tom and all from Adobe wrote like as, DNG SDK. And Lightroom and Adobe are doing very good things, but they are kind of photograph oriented. So there were many issues with that. But, like, the core of their projects, the DNG SDK, which is the kind of the engine behind the Lightroom and Adobe Camera Raw and all that stuff was really interesting and well written. So I started to look at the spec. I was we're doing things, and they took a lot of time to to characterize camera properly in different illumination conditions, tungsten versus daylight. So they spent a lot of time designing that stuff, and it works quite well. So what I did was, like, took the spec and with the help of, Michael Parsons from, the Moving Picture Company, I wrote, like, the Python implementation of, like, the color processing of the d n g sdk, and that that was my first really serious step into CoralSense because I needed to understand, like, yeah, what was happening in their color processing, basically. And since then, yeah, it has been kind of a a rabbit hole, I would say, where, yeah, I'm I'm still falling, you know, inside.
[00:13:33] Unknown:
And as you mentioned, you started working on a Python package for being able to work with the physical calculations and working with the color spaces in a digital capacity. So I'm wondering if you can talk a bit about some of the example use cases for the package that you created. So,
[00:13:56] Unknown:
yeah. I I might, yeah, continue a bit like you to because, like so that part here, you know, working with with MPC was obviously private. You know? So they they are maybe still using the code, so I couldn't really take that out even though, like, I was writing that as a contractor. But, yeah, I needed to to have some of their stuff, some extra capabilities. You know? Like, okay. I have 2 images. I've shot, like, a color rendition chart. You know, like X Rite color checker in both, and I would like to match those images. So, yeah, I I needed to do that kind of thing. So from there, like, it it became a a need to have, like, a a Python library to do that. And, I was looking online at what was existing back then. And, it's either, yeah, you are a MATLAB user, so you are willing to pay and, you know, you pay for, like, all that extra toolbox to do that kind of stuff and another 1 and it gets super expensive and you are working in the cloud system. Or maybe you try using Python and, at that time in Python, there wasn't, like, too much libraries available. So I started to to combine and, and I met, like, Michael Moderer few months before deciding to make the API available publicly. And since then, we have been working together with contributors, you know, to grow, like, the API. So I guess, like, use cases, it's you you wouldn't use color, I would say, like, as a directly, as a as a project. I guess it depends what you want to do, but it's not something you you consume, like, immediately as a front end product, but it's more something that will drive or allow you to verify computations.
So I guess I could give, like, a few examples. So, basically, like, at work, we need to define, color management and, you know, between, the different application different application, the different DCC, we use. And, in the VFX industry, we are pretty much not using ICC for for very, yeah, very good reason because, originally, it wasn't supporting IDIMM9 Mic Range Imagery, so that was a show stopper. And it's kind of cumbersome a bit. Even though it has great features, it's, it's hard to get right, and it was designed for the printing industry, literally, not really for what we are doing. So we use something called, OpenColorIO and OCIO, OpenColorIO.
OCIO is is just consuming transformations, you know, from that Coral Space to that 1, but you need to write them. And that's where, like, a tool like color can help you, defining this transformation and computing them so that you can feed them to OCIO later. So, yes, that that's 1 of the usage. Kind of a lot of companies now are using, are using, color as a I I think 1 of the most satisfying mail we got, because we received, like, a lot of, thanks. 1 of the first, I mean, it's not the first, but 1 of the most satisfying mail was, 1 from a Google engineer, you know, and he was, thanking us basically, because, yeah, he was using, call out to verify YouTube in colorimetric computation, basically. So, yeah, that was their their way to assess YouTube was doing the right thing. It was using color to verify their their mass basic and the output, of, of YouTube. Another 1 was from Merck Group, which is, I think that's probably the oldest operating chemical and pharmaceutical company in the world. It may be, establishing 1, 600 something. It's rural and they they are using, there's some engineers over there are using, color again to perform computation on their measurements. They are measuring spectra's data, and they convert it to various crawl space using the API. There are a lot of publication, maybe not a lot, but, yeah, a few publication using, the protein, capabilities of the API also. And, that's, there are there are there are usage, but that could be 1 somehow, yeah, outside.
[00:18:35] Unknown:
And 1 of the things that you were mentioning in there is the transformations between different color spaces and for people who aren't aware when you're working with digital imagery, you're generally going to be using either the RGB or HSV color spaces. And then if you need to convert that imagery for being able to be printed out on, for instance, paper or t shirts, etcetera, then you would transform to CMYK. And I'm wondering if you can discuss some of the relative benefits of some of these different color spaces and the challenges associated with converting between them while maintaining the appropriate representation
[00:19:15] Unknown:
of the color in relation to each other. Yeah. Yeah. So let's it's, it's it's very deep topic and, you can dive very quickly, you know, down. But, yeah. So I think we can define a coral space first as a start. So usually, we say that it's a geometric representation of color in space. Usually, it's 3 dimensions or kind of 4, you know, 4 c, m, y, k. And, I I I will start from, basically in color science, there is a central space, which is ciexyz. It was, derived from color matching experiments, by, David Wright and the joint guide, in the thirties, 2030s.
And, from those experimentation, the CI XYZ space, was born and, CI RGB, which is relate. Yeah. So from the yeah. Basically, that's it. So that's, c I x y z is the central space. It's a space where, for instance, if you wanted to go from RGB to lab or luv or any color space. Usually, you will go through x, y, z, and you you it's a web. So given that, yeah, the the models you talk about like, RGB, it's a color model that most people are interacting with. And, usually, when talk about the RGB model, people are using sRGB and, that's the lowest common denominator defined by HP and Microsoft. I think it's 1996 and since then, like, if reboot is almost compliant to it. Yeah. It's, so why RGB and sRGB are ubiquitous? It's because, yeah, it's it's an additive color space and, there is a very direct correlation with display technology.
When you add, like, red, green, and blue light together, you get white. So it's correlated. And CMYK, is a subtractive, subtractive color model. So it's very well adapted to what's happening, in the printing industry because of that, because that's how inks and dyes are working as they are working subtractively in a way. So then you mentioned HSV. I so HSV is a is a is a weird 1 because it's, we don't really use it in color science, and the reason for that is because, it's pseudo lightness scale, so the value or brightness for HSB, it has nothing perceptual.
It's it's not, it's not a perceptual color space. It will not represent, like, the response, of, the visual system, to luminance. So you can't really use that space, as a good perceptual space to do, proper coral sense computation. However, with that being said, it's a cool space for and very useful space for artists because, you can build color pickers. It will decorrelate, hue, saturation, and value to the likeness, nicely. So, yeah, it's it's it's good for that. But, yeah, in Core ArtScience, you wouldn't really use, use that guy. I just use it for anything that is more artistic related than proper mass.
If you if you really want to do, advanced colorimetry and or even basic because there are, like, 2 aspect of colorimetry. There is, like, the the basic colorimetry, which is about measuring, color and trying to reproduce it. And the advanced 1 would be, the colorimetry where you not only measure but you try to reproduce colors while accounting for the environment. The viewer is seeing things and, so you introduce color appearance models. A it allow you to grab, like, say, a patch of brown color, and, that was seen, in a very dark viewing conditions. You know? You have seen that dark patch to the cinema, obviously, because of contrast effects in the visual system. If you see that, brown patch against, the white background, on the daylight, it won't appear the same. So color appearance model in advanced colorimetry allow you to predict the color of that, brown patch, for daylight.
For example, coverage conditions so that it looks and appear the same for you. So, yeah, I went a bit deep.
[00:24:16] Unknown:
Yeah. A lot of these areas are easy to go deep because at the surface level, you say, oh, it's just a color. It's red, it's blue, it's green, etcetera. But then when you're talking about the ways that it's actually physically manifested and digitally represented and the ways that it needs to be transmitted in order to be able to represent it accurately at the receiving end. There are a lot of different technical and physical and scientific aspects that go into it and there's a huge area of research because, you know, vision and propagation of light and the ways that it works even at the Newtonian or relativistic levels, let alone quantum, there are so many different things that we still don't fully understand about it. So
[00:24:56] Unknown:
Exactly. Yeah. And even in in the brain itself, like like, yeah, the the reality is that vision, is, is acting also in the brain for yeah. If if not, like, most parts of it. You know? It's like it's Palmyra as, I think it's I will quote it incorrectly, but, is, is giving, like, a good example, about vision and saying that we we don't see reality. We are seeing the model, the brain has made of reality, essentially. And a good a good example to highlight that is optical illusions. Like, optical illusions, they don't exist in reality. It's really your brain fighting to fit the appropriate model to to what you are looking at and, not really managing to to pick, okay, this is more that model or that, and that's where optical illusions are are critila.
[00:25:51] Unknown:
And another area that's related to perception and our ability to process these visual inputs are things like color blindness, where some people are just physically incapable of even perceiving certain aspects of color. And I'm wondering if there are any uses of your library for being able to either compensate for that or to be able to generate computations that will allow you to preview or predict the ways that somebody who has this particular limitation, how they will be able to experience what it is that you're producing?
[00:26:29] Unknown:
So, yeah. It's an interesting question, because, like, for years, we had, we had a pull request. I mean, I started some color, yeah, maybe 3 years ago. For that, especially, yeah, because it was a big lock and and at at the time yeah. I need we needed something. So I implemented the paper from, I think it was a student in Spain. It's Machado, Gustavo Machado. And, and that request got stalled for 3 years because, a part of this model, so there are 2 2 aspects of this of this model or 2 implementations. There is a easy 1, which is about, taking as a precomputed matrices generated for this model and use that directly. So, yeah, we implemented that super quickly.
And the other part was, like, going back to the spectral aspect of it and being able to to reproduce, what he was doing with this publication. And so the the model is built is basically based on, on shifting, you know, the sensitivity of the we have 3 3 cons, in the eyes and rods for, yeah. So we have a rod and cones. The 1 that that interest us are interest us here are the cones. So we have long, medium, short. And his his, his model is basically simulating vision deficiency by, shifting, the sensitivity of the long medium or short cones. So for protanomaly, which is long wavelengths or red chromacy.
It's about shifting yes with long cones, and you have the medium, which is the teranomaly. And and if you don't have any medium cone, it's deuteranopia or treatanomaly for short wavelengths and, and treatanopia if you don't have. So we needed, like, spectral, better spectral back end in color to do that. It took just, like, a long time. And but since, I I think it's 1 month even, maybe, it's quite recent. We finally merged that through request. So we can model, kind of, faithfully, yeah, color blindness and color blindness and the vision deficiency with that. So you could have, like, a service online, you know, on a web server. You create an image or and it gives you, what would be the image for the the dichromat or
[00:29:18] Unknown:
And I could see as well that being useful for somebody who is involved in web design to be able to incorporate that accessibility component in things like an integration test to ensure that your website is usable for somebody who has some form of color blindness and then being able to compare the way it looks based on the different types of color blindness that might manifest.
[00:29:43] Unknown:
Yes. Exactly. Yeah. And and you could really tune, it's probably super advanced, but because, like, yeah, we have the spectral back end. Yeah. You can really fine tune to a particular if you know, like, okay. That's, the shift in sensitivity that person has, you could very, yeah, closely mimic what you will see. So, yeah, it it's it's quite good in that sense. There are probably other papers since then because, it's from 2010. But, yeah, we are if we find something and we have time, we'll implement that. But it's still like an active research topic because, yeah, we don't really know. And I think it's, it's tritanopia.
There is not really so it's a short it's a cons, short cons, you know, short wave wavelengths con. I think there is not a really good model for it right now. So, yeah, it's a it's an area of research. It's not really well understood.
[00:30:42] Unknown:
I should check, but, yeah, that's that's where I was with that. And I had a question too about whether there are new areas of color science and color theory that you need to periodically incorporate into the library to ensure that it's up to date and accurately represents the current state of the art?
[00:31:02] Unknown:
Yes. So periodically I mean, we are scoring, like, through every news or everything we we can. And, given the time we have also to to do that, we are trying to ingest, whatever is, the most relevant or so for us for for our usage. But, yeah, we do that. So I think, like, big, big area of research and of interest for us are the color appearance models and, uniform color spaces because they are important, in graphics and in the game industry to do some stuff. We have, yeah, we have a lot of use cases for that, yeah, to ensure that when you have all sold content, and you are watching it under different, viewing conditions, you know, it will try to stay the same and, a good contender I mean, a good candidate, sorry, for that kind of application is augmented reality.
So whether it's on the phone or, or inside glasses, yeah, you might be interested into doing that kind of stuff to preserve the appearance of your content no matter, like, what the user is viewing condition are, basically. Yeah.
[00:32:19] Unknown:
And digging into the library itself, I'm wondering if you could talk about how it is implemented and how the way that it has been built and architected has evolved over the course of the time that you've been working on it.
[00:32:35] Unknown:
Yeah. So very early not at start. I guess it does grown like a bit organically at start. And, so I'd like kind of code that I could publicly share that wasn't MPC related. Was what it was. It was sitting in modules and, at the root, like, of of the package, and it was good. And, from there, as I was starting to put, even more data into the API because I'm I have, like, collection fetish, I think. I have, yeah, hoarding problem, collecting too much stuff. So, yeah, it it has grown, and, I started to segment the API and the sub in sub packages related to a particular task. And so that's that's where you get, the something like colorimetry, which is a core almost core package, and where you will have, like, spectral computations and all that stuff. And from that package, you have dependencies, models, which implements RGB, HSV we have, and all those color models, is is kind of that's a package. It's dependent on colorimetry.
Pretty much everything is dependent on colorimetry. So there is kind of a tree of dependency of super packages like that. We have, I I would be lying if I was saying, like, we don't have cross dependencies, between them, but it's kind of minimal and almost self com self contained. And, yes. That's that's how you end up, like, having the structure we have. So, yeah, we have stuff for we are doing a lot of interpolation work on spectral lattice. So we have an algebra, super package with relating things for interpolation.
We have an appearance 1, which is very important for us, which is like all the advanced colorimetry with the color appearance models. Well, blindness blindness 1, which is the 1 we're talking earlier for color vision deficiency. Characterization will be more like, color fitting. So you have 3 images with a color checker, and you want to match them with data for that and yeah. So forth. We're reporting 1 also, which is important because, yeah, people are using it a lot.
[00:35:15] Unknown:
And in the process of building and expanding the capabilities of the library and working with people who are using it, what have you found to be some of the most often misunderstood aspects of color and our perception of how color is manifested?
[00:35:35] Unknown:
Yeah. So I guess, like, there are it's I I could go on, on that question for hours. There are many things, and, I think, like, the the most the most important 1, is incorrect terminology usage. I think terminology and, I'm, yeah, I'm guilty of not using the right words at times and, yeah, I'm kind of in a shame, but I try to make a point of using, like, appropriate words whenever possible. And I'm sure I will be corrected many times by people hearing that that interview. It's easier when you write, you know, on paper and, yeah, you can rethink about your sentences instead of, like, yeah, compared to when you are talking. But, yeah, terminology, in a scientific domain, I think is key to its its understanding, and it's very a crusade against, improper terms and, because people are careless in in their usage and, you end up creating situation where, for example, most people talk about, the sRGB to linear stuff.
You might have heard about that, you know, sRGB too linear. But, they don't really realize that the sRGB has a color space, can be linear. So it's something that confused me, in my early days. I wasn't understanding, like yeah. In my career, I was like, yeah. But what are they talking about? You know? And, and since then, yeah, I've been, trying to dub, like, the proper terminology. And no longer than yesterday, I was reading, the physically based rendering guide from Algorithmics and, had to to to tell them on Twitter. You know? Like, yeah, guys. You need to use a proper terms. It's very confusing. You you can't say what you are saying here. So yeah. And it has been always like that, in, in the graphics industry, especially. So yeah. Guess it's it's important to use, the proper words. So because if you don't do that, that's where people start to not understand. I've been into that situation.
Like, okay. But what he's trying to say? And, like and it's just because, yeah, you you have used the incorrect wording when when talking about something. And the sRGB tool in our 1 is like, it's it's all the time all the time all the time.
[00:38:17] Unknown:
And have there been any aspects of working on the project or working with people who are using it that you found to be particularly difficult or challenging?
[00:38:27] Unknown:
I I guess, like, yeah, for me, the the most difficult aspect is, is lack of time. It's it's really my bane and, especially, like, you know, I have kids now so I need to partition my time and, maintaining something like color and making it, you know, yeah, progress and include including features and fixing issues. Yeah. It take a lot of time. And, yes, that's that's my big, my 1 of the big issue. Another 1 is, is, most of research is paywall, and it involves, like, a bit of financial resources. Like, yesterday, for instance, or last week or this weekend, whatever, what issues, about some tables in 1 of the core CIE core appearance model.
And you get conflicting, version of the data. So some are coming because, you are reading a publication that predates the official standards. So the data has been adjusted in the standard. Some are because, there have been tippo in documents taking the official stand out, and you end up in you end up with issue with errors in Wikipedia. So, basically, for that particular case, I had to to buy the CIE stand out. So it's $60, you know, just to verify her number. So it's a very expensive number, but, it happens, yeah, very often. And, Yeah, it's and it's a bit frustrating because I'm writing color because I want to spread the knowledge and, yeah, you end up, like, having to pay. So it's fine. I'm fine with it. But, yeah, it's it's 1 of the frustrating aspect, you know. I would be better going to cinema with my kids and spending the $60 to verify a single number.
So I'm I'm very thankful for it. And related to that, yeah, I'm very thankful, to the decision of some university around the world, like in Finland or France, canceling their subscriptions to journals. I think, like, yes, there is a very big issue when you see LCVAs, like, doing 1, 000, 000, 000 of dollars of benefits. It's good for them, but I I I don't think it's really good for research. And, yeah.
[00:40:49] Unknown:
Yeah. It's good to see things like the Journal of Open Source Science and, pre publication sites like arXiv being available to try and break down some of those paywalls and make paid research more generally available to people who are interested in applying it to their particular domains.
[00:41:09] Unknown:
Yeah. Yeah. So, yeah, I think that that would be the 2 2 big things. And 1 of the last 1, if I can put it in, is, yeah. I think, I wish I had, like, a a better formal mathematical and physics knowledge. You know, at times, I'm like, yeah. I'm not really sure I understand that properly. And, even though I, it it's still stay basic math, yeah, at times, it's, it can be a bit tricky and, that's where I wish, like, I was, yeah, better in that domain. And again, question of time, you know, yeah, I don't have time to train. So yeah. And
[00:41:48] Unknown:
are there any particularly interesting or unexpected uses of your library that you've found?
[00:41:55] Unknown:
Yes. I mean, like, I think in term of satisfaction, really, the YouTube stuff is, is amazing. But in term of usage, 1 1 that I found interesting was, I don't remember her name, but somebody on GitHub, Catherine Crosson, I think. Yeah. She did, and it's related to color appearance model, so that's where it's, it's getting interesting. She did a smaller applet to, convert, the idea is really good, to convert, a color scheme, from a dark to a white background while, maintaining the appearance of it. So you could have, like, a dark scheme, in your call editor and user stuff to, yeah, to convert that to white background version, while still maintaining the appearance of, of the coral. So, yeah, it's, that was a very interesting usage of it.
[00:42:52] Unknown:
And are there any particular plans that you have for the future of the color library or work that you plan to do with it? Yes. So we are still after
[00:43:03] Unknown:
5 years or I don't remember when I started on that. But, yeah, after many years, we're still not reaching the stable, level, although we are much, much closer than what we were a few months ago. The the big thing we changed recently, and which allowed us to have, like, CVD modeling core vision deficiency with spectral back end update. So we have done that in 3.11 0.3.11. And now, I think given that is done, I'm working. So, yes, that's another frustrating aspect, of neuroscience. It's something I'm working on, because we implement stuff, as per the book and the references so that if there is something wrong, you can easily go back to the publication and check the, like, if things are agreeing.
You end up having, like, a mixed of, scales. So you will have spectral computation, outputting numbers, in a percentage scale, so between 0 and, 100, and, RGB models will be working, between 0 and 1 in the floating point world. And, yeah, we have a mental value for for example is between 0 and 10. And so you have, like, all those inconsistent scales of domain and range scales. Sometimes, a single definition, will start, between 0 and 100 and give you a number between 0 and 1. So, yes, there is all that inconsistency in the field.
And it's up to say, okay. We are normalizing between 0 and 1 because then, like, you have a coral scientist, a researcher that is used to have, lab values between 0 and 1 and red and, like, yeah, why is it 0 and 1? You know? What's happening? So, yeah, we talked at length about that and, without really finding a good solution for it. And, actually, what I'm doing these days is I'm working through that to have the reference a reference scale, which is, like, as per the publication and forcibly, normalize the scale, which is between 0 and 1 for the usage. Like, I would need that for my personal stuff. So, yeah, that's something we're working on and that what will bring us closer to a stable version. So, yes, that that's it. We need to improve, the plotting subpackage also, and there is, like, a ton of research that, we still need to to inject. I mean, like, just taking a look at the issue board, you you can see that there is a lot of stuff we want to implement.
Something I'm also, keeping a very interested and keen eye on is GPU processing, because I'm working, these days, like, a lot with game engines, and, I've implemented, the CCAM color model in Unity. And, yeah, it's very, very cool to have complex, color models like that being able to run, in real time. But it's a lot of effort. You need to convert, like, all your Python code to GLSL or HLSL. So, yeah, I'm keeping, very interested eyes to things like Borium. I don't know if you heard about that. It's basically, I don't know how to describe that, but, you change your name by import to volume, you know, and, they're handling, like, all the computation on the GPU, if you have 1 and things like that. So it's very cool. So it's a bit early days, but, yeah, it will make, like, having access to the GPU almost as a as a switch. So, yeah, I'm very interested,
[00:46:56] Unknown:
with that. And are there any particular resources that you found to be especially helpful when learning about how to effectively incorporate color into design, whether it's for visual effects or websites or display or anything like that?
[00:47:16] Unknown:
That's a very good question. I think Jeremy Selam from, back then, he was at he's the guy basically that wrote open. Io that we use in the industry was, 1 of the it was the first author. And he brought a paper back then, when he was at Sony Pictures that was called cinematic color. And, I think it's a really good paper because, it it will need to be brought, like, up to speed. So, yeah, it was laying good foundation to understand, like, a lot of the stuff we do in the graphics industry. And it's, it could be useful, for for, yeah, anybody to I mean, anybody interested to read something like that. I would provide a link for it. But, yeah, in term of, websites, I think I don't really read a lot of, websites. I'm more on books. So, yeah, book I love is, color appearance models by, Mark Furchill.
Mark is a brilliant guy. Super super smart, very very kind, so you can mail him and he will usually answer. Don't spam him, but he will, he will usually answer. And, yeah, he has worked, like, on many of those models, you know, and, he's a very active researcher. I really like reproduction of color by Ant. Hodger Ant, was, like, Kodak engineer. So same thing. It's it's guys that have defined the field a bit, especially on our end, you know, in the in the industry. I so let let me grab that 1. I don't remember his name exactly. So, yeah, it's, this 1 is more like, a dictionary, I would say. It's, Coroscience Concepts and methods, quantitative data and formula, 2nd edition by, Wichek Wichetski and Styles.
It's not a book you read from you read from start to end because, it's just too much. But, yeah. Anytime you need to have a reference to something, you open it and you will probably find what you need, especially if it's about basic colorimetry. It's a 3 very important piece, I think, to have with your serious about that. And if you have it on your desk, you know, it makes you look professional. So, yeah, always good. And as there are many other resources, so, yeah, after the interview, I can, can give us some links. That would be great. And are there any other topics that you think we should discuss before we start to close out the show? So something I I did forget to mention and, is is important because I'm, involved to some degrees, with the guys and the project is, yeah. When I when I wanted to do, my shop, my online shop, 1 of the thing, I was wishing for for the data we would have been selling, was to have them, using, the academy, the academy color encoding system, ACES.
So and, yeah, I'm involved a bit, in discussion with those guys, and, we have a Slack channel, a private Slack channel with a few guys from the academy and Coruscant is from, from the industry. And, yeah, we have been many great, conversation about, yeah, the system. So it has been adopted not widely, but still, yet to see significant, proportion in the graphics industry and something great is, people from, epic games like, Brian Carris with, graphics. I don't remember his role, but, yes, kind of graphics grew over epic games, has implemented aces into, into Unreal. So that's that's great because, Unity, has done the same. I have to I have to beat on the Unity implementation.
And because of that, it allows us to use the same color management, solution, if I can say so. We can have data transiting from offline rendering, you know, to real time games and being compliant and color managed the same way. So this is a very good aspect and the academy, is responsible for for that system. And, so yeah. That's, that's that's an important topic and, it's recurrent in in kind of my work around color. We are working, with them often. Is there anything else we should cover? Oh, I think we didn't talk about oh, yeah. We kind of talked about it a bit, like, so usage in a web application. Yeah. Yeah. So that question kind of annoyed me because we don't, yeah, we don't really have, like, a direct, easy usage.
It's still a Python, you know, API. So what Catherine Crossan did, was actually building a Flask application, and, that's what she's doing. She's using, she's doing calls to to color to adapt her color syntax scenes. Yeah. You could have, like, an obvious 1 is having, a color calculator. We could do that and we have some tools, some old school CGI, CGI bin scripts are doing that stuff. And it's funny because it's probably the page that gets the most hits, on on our website. So, yeah, it's very useful even though it's old school. But, yeah, no no no seem easy. I was talking about maybe having a REST API, but doesn't seem to be like a very high priority thing to me. Mhmm. So on the next priority point, something I was toying with, recently is, Google Colab.
Because I always wanted to have, the API available, you know, quickly online. And, with Google Colab, you can actually, yeah, pip install a color and, yeah, I made a very small notebook, with a few tools. And, yeah, you can use color without anything. So it's it's very end here. And, yeah, the days of, widgets available, into Google Colab, it's it's going to be really cool because we'd be able to build application material with that. But it's not now. It's not anytime soon, I think. But, yeah, it will come eventually. So that's probably the way we'll expose properly other stuff. We will be able to build calculators and things like that easily.
So, yeah, I I will, try to thanks a few people and especially, like, my partner because, she's very patient with me. You know? I'm not spending too much time with my laptop, I think. Yeah. My kids, obviously, and, yeah, a few people, who have been, involved with or interacting. So, yes, there is Alex Forces from the academy, Charpenton, which is a kind of color guru researcher, Catherine Croson, collaborator on color, Kevin Wheatley from Framestore, Chorus Scientist and people, yeah, a person with whom we are discussing a lot. Luke Canavan, contributors. Mark Fairchild for a lot of his, interesting conversation. And Ian's Michael Modere, obviously, which is, like, my peer code, peer reviewer and implemented a lot of the color appearance code.
Michael Parsons from MPC with whom we started color. Nick Shaw, who is doing a tremendous, good job, and especially, like, his problems pottery has a sharp eye. It's it's insane. Ofer Kleff, Paul Senterus, Scott Dyer from the academy, Sean Cooper, growth scientist at DNEX, Tiva Glan from, I forgot the company. It's in Australia. Timber, Timberer and Yoshino. So, yeah, all those, all those guys and my partner. Without them, it wouldn't be possible. Absolutely. And also contributors. Yeah. Just all those are contributors, in the issues and forums and mailing us. You know? We we try to put all the contributors in the file. If you raise an issue or participate, we we tend to put your name in the file and on the website. So, yeah, all those guys, thank you.
[00:55:30] Unknown:
And for anybody who wants to find out more about some of the ways that they can help on the project or if they want to get in touch with you and follow the work that you're up to, I'll have you add your preferred contact information to the show notes, and we'll have a link to the GitHub project in the show notes as well. And so with that, I'll move us into the picks. And this week, I'm going to choose the beasts of Olympus series of books. It's a, it's a fun set of books that focus on the son of the god Pan and his adventures as the stable boy to the gods of Olympus. So it's a fun series that's aimed at sort of, elementary school level, and I've been reading them with my kids, And they're ton of fun, a lot of good humor, engaging storyline. So if you're looking for something to read with your kids or just as a light read for something fun to do, then I definitely recommend picking that up.
And so with that, I'll pass it to you, Thomas. Do you have any picks this week? No. I think,
[00:56:31] Unknown:
my pick for this weekend or I wish was, yeah, to be able to do the Coursera, mathematic machine learning course. So, yeah, it's starting on 16 April. So I will, I will send a link because I would be keen on doing that.
[00:56:50] Unknown:
Great. Well, I appreciate you taking the time out of your day to join me and discuss the work that you've been doing with color and all of the research that you've done on color science and color theory and how it can be used in the visual effects industry.
[00:57:05] Unknown:
So I appreciate that, and I hope you enjoy the rest of your day. Thank you. Appreciate it. Have a good day. It was good to hear you.
Introduction and Guest Introduction
Thomas Masingkal's Background
Introduction to Python and Visual Effects
Color Theory vs. Color Science
Color Science in Visual Effects
Use Cases for the Color Library
Different Color Spaces and Their Challenges
Color Blindness and Compensation
Implementation and Evolution of the Color Library
Misunderstandings in Color Science
Challenges in Developing the Color Library
Interesting Uses and Future Plans for the Color Library
Resources for Learning About Color Science
Academy Color Encoding System (ACES)
Web Applications and Google Colab
Acknowledgements and Thank Yous