Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

More On Colors

posted by CaptTofu on 11:52 AM July 19th, 2000   Printer-friendly   Email story
clustersnarf writes "I finally get work on customising the look and feel of slash. I find that the color limitations are very distressing. The color selection is prolly fine for most lighter colored sites. My site is a lot darker than slashdot and slascode. After messing with the colors for many moons I finally decided that editing the slashboxes manually is the only way to go for total color coordination."
"Something that hit me was this: If i change the slash_colors slashbox and add colors, then use the schema of
COLOR="$I{bg}[X]"
how would that affect the site colors section? would my extra colors be over written? And why arent there semi-global color types? I would think that a semi global text and link separation would be a good thing. The existance of the FG and BG as monikers is a little confusing... and changing one wrong can make a big mess... Why not add specific color types... as in text, link, etc...

--editing lots of slashboxes by hand
--ClusterSnarf"

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • Why cant we just use table borders? This may be a IE only tag, not sure...
  • Doesn't the GD library generate graphics on the fly? Maybe it's not called GD, but I'm referring to the library that generates graphics for MRTG.

    Maybe we could implement something like that. Or maybe it's a really stupid suggestion. Sorry, I've had a long weekend.
  • bad html in my post (table border="1" bordercolor="$color") s/(//
  • I remember seeing something like this. But instead of creating the graphics on the fly, wouldn't it be better to just create a script that would replace the original graphics with ones of a new color scheme? This could possibly be put into the contrib directory for now and eventually linked to the backslash interface.
  • I copied your code to a test page I have... i think the real solution is to nest the tables...

    Look at the difference here:

    http://flogeeks.org/~djpowell/table.html [flogeeks.org]

    dp

  • by Anonymous Coward
    Nesting tables *will* work:

    <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#000000><TR><TD>
              <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#000000>
                        <TR><TD>
                                  Insert your table stuff here.
                        </TD></TR>
              </TABLE>
    </TD></TR></TABLE>

    *But*nesting tables can cause serious slowdowns because the browser must do a lot of rendering. With the number of tables that can end up on a page, I would not recommend nesting the tables like this.
  • You're thinking of onlinephotolab.com
  • bordercolor seems to be an IE only Tag...

    But I dont see any reason why we cant just tell a table that the bgcolor is X and that the TD bgcolors are Y and then the border around the table and inbetween TRs and TDs will be the Table BG color...

  • That's far from all of them. I spent some time in the images directory, looking at each image and changing them one-by-one, then reloading apache and watching the changes.

    Look at them all. If they have the slash maroon color, change them.

  • Because this HTML:

    <h2>Tables & Tribulations</h2>
    <table border=0 cellpadding=2 cellspacing=2 bgcolor=blue>
    <tr>
    <td bgcolor=red>text in the first cell</td>
    <td bgcolor=red>text in the second cell</td>
    </tr>
    </table>

    works as you hope in IE, but in Netscape (4.73 on Win98 and 4.61 on Linux) the blue border doesn't appear at all.

    ai731
    --
    my .sig lives in my /. account

  • by Anonymous Coward
    I've changed the default colours on my slash site, but the horizontal borders of the various boxes still show up as the slashcode maroon red. Any idea how to fix this easily?
  • I've changed the default colours on my slash site, but the horizontal borders of the various boxes still show up as the slashcode maroon red. Any idea how to fix this easily?

    The .gifs you need to edit to change the colour of the horizontal borders are "images/sr.gif" and "images/sl.gif".

    cheers,
    ai731
    --
    my .sig lives in my /. account

  • Ok, I didnt realize that all these little graphics have diffrence shades of maroon.

    I found 3 shades that can be changed. If you find more, then add them to this perl script.

    The following perl script will spit out the convert commands which can be piped to shell.

    IMPORTANT: These commands will make changes to the files.
    Please save a copy of them first in a different place.
    You will also need the origional images, if you want to change the color to a different color.

    I know its a dirty hack, but hey, its late here.
    save the following script to some file perhaps called chcol
    place the file in slash/images directory
    chmod +x the file
    and run
    ./chcol newcolor
    or
    ./chcol "#FF6600"

    When you are happy with the output , simply pipe it to shell.
    ./chcol newcolor | sh
    You can display the result with the command
    display "vid:*.gif"

    #!/usr/bin/perl
    die "usage: chcol '#RRGGBB'\n" unless @ARGV;
    my @colors_to_change=("66/00/00", "65/02/06", "42/00/00");
    my $new_color=shift;
    if ($new_color=~/^#/){
      $new_color=~s/#(\w\w)(\w\w)(\w\w)/RGB:\1\/\2\/\3/g ;
    }
     
    for (<*.gif>){
        for my $color(@colors_to_change){
            print "convert -opaque RGB:$color -pen $new_color $_ $_\n";
        }
    }
    __END__
                                                                                                                                                                                                                                                           

    vote for your favourite perl-site http://www.perl.ch/links
    --
    vote for your favourite perl-site http://www.perl.ch/links
  • Does anyone else thing that it might be a good idea to make a site where you can look at the colors and d/l gz files that correspond with the colors with all of the necessary modifications. In order to get a bunch of them, all the would be needed is a way for people to upload theirs to the site and then a way for the site to display a sample of them. (a slashbox)
  • if you have imageMagick installed, then you can use the convert utility.

    cd slash/images
    mkdir origional
    cp * origional
    cd origional
    ls *.gif | awk '{print "convert -opaque RGB:66/0/0 -pen black "$1 " ../"$1}' | sh

    Change "black" to whatever color you want (if it is defined in your X server's rgb.txt file).


    vote for your favourite perl-site http://www.perl.ch/links
    --
    vote for your favourite perl-site http://www.perl.ch/links
  • My thought though was that you could give slash a hex value, and it would change the header colors to that and then generate the new graphics based on that hex value.
  • by Anonymous Coward
    Does anyone know how to work Gimp's script fu really well? Maybe we can write a huge script that does all the changes for us. I agree the gifs are a pain but there should be a way around it.
  • This guy is the first person who has deigned to let me know what I have needed to know for literally months!

    Thanks ai731!
    --.\\-H--
  • Could something like gimp be used so that the colors could get generated from a form on the website?

    A while ago I saw a website that was supposed to house your photos, and let you manipulate the jpgs that you uploaded dynamically. I thought it was using a linux box to do it all. Thought I can't find the URL for it. Anyone recognize what I'm talking about?

    --
    lottadot [lottadot.com]
  • This doesn't even take in to consideration the problems with the graphics. There are at least half a dozen little graphics (cr.gif, cl.gif, etc...) that are slash maroon. You have to remake these graphics from scratch every time you change the built in colors.