docs/colors.rst
author Radek Brich <radek.brich@devl.cz>
Sat, 15 Mar 2014 15:28:20 +0100
changeset 85 6828c5b16087
parent 7 d4a291b31cbb
permissions -rw-r--r--
Add colors to curses demo.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
Colors
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
======
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
backend.setcolor(name, description)
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
  This will parse description, prepare attributes and save them under 'name'.
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
  Description is in format <foreground> "on" <background> "," <attributes>.
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
  For example:
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
    "black on cyan"
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
    "white on cyan" or "gray on cyan, standout" (equivalent)
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
    "yellow on red, underline, blink"
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    13
backend.pushcolor(name)
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    14
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    15
backend.popcolor()
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    17
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    18
Default theme
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    19
-------------
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    20
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    21
menu-normal - black on cyan
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    22
menu-highlight - white on cyan
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    23
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    24
window-normal - gray on blue
d4a291b31cbb New color management - named colors.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    25
window-highlight - white on blue