Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Color creator
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Talking Color creator - 06-23-2010, 03:20 PM

Or as I would write; colour creator

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 website. Just enter the same values on each one.
Attached Images
File Type: jpg screenshot.jpg (63.9 KB, 66 views)
Attached Files
File Type: a2w colour maker.a2w (222.3 KB, 29 views)


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,186
Join Date: May 2010
Location: e4eaf2
Default 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.


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 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!


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-23-2010, 04:50 PM

Haha, healthy competition is a good motivator, eh?
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 06-23-2010, 04:56 PM

Nice code, Arty! You found the class for colors! Can I implement this into my sandbox program?


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
good
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Thumbs up good - 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.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]

Last edited by arty-fishL; 06-24-2010 at 10:39 AM.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 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.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 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.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 06-24-2010, 02:20 PM

pov is the location variable for each object. Apparently, you can't pickle Alice objects, sadly.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Reply

Tags
color, colour

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.