I used the Color fading extension to change the RGBs, but I wish the right colors would show up in the art editor. Is there a way to do this in JavaScript?
(Gray Scale Example) https://makecode.com/_h8MdpuJyaYsp
I used the Color fading extension to change the RGBs, but I wish the right colors would show up in the art editor. Is there a way to do this in JavaScript?
(Gray Scale Example) https://makecode.com/_h8MdpuJyaYsp
You can make the change in JavaScript and then go back to blocks, but it’s a little tricky.
First, get your colors. You need to have 15 colors in the format #FFFFFF
. For this example I’ll be using these grayscale colors:
#FFFFFF
#EDEDED
#DBDBDB
#C8C8C8
#B6B6B6
#A4A4A4
#929292
#808080
#6D6D6D
#5B5B5B
#494949
#373737
#242424
#121212
#000000
We are going put these colors into the pxt.json
for the project. This is a configuration file that is saved in every project that contains things like the project name, description, list of files, etc.
once again:
Okay, with that out of the way we need to put these into the format that we can copy/paste in that file:
,"palette": [
"#000000",
"#FFFFFF",
"#EDEDED",
"#DBDBDB",
"#C8C8C8",
"#B6B6B6",
"#A4A4A4",
"#929292",
"#808080",
"#6D6D6D",
"#5B5B5B",
"#494949",
"#373737",
"#242424",
"#121212",
"#000000"
]
The first color in that list should always be #000000
(that color is used for transparency and you can’t change it). The next 15 colors should be the ones you are trying to use. So, in total, there are 16 colors in this list. I recommend that you copy and paste the example I gave here and put your colors into it. The commas, quotation marks, and square brackets all need to be just as they appear in this example
Now let’s insert this into our pxt.json
. For a third and final time:
pxt.json
}
}
)Here is GIF of me doing this:
This really helps, thanks!
Can you like add a color for me with my pokemon? I really don’t want to risk my project and all my coloring stuff.
This is me copying my projects just in case.
If you add gray, you will have to take away one color.
The dark purple I won’t use so that might be what I want to take away
will this work on devices like the brainpad?
is this good?
changing the palette via pxt.json
(or whatever file it is) or the color fading
extension works on hardware.
I don’t know what to look at in this game
ok now I see it. Do you think you can make the gray a bit darker?
This kind of gray but darker
could you maybe give me a hex code so i can put it in?
What’s a hex code?
if you look it up, it’s basically a code for a certain color like #000000 i think is the code for black and #ffffff is pure white
Oh Wow!! Is that how you chose your color palette?
No, it’s just to find hex, RGB and HSL
Hi @richard!
Can you paste the normal color palette here, please? I’m going to need it so then I can edit the palette for myself. I’m starting to get the hang of it (thankfully it hasnt crashed my game yet…) I feel like its going to happen at some point. lol
And thanks @GameGod for sharing me the website to find hexes