hackclub / sprig

šŸƒ Learn to code by making games in a JavaScript web-based game editor.
https://sprig.hackclub.com
MIT License
900 stars 1.06k forks source link

Expand Color Palette #323

Closed Omay238 closed 2 years ago

Omay238 commented 2 years ago

This may not be possible with sprig hardware, but adding different shades of already integrated colors would be very useful for things such as shading and details.

leomcelroy commented 2 years ago

I've been looking at other color palettes actually. Unfortunately changing them would adjust how people's games look but we could try to match the general colors of the current palette with a more carefully designed one.

Here are a few I was studying for inspiration:

https://androidarts.com/palette/16pal.htm

https://www.getty.edu/research/exhibitions_events/exhibitions/bauhaus/new_artist/form_color/color/

https://yeun.github.io/open-color/#gray

https://pico-8.fandom.com/wiki/Palette

leomcelroy commented 2 years ago

What colors would you add?

Omay238 commented 2 years ago

I'm not sure what colors I would add, but a question: are more than 16 colors possible?

leomcelroy commented 2 years ago

It's possible yes. We limit the colors as a design constraint but technically the limit is the number of characters.

Omay238 commented 2 years ago

How many total colors would be possible?

Omay238 commented 2 years ago

I made a pretty similar one that could preserve old art if the colors were put correctly here.

Omay238 commented 2 years ago

The colors in hex are:

#000000
#555555
#aaaaaa
#FFFFFF
#800000
#C00000
#FF0000
#008000
#00C000
#00FF00
#000080
#0000C0
#0000FF
#808000
#C0C000
#FFFF00
#008080
#00C0C0
#00FFFF
#800080
#C000C0
#FF00FF
leomcelroy commented 2 years ago

How did you choose these? Are they just evenly spaced?

Omay238 commented 2 years ago

I got the half and three quarters brightness versions of all the original colors. I also changed the lighter gray to be a bit brighter.

Omay238 commented 2 years ago

I do like the original. It's a nice amount of pure colors that can be used for simple art. My additions would probably just be used for shading.

Omay238 commented 2 years ago

Do you think you could have up to 36, letters and numbers? I'm trying to make a new palette that is more diverse.

LucasHT22 commented 2 years ago

@Omay238 I suggest adding these colors:Screenshot_20220914-190758~2.png

zachlatta commented 2 years ago

Is there a technical constraint preventing us from supporting all colors?I know there is a vibrant community of people who love pixel art - especially middle schoolers, and Iā€™d love for pixel art to be a ā€œhandleā€ for them to grasp to get deeper into their Sprig games. SeeĀ https://www.pixilart.com/Ā for an example.For that to happen, I think we would need to be able to support arbitrary colors.On Sep 14, 2022, at 18:10, Lucas @.***> wrote:ļ»æ @Omay238 I suggest adding these colors:

ā€”Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Omay238 commented 2 years ago

I don't know how hard this would be, but a potential solution is have some sort of function (like setPalette()) to change the palette to some custom one. From what I understand, the colors used can be changed, using sprig hardware, but it would just be a matter of software.

leomcelroy commented 2 years ago

We can't do arbitrary colors because there needs to be a map to characters, at this point some of the color constraints are baked into firmware as well though that's more of an implementation constraint as opposed to something inherent to the problem.

That's good thinking Leonard there actually is a setPalette function which Ced and I discussed documenting. It should just work though I'm forgetting where we landed on exposing it. I do think the limited palette helps people with creativity (limitations effect in this way being a theme of the whole system).

leomcelroy commented 2 years ago

I've consistently settled on less than 16 colors being preferable. I'd like to take a closer look at the palettes you're (@Omay238) suggesting though. It's possible to have 36 yes though that many would involve changes to the interface I think.

LucasHT22 commented 2 years ago

@leomcelroy I agree that the reduced palette helps people with creativity, but at least brown should be added, because without brown you can't make a tree

Omay238 commented 2 years ago

I tested a new color palette, which just adds darker shades and browns, which you can see doesn't really make it easier to make art, but the abilities are just greatly expanded. It also doesn't require extra code for making it look good. I think that was already changed with my issue about lots of sprites. colors

Omay238 commented 2 years ago

I can make a PR with the updated palette.

LucasHT22 commented 2 years ago

@Omay238 , just a small formatting error, in the formatting from the current color palette, has 6 colors per row, while yours has only 5 Screenshot_20220920-064358~2.png Screenshot_20220920-064213~3.png

leomcelroy commented 2 years ago

On the formatting, I think that's just the flex box.

@Omay238 could you trim it down to 16 colors? I like what you're doing but it feels it's getting away from the minimalism.

leomcelroy commented 2 years ago

Maybe two shades for each?

Omay238 commented 2 years ago

Ok, I could do that. I'll send a new preview for it.

Omay238 commented 2 years ago

I feel like this one allows more detail than the original, and it is 16 different colors. How do you feel about it? colors2

LucasHT22 commented 2 years ago

Keep at least 1 shade of brown, without brown you can't make a tree or woods, it's a big barrier

leomcelroy commented 2 years ago

@Omay238 Thanks so much for pushing this issue! I've been really wanting to make the palette nicer and spent a couple hours looking at your suggested palettes and the feedback others gave this week. @kognise and I integrated that into the editor today and you can see the new palette on this branch.

Screen Shot 2022-09-23 at 12 22 14 PM

What do you think?

LucasHT22 commented 2 years ago

Good color palette, doesn't lose Sprig simplicity

Omay238 commented 2 years ago

I agree. It looks pretty good. Anyways, I'll close this issue now.