We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac09e37 commit b715646Copy full SHA for b715646
1 file changed
docs/bpp.md docs/reference/image/bpp.mddocs/bpp.md renamed to docs/reference/image/bpp.md
@@ -3,4 +3,9 @@
3
A **BPP** is short for Bits Per Pixel, which tells how many possible color values are for that one pixel. For example,
4
if there are 16 colors in the palette editor, there are 4 bits per pixel are required because 2⁴ = 16. That is why
5
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.
+for getting how many bits per pixel:
7
+``` ts
8
+ bpp() {
9
+ return this.palette.length > 2 ? 4 : 1
10
+ }
11
+```
0 commit comments