Analysis of 20 thousand sets and one and a half million detailed records. What has happened to the color of a construction set over 77 years—and why the graph colors itself.
Introduction
In childhood, my brother and I shared one construction set. We built towers and vehicles, and the pieces would scatter all over the house—under the sofa, under the rug, into the corners. Some pieces were lost forever. By the end of the play, the set was never the same as it had been when it came from the factory. Years later, I learned that the contents of every LEGO set are documented down to the last piece: the exact quantity, shape, and color. There is an open database archiving this inventory since 1955—a perfect version of what was always incomplete in our home.

When I was choosing a project topic, I wanted to find data where color was not merely a design element, but the core subject of the research. LEGO fit this perfectly: every color in the base has an exact code.
This provided an unexpected opportunity. Typically, a designer selects the color palette for charts manually. Here, it can be calculated—pulled directly from the data. The «Bright Yellow» column on the chart is colored in true Bright Yellow because that code exists in the same row of the table.
Data

Source — Rebrickable, an open database of all official LEGO sets. It updates daily and requires no registration.I utilized five tables: sets (20 thousand rows—number, year, theme, part count), themes, colors (with hex code and transparency flag), and inventory and inventory composition—one and a half million rows, with one row for every part color in every set.Processing involved filtering out years outside of the actual production history and sets without parts—the database contains many promotional packaging and books with zero parts. I removed spare parts. I merged the five tables into one, where each row represents a part color within a specific set from a specific year.
Registration
The palette is compiled from colors.csv: black #05131D, red #C91A09, yellow #F2CD37, blue #0055BF—these are authentic LEGO codes, not colors chosen arbitrarily. The base colors for the chart themes are drawn from the data by name, not manually coded.
Font — Rubik, a geometric grotesque with rounded terminals. It is loaded via font_manager directly on the laptop: the TTF is downloaded, registered in matplotlib, and set in rcParams. There is no post-processing in a graphics editor—all styling lives in the code.The background is a warm off-white, featuring thick black outlines, and the grid is faded to 12% opacity. The headings are left-aligned and convey an insight rather than a variable name: not «Percentage of transparent parts by year, ” but „Transparent plastic makes up only a small portion.“
How to Read Charts
The work is presented in two formats. The Explanatory part — the initial charts. A distribution histogram and boxplot: I examine how the data is structured before drawing conclusions. It was here that it became clear that the distribution was heavily skewed, necessitating reliance on the median. The Interpretive part — the five final charts. Each answers one question, has a declarative title, and includes a caption with a key statistic.
1. How many colors of LEGO were used each year
The peak occurred in 2004—113 unique colors in the assortment simultaneously. After that, the palette shrank by almost a third and has remained around 70–80 colors since the 2010s.
Transparent plastic accounts for only a small portion
The share of transparent plastic is not growing; it fluctuates around the average of 4,1%. Sharp peaks before 1970 represent statistical noise from a small sample, not a real shift in production.
3. Twenty Most Popular LEGO Colors
4. Course offerings expand
5. Decades Themes
The themes illustrate the evolution of LEGO eras: Supplemental and Basic Sets were prominent in the 1950s–60s, Star Wars since 1999, and Friends and Ninjago rose to prominence in the 2010s.
Statistical Methods
Descriptive statistics. Median, mean, quartiles, and interquartile range. The skewness coefficient of 6.65 confirmed strong positive skew—therefore, I used the logarithm of the set size in further calculations.Pearson correlation—the linear relationship between graduation year and set size: r = 0.22 at p < 0.001. A relationship exists and is statistically significant, but it is weak.Spearman correlation—the same relationship, but based on ranks. The Spearman result is robust to outliers and yielded the same result—meaning the relationship is not driven by several giant sets.Linear regression using the least squares method. R² = 0.048—the year explains less than 5% of the variance. This is more important than the correlation itself: the relationship is significant, but it predicts almost nothing.












