Texture mixin for Sass

Most of these examples are based on the textures at Subtle Patterns, with the addition of being converted into alpha mode. An inverted version of each texture has also been created.

Usage

Step 1

Use the following include for an element you want to add a texture to. The three variables passed into the mixin are:

@include texture(green, 34, 0); 
// color, texture-number, 0=inverted or 1=normal

Step 2

Include the _texture-mixin.scss file in your project and you should be good to go.

Examples and Testing

The texture number on the left side in the examples below corresponds to the texture number in the _texture-mixin.scss file. The left-hand side shows the normal version and the right-hand side shows the inverted version. Use the color picker in the top right corner of each example to try out different backgrounds for the particular texture.

For a category overview, refer to the mixin file comments. The textures are ordered according to category.



Texture 1

Texture 2

Texture 3

Texture 4

Texture 5

Texture 6

Texture 7

Texture 8

Texture 9

Texture 10

Texture 11

Texture 12

Texture 13

Texture 14

Texture 15

Texture 16

Texture 17

Texture 18

Texture 19

Texture 20

Texture 21

Texture 22

Texture 23

Texture 24

Texture 25

Texture 26

Texture 27

Texture 28

Texture 29

Texture 30

Texture 31

Texture 32

Texture 33

Texture 34

Texture 35

Texture 36

Texture 37

Texture 38

Texture 39

Texture 40

Texture 41

Texture 42

Texture 43

Texture 44

Texture 45

Texture 46

Texture 47

Texture 48

Texture 49

Texture 50

Texture 51

Texture 52

Texture 53

Texture 54

Texture 55

Texture 56

Texture 57

Texture 58

Texture 59

Texture 60

Texture 61

Texture 62

Texture 63

Texture 64

Texture 65

Texture 66

Texture 67

Texture 68

Texture 69

Texture 70

Texture 71

Texture 72

Texture 73

Texture 74

Texture 75

Texture 76

Texture 77

Texture 78

Texture 79

Texture 80

Texture 81

Texture 82

Texture 83

Texture 84

Texture 85

Texture 86

Texture 87

Texture 88