• Post Reply Bookmark Topic Watch Topic
  • New Topic

Background Color changing  RSS feed

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create an applet where the background starts off white and then slowly fades into black, and then in slowly fades into white again. I realize I need to do this in a separate thread, but does anyone know how to set up the rgb values for this. I imagine you would have to use some for loops. Any help would be appreciated.
- Thanks SEan
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

for loop huh!
from RGB Code for White "#FFFFFF"
to RGB Code for Black "#000000" (zero not letter O)
and back.
Thats all I know not sure how you could do this.
regds.
- satya
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks anyways. I've seen it done. and I know the values for white and black, but I'm not sure how to iterate through them to go from white to black and vice versa. I have no interest on hitting all the colors on the spectrum, just white to black and black to white, but in a way that they fade into each other.
So if anyone knows how to iterate through this, please let me know. Thanks.
-Sean
 
kate damond
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Any rgb value of the form 'nnnnnn' is a shade of grey between black and white e.g. you could go 000000, 111111, 222222 .... etc to fade from one to the other
Kate
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kate,
Thanks for your help. I think that was just the info I was looking for. I'll give it a try. Thanks again.
- Sean
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sean:
If its not a trade scret or something could you
please share your thoughts(need not be the code
but your process). I am so curious that I am trying
to solve this problem.
For now this is the way I am thinking:

Am I close ?
- sayta
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no secrets involved here. I'm really not sure what I'm doing either. If you go over to the java boutique and look at some of the applets under text effects, some of them have text that fades from light to dark etc. I was trying to implement that same effect. I'm not exactly sure how it is done yet, but some of the people there are nice enough to post some of their source code, so maybe that would give you a better idea what I was thinking. Sorry if I've confused you. When I figure it out, I'll post the code for you.
- Sean
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!