Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Convert hexidecimal code to color effect
- ScriptWriter
-
10 posts
Convert hexidecimal code to color effect
I don't know if this is possible, but if it is, can someone build a script that will make a sprite have effects on it that will make it the color of the hexidecimal code (like BBCode colors???) Thank you very much!
- kayybee
-
1000+ posts
Convert hexidecimal code to color effect
It's fairly easy to make a hex to dec converter, hopefully you know how.
Because the color effect accepts numbers through operators, drag in a + operator then another one in one of the slots.
The red value gets multiplied by 256^2, the green multiplied by 256, and all added to the blue. Does that make sense?
Because the color effect accepts numbers through operators, drag in a + operator then another one in one of the slots.
The red value gets multiplied by 256^2, the green multiplied by 256, and all added to the blue. Does that make sense?
- turkey3
-
1000+ posts
Convert hexidecimal code to color effect
If you search color picker, there is a color-picker.com that shows the code.
Last edited by turkey3 (July 22, 2013 01:49:11)
- kayybee
-
1000+ posts
Convert hexidecimal code to color effect
I think he wants one in his project, so the user can enter a hex color and get a color back, or something. If you search color picker, there is a color-picker.com that shows the code.
- ScriptWriter
-
10 posts
Convert hexidecimal code to color effect
I think he wants one in his project, so the user can enter a hex color and get a color back, or something.
Yes, that is what I am looking for. Is this possible, or is it completely impossible to do (sounds like something that would be)???
- FireNinjaGAME
-
100+ posts
Convert hexidecimal code to color effect
Hey there ScriptWriter!
This might be a bit complex, I sure don't know how to do it.
Just saying!
This might be a bit complex, I sure don't know how to do it.
Just saying!
Last edited by FireNinjaGAME (July 23, 2013 19:37:20)
- ScriptWriter
-
10 posts
Convert hexidecimal code to color effect
Hey there ScriptWriter!
This might be a bit complex, I sure don't know how to do it.
Just saying!
Yikes! I am really trying to find out how to do this.
I am going to ask for this to be moved to Help for Scripts, people who will help me there might be better at this. Even though I am an existing Scratcher, this is something I never bothered to learn how to do.
- mitchboy
-
1000+ posts
Convert hexidecimal code to color effect
Hah… I see what you did there…Yikes! I am really trying to find out how to do this.. Hey there ScriptWriter!
This might be a bit complex, I sure don't know how to do it.
Just saying!
I don't really know how to do this, but I'll quote kayybee's earlier post in case you didn't see it:
It's fairly easy to make a hex to dec converter, hopefully you know how.
Because the color effect accepts numbers through operators, drag in a + operator then another one in one of the slots.
The red value gets multiplied by 256^2, the green multiplied by 256, and all added to the blue. Does that make sense?
- fleurymarc
-
71 posts
Convert hexidecimal code to color effect
I don't know if this is possible, but if it is, can someone build a script that will make a sprite have effects on it that will make it the color of the hexidecimal code (like BBCode colors???) Thank you very much!
I don't believe this is possible. At least, not for all colors. For instance, there does not seem to be a sprite effect that will make the sprite white.
–
Marc.
- Psiborg
-
500+ posts
Convert hexidecimal code to color effect
I agree. You'll notice that when you apply a colour effect it does not change any black or white in your sprite just the colours. Infact the colour effect cycles through 200 shades before getting back to where you started. By iterating through a loop 200 times and stamping your sprite it is easy to see all the possible colours you can achieve with that sprite. I don't believe this is possible. At least, not for all colors. For instance, there does not seem to be a sprite effect that will make the sprite white.
- footsocktoe
-
1000+ posts
Convert hexidecimal code to color effect
1. Create a short project that will put all 200 colors on the screen in order.
2. Take a screenshot.
3. Use the eyedropper tool of a Paint program on the screenshot to find the 200 different hex codes.
4. In the project create a list of the two hundred codes with the item # corresponding to the color effect #
5. When user enters hex code, it is found in the list, then the item # used to generate the color effect.
2. Take a screenshot.
3. Use the eyedropper tool of a Paint program on the screenshot to find the 200 different hex codes.
4. In the project create a list of the two hundred codes with the item # corresponding to the color effect #
5. When user enters hex code, it is found in the list, then the item # used to generate the color effect.
- turkey3
-
1000+ posts
Convert hexidecimal code to color effect
It's not just colors, but shades which effect it, which gives it 1. Create a short project that will put all 200 colors on the screen in order.thousands of colors.
2. Take a screenshot.
3. Use the eyedropper tool of a Paint program on the screenshot to find the 200 different hex codes.
4. In the project create a list of the two hundred codes with the item # corresponding to the color effect #
5. When user enters hex code, it is found in the list, then the item # used to generate the color effect.
- footsocktoe
-
1000+ posts
Convert hexidecimal code to color effect
@turkey3… The RGB system with 8 bits for each color is 256x256x256 colors and includes ALL the shades and tints possible in it. In hex, of course, it is a 6-digit hexadecimal number, 2 hex digits each for R ,G, and B.
Now the way I interpreted his post was he wanted to have someone input a hex number and then have the sprite turn that color.
But SCRATCH only has 200 color effect hues, each of which can have various shades and “tints” (brightness?), right? So the first task would be to discover what the actual colors were that Scratch uses.
If it was me, I would only choose one or two fixed shades. Then there would be 400 or 600 colors total to worry about.
Once I had the hex values of those 600 colors, obtained with screenshots and a paint program (again, this is me doing it) I could take the user's hex input and match it to which of my 600 hex values was closest to his hex input, then give him the color effect he wanted.
The average person does not have sufficiently good color discrimination to distinguish accurately between so many different colors. I am sure I could shave it down even further without the user noticing any change.
I would select 33 hues and give each one two shades for a total of 99 colors… plus white for 100.
But this is all headwork. I haven't written one scrap of code to implement it. o_O
Now the way I interpreted his post was he wanted to have someone input a hex number and then have the sprite turn that color.
But SCRATCH only has 200 color effect hues, each of which can have various shades and “tints” (brightness?), right? So the first task would be to discover what the actual colors were that Scratch uses.
If it was me, I would only choose one or two fixed shades. Then there would be 400 or 600 colors total to worry about.
Once I had the hex values of those 600 colors, obtained with screenshots and a paint program (again, this is me doing it) I could take the user's hex input and match it to which of my 600 hex values was closest to his hex input, then give him the color effect he wanted.
The average person does not have sufficiently good color discrimination to distinguish accurately between so many different colors. I am sure I could shave it down even further without the user noticing any change.
I would select 33 hues and give each one two shades for a total of 99 colors… plus white for 100.
But this is all headwork. I haven't written one scrap of code to implement it. o_O
- BKFighter
-
1000+ posts
Convert hexidecimal code to color effect
hiPlease don't necro post and spam. It buries people who need help down farther, and can get you muted.
- Afrandomdude284637
-
1 post
Convert hexidecimal code to color effect
What color affects number corresponds to green
- awesomefreedownloads
-
1 post
Convert hexidecimal code to color effect
There was actually a griffpatch video that talked about this. it is this onei www.youtube.com/watch?v=aBTh756kCZw (am i allowed to post these links here???)
- Discussion Forums
- » Help with Scripts
-
» Convert hexidecimal code to color effect