Hack Forums
Color Tags in Code Tags - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hack Forums Official Information (https://hackforums.net/forumdisplay.php?fid=1)
+--- Forum: Site News (https://hackforums.net/forumdisplay.php?fid=2)
+---- Forum: Suggestions and Ideas (https://hackforums.net/forumdisplay.php?fid=134)
+---- Thread: Color Tags in Code Tags (/showthread.php?tid=3043018)



Color Tags in Code Tags - Fiery Dreamer - Nov 23, 2012

If possible, could we have it so we can color certain areas in our code tags? That way, we can draw attention to important areas of code or have a different color for comments and such.
Examples:
Code
    public static void add_arrays(){
        int array1[] = {
                5,
                6,
                7,
                8,
        };

        [color=#FF0000]int array2[] = {[/color]
                12,
                15,
                17,
                19,
        };

        int counter = 0;
        int sum;
        for(int x: array1){
            [u]sum = array1[counter] + array2[counter];[/u]
            System.out.println(array1[counter] + " + " + array2[counter] + " = " + sum);
            [color=#32CD32]counter += 1;[/color]    
        }
[color=#6B8E23]//This should be a colored comment.[/color]



* - Xerotic - Nov 23, 2012

Point of code tags is raw text.