Thread: Rainbow Text [Easy]

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 Rainbow Text [Easy] 
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    Welcome to the rainbow text thread. This is a very simple program that automatically puts a rainbow on your text, i dedicated this program for the shoutbox but its very limited :/

    You can also use this for theads like i have done :), Anyway here is the source code


    Code:
    import java.util.Scanner;
    
    /**
     * A very simple class dedicated to the rune-server shoutbox
     * Keep in mind the shoutbox limits you
     * @author zack/Optimum
     *
     */
    public class RainbowText {
    	
    	/**
    	 * This will keep a track of the next colour to add
    	 */
    	private static int colorIndex = 0;
    	
    	/**
    	 * A list of the all the possible colours
    	 */
    	private final static String[] COLOURS = {
    		"#FF2B21","#FF7C21","#FFDD56",
    		"#B4FF00","#00FF48","#00C2EF", "#0050EF",
    		"#6F09EF", "#E909FF"
    	};
    	
    	/**
    	 * This will find the next colour to add to
    	 * the character
    	 * @return 
    	 * 			- the colour string to add
    	 */
    	private static String applyColour(){
    		colorIndex++;
    		if(colorIndex >= COLOURS.length)
    			colorIndex = 0;
    		return COLOURS[colorIndex];
    	}
    	
    	/**
    	 * This will check the console for inputs and
    	 * add the next colour in line to the character
    	 * @param args
    	 */
    	@SuppressWarnings("resource")
    	public static void main(String[] args){
    		Scanner s = new Scanner(System.in);
    		while(s.hasNext()){
    			String letter = s.next();
    				System.out.print(" ");
    			for (int i = 0; i < letter.length(); i++)
    				System.out.print("[color=" + applyColour() + "]" + letter.substring(i, i + 1) + "[/color]");
    		}
    	}
    	
    }


    or use monochromatic: Testing my monochromatic colour scheme. This shall be sick

    Just by replacing this:

    Code:
    	private final static String[] COLOURS = {
    		"#ffffff","#ffe5e5","#ffcccc",
    		"#ffb2b2","#ff9999","#ff7f7f",
    		"#ff6666", "#ff4c4c", "#ff3232",
    		"#ff1919", "#ff4c4c", "#ff6666",
    		"#ff7f7f", "#ff9999", "#ffb2b2",
    		"#ffcccc", "#ffe5e5",
    	};

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Banned
    Join Date
    Jul 2014
    Posts
    437
    Thanks given
    200
    Thanks received
    76
    Rep Power
    0
    Wow nice.
    Reply With Quote  
     

  4. #3  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    Enjoy getting pruned and probs eventually banned in sb
    Attached image
    Reply With Quote  
     

  5. #4  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    Quote Originally Posted by Kaleem View Post
    Enjoy getting pruned and probs eventually banned in sb
    Fight me


    but thanks for the heads up

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  6. #5  
    Donator


    Join Date
    Mar 2013
    Age
    24
    Posts
    1,767
    Thanks given
    335
    Thanks received
    386
    Rep Power
    318
    1. You're not closing the input stream when you're finished with the program, which pretty much means the program is running even after its finished. Rather you add a suppressed warning and ignore it..
    2. Change the method "applyColor" to public or else it has no use.
    2. IT DOESN'T WORK!
    Reply With Quote  
     

  7. #6  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    Quote Originally Posted by Paramvir View Post
    1. You're not closing the input stream when you're finished with the program, which pretty much means the program is running even after its finished. Rather you add a suppressed warning and ignore it..
    2. Change the method "applyColor" to public or else it has no use.
    2. IT DOESN'T WORK!
    1. Its suppose to be that way so you can keep it running and you dont need to re run it
    2. Its 1 class, everything can be private with a use
    3. It works. Ive tested it so many times and commented so many times



    Just to proove that it works. I would not honestly waste my time making all this coloured myself. That would take awhile

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  8. #7  
    Donator


    Join Date
    Mar 2013
    Age
    24
    Posts
    1,767
    Thanks given
    335
    Thanks received
    386
    Rep Power
    318
    Quote Originally Posted by Optimum View Post
    1. Its suppose to be that way so you can keep it running and you dont need to re run it
    2. Its 1 class, everything can be private with a use
    3. It works. Ive tested it so many times and commented so many times



    Just to proove that it works. I would not honestly waste my time making all this coloured myself. That would take awhile
    I thought you meant it would change the color in the terminal. Well the applyColor() would make more sense if it were public, so It could be used outside of the class as well.
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Jan 2014
    Posts
    44
    Thanks given
    2
    Thanks received
    8
    Rep Power
    14
    That's pretty cool man thanks for this


    Reply With Quote  
     

  10. #9  
    Banned

    Join Date
    Nov 2009
    Posts
    1,800
    Thanks given
    7
    Thanks received
    18
    Rep Power
    0
    Looks sexy af but I don't know if it's allowed.
    Reply With Quote  
     

  11. #10  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    Quote Originally Posted by Paramvir View Post
    I thought you meant it would change the color in the terminal. Well the applyColor() would make more sense if it were public, so It could be used outside of the class as well.
    I nah man i didn't even think that colour could be changed, And it's not going to be used outside the class. I can make it public but its good practice to localise everything

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Simple Rainbow Text
    By MGkelly in forum Resources
    Replies: 2
    Last Post: 10-06-2013, 04:00 PM
  2. How to Electrify Text [EASY]
    By ProFiles in forum Tutorials
    Replies: 2
    Last Post: 08-01-2012, 08:23 AM
  3. Making a cool Text Signature - Easy!
    By Ophion in forum Tutorials
    Replies: 17
    Last Post: 11-10-2011, 04:59 PM
  4. Runescape text codes? EASY ++
    By Planet-X in forum Help
    Replies: 4
    Last Post: 05-22-2011, 09:49 PM
  5. New logout text colour(easy)
    By M2PWNS in forum Snippets
    Replies: 24
    Last Post: 06-28-2010, 03:31 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •