This project transforms abstract color data into a dynamic 3D landscape, revealing the visual rhythm of a film that simple averaging misses. It is a sophisticated bridge between data science and cinematography that makes the invisible logic of light visible.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Movie Color AnimationsAdded:
I have often used color spaces to look at block distributions, textures, demonstrate color theory concepts, and even show the distribution of colors in art from real life, like this one, a Sunday on Lrange. I think it's a useful way to analyze images and can help see what makes them work. This kind of reminded me of something called movie barcodes that were popular about a decade ago, and I still see them sometimes. These try to squish an entire movie into one single image, but ultimately these creations are making something just nice to look at. They aren't really that useful of a tool to convey the movie pallet of a video for a few reasons. So, let's see if we can make something better.
This is the Minecraft Live trailer from 2022. Arguably the best, and it's my personal favorite. It's bright, distinct, and short. So, I'm going to be using it as an example throughout this video. The basics of these movie barcodes is taking a frame, condensing it into a vertical strip, and then putting them all next to each other in sequential order to make one large image. The idea is that this will show you the overall color distribution of a movie. But there are several issues with that. The first is length. This trailer is only 2 minutes long and 24 fps, but that is still nearly 3,000 frames. A two-hour movie would be 172,800 frames, which is a bit higher resolution than most people want for an image. So, you have to either average multiple frames together or just sample a frame every so often to get the desired number of vertical slices you want. I was first aware of this from this site which has a free open- source program called Movie Barcode Generator. It lets you choose a few parameters and you get a lot of vertical variation since the frame is just squished which might not be the most aesthetically pleasing. There's also a smooth option which makes each vertical strip a uniform color. These results can look nice but brings us to our second issue. Averaging colors is an evil process. Most well-composed shots will have some contrast. The technical most you can have is just black and white. If you average contrast, it goes away. So, you are left with some more neutral color. This is just the most basic statement and applies to any type of color averaging or averaging in general because that's what you're trying to do. This all gets more complex because you can average colors in different ways. Here is pure blue and yellow. And if we average them in sRGB, what most images and displays use, we get this gray, which is kind of wrong.
SRRGB has a gamma correction applied to it. And RGB isn't really based on values relating to how our eyes work either.
Averaging in a perceptual uniform space like CIE lab is better, but it has some issues with blues. Okay. Lab is pretty okay, which makes this light blue color.
This might sound strange, but pure blue is further from neutral than pure yellow is. So, you end up on the blue side when you average the two evenly together. The color space you end up using really depends on what you are needing to do.
The program I showed earlier takes a frame, resizes it horizontally, and then resizes it vertically and then averages it again. If you are using the smooth option, it does the math in linear RGB, which has the gamma removed, which is better, but the result is a bit drab.
The legacy version in the same program actually produces a much brighter image.
If we look at it uns smooth, it's doing some weird sampling here. It seems like it's doing just nearest neighbor pixel instead of averaging each frame. And strangely, it's only sampling the left part of a frame, and it's not really doing an average. No matter how you do it, the point is that each frame is getting averaged multiple times. And even if it was just once, you still lose contrast. The Minecraft trailer ends up looking just washed out and not much like the original. It definitely doesn't tell you something about the pallet of the video. The more contrasted the individual scenes are, the bigger issue this will be. I made my own version of this program that does the same thing, but does the math in linear RGB and also Okay Lab. The OK Lab version isn't bad.
It has the most contrast and the colors are a bit more true, but it's still just an average. There is this commercial site that does these also, but a little bit different. They call them movie pallets, and they keep each frame a uniform color, not a compressed frame, similar to the other programs smooth output. But their results are different.
They don't give a lot of details on how they actually do this. But they do say the dominant color, not average color, which I think is a better way to do things if you want bright interesting pieces. But it's not a palette. It's also not really showing you the contrast of a particular scene or frame, just the overall dominant colors of a video. If we compare the barcode programs output for Into the Spider-Verse, it produces this muted image. Compared to the movie pallet website version, theirs is much brighter. They are probably not just increasing saturation but doing some sort of clustering algorithm like I've talked about before. I decided to do my own version using mean shift clustering and make an image with only the dominant color of a frame be represented and it basically reproduces the image from the website. We can look at the Minecraft trailer again and this method does produce a brighter result. And I wanted to mess around with this a little bit more. The mean shift clustering is still a form of averaging, but it's only averaging similar colors together. We can produce a barcode with the top five colors in a particular frame, and it just looks a little bit messy. Maybe you could organize them by their hue vertically. I think that still looks a little bit noisy. And if you lower the resolution, it looks a little bit better. I also tried mirroring it around the middle and also applying some vertical blending. I think there is some other things here that you could do to make some interesting looking images.
Ultimately, whatever you do, you have the same problem with these. You are trying to display the distribution of a three-dimensional color system in a 2D space. Technically, a 4D space into a 2D space. If you consider time also, if we take the colors of these barcodes and display them in the OKAB color space, we can see how much they fill out the space. I can add some fully saturated colors here for a bit to see where the extremes are. The size of colors here are semi-proportional to the abundance of those colors. But the benefit of this extra dimension is that you don't need to just show average color or dominant color. We can show them all to see the difference between these barcodes and the actual color data. We can count every color from every frame and then display them scaled to their abundance in the video. Usually the abundance of color is somewhat exponential. So if I showed them all at their true scale, the most abundant colors would block out nearly everything else or you cannot see the smaller values. So I semi linearized the scales. And a note here, I said all colors, but due to Minecraft's limitation with entities, I have to fit all the colors present in the video into the nearest of about 6,000 colors represented by these entities here. It still gives a good distribution of color and it is a much truer representation of actual colors in the video. But the thing about movies is well they move. So I did a lot of optimization and we can animate this color space across the length of a video. This is the Minecraft live trailer in Okay Lab and animated at the speed of the video. I'll put the video up in the corner and the color space updates every other tick, so 10 times per second. And I'm also interpolating the colors between it so it looks a little bit smoother. I'm going to talk over this now, but at the end of the video, I'll include a version with the sound and a cinematic camera.
This is what the movie barcodes made me want to do, and I wasn't even sure if it was going to be technically possible in the game. But is it a useful tool for analyzing a video? Maybe. Is it a practical tool? Absolutely not. It would be a lot easier to do this outside of Minecraft. And a better tool might just be a static color space display for each scene to look at changes and comparisons across a movie. It is very pretty though and it's inspired me to do some other things similar to this in the future. It really reminds me of those old Win Amp music visualizers or a little bit like a lava lamp. This is playing in real time but the process of making the files takes much longer. It's actually incredibly inefficient. I'm doing all this with a data pack and Minecraft loads the entire data pack into memory.
So, there is a limit to how big you can make one. The original video file is only 48 megs, but the function files that drive this are 150 megabytes or three times as large, which is huge for a data pack. Going larger than this really causes some issues loading the world, which was a bit disheartening because what I really set out to do was display a fulllength movie like this, not just a 2-minute trailer. Luckily, Minecraft has another storage solution for data. It's called data storage. And the commands that drive this animation are basically the same thing over and over each frame, just changing a few values for size, which makes them perfect for macro commands. except I didn't have any experience with using storage or macros. So, I got some help from my friend Conor and then did a lot of testing with different variables. But with the use of macros and data storage, I was able to get the file size low enough to encode an entire movie's worth of color data into Minecraft. And so, I did that for all of Shrek. And the world is available for download. I did have to reduce the total number of colors a bit to get it to work, but the world has chapter selects, play, pause, as well as some other options to display the primary colors, add this black background, and just a world reset. The world is still very resource heavy and prone to crashes, especially if you tab away while the animation is playing. I have 8 gigs of RAM allocated to Minecraft, and it's okay. If you wanted to watch all of this alongside your copy of Shrek, you could. It might have some desync issues depending on your machine, but on mine it was only off by a few seconds at the end. I also did Into the Spider-Verse in this same world, but why would you want to see one of the most vibrant movies in existence when you have Shrek? If you just wanted to watch it, there is a separate video over on the other channel, and there are also links to the programs I talked about down in the description. This was a little project that I've wanted to do for years, and other things just always came up. Somehow putting Shrek into a color space was never the most important thing I could be doing, so I just decided to do it. Thank you to Conor for the help on this, my patrons for supporting this weird channel, and I hope you have a nice day. I'm going to run that full trailer after the end here, and I'll see you next time.
Bye-bye.
Give me Heat.
Hey, heat. Hey, heat. Heat.
Heat.
Hey, hey, hey.
Heat. Heat.
Related Videos
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29
3D Platformer Update - NO CAPES
SolarLune
294 views•2026-05-30











