The first week at Origin Code Academy is mostly focused on JavaScript basics. A lot of our first projects look very much the same, especially once our teacher introduces CSS frameworks to us (Bootstrap is popular, but I prefer Pure).
However, the blank backgrounds can be boring, despite Google's full court press with Material Design.
![a basic web form styled using stock Pure.css classes](https://jason.land/media/pages/blog/n00b-news-adding-texture-to-your-site/e7a3ce0b60-1597798057/pure.png)
Our solution was to add some code to the body
tag in CSS like so:
body{
background-image: url('images/gplaypattern.png');
background-color: #558ED3;
}
The first line in that CSS rule sets an image for the whole body of the HTML page. However, this has to be a transparent PNG file. The background-color
rule tints it, and is changeable without re-rendering a new PNG file.
![the gray pattern from the website tinted green](https://jason.land/media/pages/blog/n00b-news-adding-texture-to-your-site/13ebc0fd08-1597798057/green.png)
![the gray pattern from the website tinted pink](https://jason.land/media/pages/blog/n00b-news-adding-texture-to-your-site/3f3a224162-1597798057/pink.png)
Note: You'll have to open the PNGs from Subtle Patterns in a photo editor that lets you change the transparency and bring it under 100%, as they only offer opaque images.