algdb icon indicating copy to clipboard operation
algdb copied to clipboard

Custom colorschemes

Open coder13 opened this issue 5 years ago • 2 comments

My proposal to support various puzzles would be that the colorscheme is a user-puzzle-colorscheme table where colorscheme is an array of colors.

coder13 avatar Aug 28 '20 04:08 coder13

Do you have a list of colors that you think should be available? Looks like these were the colors on the current algdb.net.

8-28-2020 7-54-44 AM

big213 avatar Aug 28 '20 11:08 big213

Updated the schema here: 73c68b4

The colors are represented by a stringified array of color codes, so like [1,2,3,4,5]. Another approach is to make the colors its own table and then create a proper link between user, puzzle, and color, but I figured the stringified array would be more efficient and it suits the purpose just fine.

Yet another approach, which would be the most efficient on the backend, would be to store the color schemes as a stringified JSON object in the user table, and there could be validation to ensure the object has been formatted properly, etc.

big213 avatar Aug 28 '20 12:08 big213