Skip to content

Commit b715646

Browse files
Update and rename docs/bpp.md to docs/reference/image/bpp.md
1 parent ac09e37 commit b715646

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

docs/bpp.md renamed to docs/reference/image/bpp.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
A **BPP** is short for Bits Per Pixel, which tells how many possible color values are for that one pixel. For example,
44
if there are 16 colors in the palette editor, there are 4 bits per pixel are required because 2⁴ = 16. That is why
55
MakeCode uses 4 bits per pixel. It is very useful for packing and unpacking because it is just the right value
6-
for getting how many bits per pixel.
6+
for getting how many bits per pixel:
7+
``` ts
8+
bpp() {
9+
return this.palette.length > 2 ? 4 : 1
10+
}
11+
```

0 commit comments

Comments
 (0)