2048 Editor

Width of the grid:
Height of the grid:
Width of a cell:
Height of a cell:
Distance between cells horizontally:
Distance between cells vertically:
a is the value of the tile being merged into the tile with value b
Function to determine result:
(a, b) => a + b

Function to determine if they can merge:
(a, b) => a == b
These functions take the value of the cell and return a number, which will be converted to hexadecimal to get the color
Function to determine background color:
n => Math.floor((12 - Math.log2(n)) * 65535 / 11) * 256 + 255

Function to determine text color:
n => 0x000000
Cell Value Cell Name
Cell Value Cell Weight
Background color:
Grid color:

Play