Welcome to Kinmunity

Kinmunity is an online community resource for otherkin, therianthropes, the other-hearted, vampires, plural systems, and others with non-human identities. By signing up, you'll be able to participate in the largest and most active otherkin community on the internet. We provide forums, personal profiles, blogs, an image gallery, and a live chatroom to our registered members. Signing up is really fast, why not join us? All are welcome on Kinmunity!

kiror

rejected
Rainbowfied text

This one may have a very good acceptance between the kinmunity members. The code is written in python3 (the fastest way I implemented it).

To the code:

[spoiler=Code with bug]

#!/usr/bin/python3
# -*- coding: utf-8 -*-

from sys import argv as argv

lbbc=[]

def initListOfColors():
   global lbbc
   lbbc=[]
   for i in range(0,256):
       lbbc+=[[255-i,i,0]]
   for i in range(0,256):
       lbbc+=[[0,255-i,i]]
   lbbc=["{:02x}".format(k[0])+
         "{:02x}".format(k[1])+
         "{:02x}".format(k[2]) for k in lbbc]
   return #len(lbbc)==512

def bbcode_txt_lolcat(text):
   o=""
   traveler=20
   for i in range(len(text)):
       o+="[color=#"+lbbc[(i*traveler)%len(lbbc)]+"]"+text[i]+"[/color]"
   return o

def main():
   if len(argv)!=2:
       print("This program takes only one argument.")
   else:
       initListOfColors()
       txt=argv[1]
       o=bbcode_txt_lolcat(txt)
       print(o)
   return

if __name__=="__main__":
   main()

 

Bugfixed:

#!/usr/bin/python3
# -*- coding: utf-8 -*-

from sys import argv as argv

lbbc=[]

def initListOfColors():
   global lbbc
   lbbc=[]
   for i in range(0,256):
       lbbc+=[[255-i,i,0]]
   for i in range(0,256):
       lbbc+=[[0,255-i,i]]
   for i in range(0,256):
       lbbc+=[[i,0,255-i]]
   lbbc=["{:02x}".format(k[0])+
         "{:02x}".format(k[1])+
         "{:02x}".format(k[2]) for k in lbbc]
   return;
   #len(lbbc)==768


def bbcode_txt_lolcat(text):
   o=""
   traveler=20
   for i in range(len(text)):
       o+="[color=#"+lbbc[(i*traveler)%len(lbbc)]+"]"+text[i]+"[/color]"
   return o

def main():
   if len(argv)!=2:
       print("This program takes only one argument.")
   else:
       initListOfColors()
       txt=argv[1]
       o=bbcode_txt_lolcat(txt)
       print(o)
   return

if __name__=="__main__":
   main()

 

Bugfix in rainbow (before and after):

###################################################

###################################################

 

How I used it via terminal:

user@domain:~/Documents/bbcode/rainbowfy$ python3 rbfy.py "This one may have a very good acceptance between the kinmunity members. The code is written in python3 (the fastest way I implemented it)."

0

Share this post


Link to post
Share on other sites

That is pretty impressive. My one and only conceivable gripe with this would be that it's occasionally hard to read against the forum posts' colors. I use the dark skin myself, and the blue range kind of fades out against it.

 

But it's wicked cool regardless. Three and a half thumbs up! (ew)

0

Share this post


Link to post
Share on other sites

Considering we already have to discourage the use of excessive coloring for readability in introduction posts and similar, this suggestion isn't going to be implemented.

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.