Get the latest tech news

Transforming Colors with Matrices


's one trick we use at work, and now I'm using in my current medieval village building game project, which apparently isn't as well-known as I thought: transforming colors using matrices, interpreting colors as 3D RGB or 4D RGBA vectors. In this article I'll try to explain how it works and which operations on colors can be represented this way.

In particular, the user can decide to e.g. roads darker, make buildings more saturated, and shift the hue of forests into the yellow region. Raw meshes in blender So, matrices can describe a wide range of color transformations (which we'll discuss in detail shortly), they are easy to combine and apply. How bad these problems are is a different question, but note that if a pixel is really close to being completely transparent, you probably won't notice the severe color quantization in it anyway.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Colors

Colors

Photo of Matrices

Matrices

Related news:

News photo

Apple Fifth Ave glows in colors to celebrate iPhone 16 launch

News photo

iPhone 16 colors: see all five color choices

News photo

New leak shows the Galaxy S24 FE in just about all colors and angles