At first glance, colouring pictures with maths might sound like an unusual concept, but it is a powerful demonstration of how abstract numerical rules can create tangible beauty. This intersection of logic and art reveals that mathematics is not merely a tool for calculations but a deep wellspring of visual creativity. By applying structured algorithms to a blank grid, we transform cold computation into vibrant, intricate patterns that captivate the eye and stimulate the mind.
Decoding the Algorithm: How Numbers Become Art
The fundamental process involves assigning specific colours to numbers generated by a mathematical formula. Typically, a coordinate system is established on a grid, where each point corresponds to a pair of numbers, such as its horizontal (x) and vertical (y) position. A function then calculates a value based on these coordinates, and this value is plugged into a colour scale. The resulting hue is used to fill the pixel, and when repeated thousands of times, the collective pixels resolve into a coherent and often startling image. This method moves art away from the randomness of a painter’s brush and toward the precision of a coded instruction set.
The Role of Complex Numbers and Fractals
One of the most famous examples of this technique involves complex numbers and the generation of fractals, most notably the Mandelbrot set. In this scenario, the algorithm checks how quickly a sequence of complex numbers escapes towards infinity when iterated. Points that escape slowly are coloured with warm tones like red and orange, while those that resist escaping are shaded in cool blues and blacks. The boundary between these regions forms the infinitely intricate edge of the fractal, showcasing a detail-rich landscape that reveals new structures no matter how much you zoom in. This process highlights the "colour pictures with maths" principle, where iterative equations generate overwhelming complexity.

Symmetry and Repetition: The Artist’s Rules
Beyond fractals, simpler mathematical rules can produce mesmerising results through symmetry and tiling. By applying modular arithmetic—which deals with the remainder after division—an artist can create patterns that repeat in perfect cycles. For instance, a rule might dictate that a cell changes colour only if its neighbours sum to a prime number. The rigid application of these constraints leads to emergent complexity, where simple interactions give rise to grids that resemble stained glass windows, Byzantine mosaics, or modern abstract art. The maths provides the constraints, and the constraints provide the structure for the art.
Utilising Tables for Precision Colour Mapping
To ensure accuracy and consistency, artists often rely on predefined tables that link numerical outputs to specific colours. This table acts as the bridge between calculation and visualisation, ensuring that the same number always results in the same shade. Below is a simplified example of how such a mapping might look for a basic gradient calculation.
| Calculated Value | Resulting Colour |
|---|---|
| 0 | #0000FF (Blue) |
| 1 | #00FF00 (Green) |
| 2 | #FFFF00 (Yellow) |
| 3 | #FF0000 (Red) |
The Educational and Therapeutic Value"

Beyond aesthetics, colouring pictures with maths serves as an exceptional educational tool. Students can visually witness the outcomes of algebraic functions, gaining an intuitive understanding of concepts like convergence, divergence, and periodicity. For a more meditative experience, the act of colouring based on numerical solutions offers a structured form of art therapy. It requires focus and logic, pushing the artist to follow a system, which can be a relaxing and mindful exercise in pattern recognition. The final product is a unique piece that proves logic and creativity are not opposites but partners.
Modern Digital Implementations
Today, the process has been streamlined by software and programming languages like Python and JavaScript. What once required hours of manual calculation can now be rendered in seconds, allowing for real-time experimentation. Users can tweak variables in a formula and immediately see how the visual output changes, fostering a dynamic learning environment. This digital approach ensures that "colouring pictures with maths" remains a vibrant and accessible hobby, inviting both seasoned mathematicians and curious novices to explore the beautiful patterns hidden within numerical systems.























