About

This plugin handles colors

Color Codes

Ansi

colorregularbold
Red@r@R
Green@g@G
Yellow@y@Y
Blue@b@B
Magenta@m@M
Cyan@c@C
White@w@W

xterm 256

  • @x154 - make text color xterm 154
  • @z154 - make background color xterm 154

Commands

colors

example


usage: #bp.colors.example [-h]

show color examples

optional arguments:
  -h, --help  show help (default: False)

show


usage: #bp.colors.show [-h]

show colors

optional arguments:
  -h, --help  show help (default: False)

Base

api


usage: #bp.colors.api [-h] [api]

list functions in the api

positional arguments:
  api         api to get details of

optional arguments:
  -h, --help  show help (default: False)

help


usage: #bp.colors.help [-a] [-c] [-h]

show help info for this plugin

optional arguments:
  -a, --api       show functions this plugin has in the api (default: False)
  -c, --commands  show commands in this plugin (default: False)
  -h, --help      show help (default: False)

inspect


usage: #bp.colors.inspect [-m METHOD] [-o OBJECT] [-s] [-h]

inspect a plugin

optional arguments:
  -m METHOD, --method METHOD
                        get code for a method
  -o OBJECT, --object OBJECT
                        show an object of the plugin, can be method or
                        variable
  -s, --simple          show a simple output (default: False)
  -h, --help            show help (default: False)

reset


usage: #bp.colors.reset [-h]

reset the plugin

optional arguments:
  -h, --help  show help (default: False)

save


usage: #bp.colors.save [-h]

save the plugin state

optional arguments:
  -h, --help  show help (default: False)

set


usage: #bp.colors.set [-h] [name] [value]

change a setting in the plugin

if there are no arguments or 'list' is the first argument then
it will list the settings for the plugin

positional arguments:
  name        the setting name (default: list)
  value       the new value of the setting

optional arguments:
  -h, --help  show help (default: False)

stats


usage: #bp.colors.stats [-h]

show plugin stats

optional arguments:
  -h, --help  show help (default: False)

API

convertcolors


colors.convertcolors(tstr)

    convert @ colors in a string


original defined in plugins/core/colors.py

lengthdiff


colors.lengthdiff(colorstring)

    get the length difference of a colored string and its noncolor equivalent


original defined in plugins/core/colors.py

stripcolor


colors.stripcolor(text)

    strip @ colors


original defined in plugins/core/colors.py

iscolor


colors.iscolor(color)

    check if a string is a @ color, either xterm or ansi


original defined in plugins/core/colors.py

ansicode


colors.ansicode(color, data)

    return an ansi coded string


original defined in plugins/core/colors.py

stripansi


colors.stripansi(text)

    strip all ansi from a string


original defined in plugins/core/colors.py

colortohtml


colors.colortohtml(sinput)

    convert colorcodes to html


original defined in plugins/core/colors.py

convertansi


colors.convertansi(text)

    convert ansi color escape sequences to @ colors


original defined in plugins/core/colors.py