Discuss Scratch

noahbenben
New Scratcher
1 post

I want to create an image using hex code and color code

(4,6, #817575), (18,18, #162414), (21,10, #958B85), (29,19, #253222)
I was given this information to form an image. i got no idea how to do it. I know these are pixels. the (x,y) are color and #817575 is suppose to be hex code. I was looking on google for answers and it landed me here on scratch. the size of the image is 32x32.
awesome-llama
Scratcher
1000+ posts

I want to create an image using hex code and color code

Hmm. Is this all the information you have got?

I will try to figure it out right here. Also, there is the Advanced Topics subforum here on Scratch where it might be more suited so you are aware.

Firstly, hex numbers are numbers in hexadecimal, or base16. Decimal numbers which we count with use the 10 numbers, 0 to 9. Hexadecimal uses 16, so the letters A to F are used in addition to 0 to 9.
Counting goes like this: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, … 19, 1A, 1B… and so on. Colours stored in a computer use a special format. Computsr colours are a mixture of red, green and blue (and sometimes alpha - transperancy). These are stored in a hex code, and each colour has an amount. 00 is no colour, and FF is 100% colour of that channel. All colour channels together make a hex colour code. For example, FF0000 makes red, 00FF00 makes green, 0000FF makes blue. FFFFFF is white (equal mix of all colours 100%), and 000000 is black (no colours at all). Colours in between work as well, like these (coloured text matches code):
#90FF00
#00FFFF

Here are the codes that you supplied:
#817575
#162414
#958b85
#253222

Now, what I can assume is the coordinates before the hex codes mean the pixels can be plotted: (O are pixels)

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO


There. The colours are plotted. I don't know what it's supposed to be. Probably some codes are missing.

Last edited by awesome-llama (Dec. 28, 2018 02:12:49)

Powered by DjangoBB