PDA

View Full Version : Color creator


arty-fishL
06-23-2010, 03:20 PM
Or as I would write; colour creator:p

Basically this is a world with three sliders for each RGB color (red, green, blue).
Change each slider by clicking on the appropriate slider and holding the mouse button down then, while doing that, hold the right arrow key to decrease the value (or color level intensity) and left arrow key to increase it.
Above each slider is the RGB value (from 0 to 245).
The screen colours will be set to the RGB values.

Use it as you please.

Also, to test it works, compare the colors to those produced from the color creator on this (http://phys.educ.ksu.edu/vqm/java/colorcreator/vqscp.html) website. Just enter the same values on each one.

DensetsuNoKaboom
06-23-2010, 03:25 PM
It looks pretty good, but you should make it so that you can click and drag the little slider thingies.

zonedabone
06-23-2010, 04:46 PM
Darn! You cracked the color code before me! I'll get you next time, joker! ;)

Really, you finally found out haw to use alice's color class? I've been working on it for ages! I must examine the jython source! Thanks a ton, Arty!

x2495iiii
06-23-2010, 04:50 PM
Haha, healthy competition is a good motivator, eh?

zonedabone
06-23-2010, 04:56 PM
Nice code, Arty! You found the class for colors! Can I implement this into my sandbox program?

arty-fishL
06-24-2010, 10:36 AM
I should really thank you too zone, cos your dir() thing was how I found the color script. Then I made a world that printed out the value of a color as a string, translated it to jython code and stuck it in with my variables and other scripting.

I was hoping that you would want to use my script in your sandbox world, yes it is all free to use. Use the script before the comment that says something about the rest is for setting the text colors, the first part is for setting the color variable; the second part is for setting the text to a color which should stand out against the background.

zonedabone
06-24-2010, 11:53 AM
I disected the ode and I think I know hwot ehc olor class works. To my knowledge: 4 arguements (float) red,green,blue,alpha creates a color class that can go in any color variable. Also, I hope that you like the implementation. Since custom colors is a slightly advanced method, I'm having people enter color codes in hex number format. (i.e. FFFF00) When they enter it, I'm thinking of having a color black that sets itself to it, and then lets you continute using the olor until you need another custom color. I've implemented it, and it works great! I think that for all of the alice classes that are like edu.cmu.cs.stage3.(junkstuffs)[arguements] you can make them with edu.cmu.cs.stage3.(junkstuffs)(arguements) This is great, because we can now make any Alice class in jython! This would include pickling pov variables for use in multiplayer games! Using this method would shorten decoding times, and make multiplayer more of a reality! I'll make an example soon.

arty-fishL
06-24-2010, 01:37 PM
I knew the stuff about the r,g,b,a and all that color stuff; I put a comment above my script saying so, and some of the Alice stuff. I dont want to sound like a n00b or anything, but I dont have a clue what your talking about when you say pov and such gobbledegook.

zonedabone
06-24-2010, 02:20 PM
pov is the location variable for each object. Apparently, you can't pickle Alice objects, sadly.