Official Theme: default

The default theme is the standard Drawlib theme. We will explain style naming rule at this document.

Colors

The default theme includes 5 colors.

../../../_images/image_colors.png

Theme default color chart

Here is a list of the colors. You can use ColorsThemeDefault to retrieve RGB codes by their names.

  • red: RGB(239, 95, 95)

  • green: RGB(79, 191, 79)

  • blue: RGB(111, 111, 239)

  • black: RGB(0, 0, 0)

  • white: RGB(255, 255, 255)

Here is a color chart:

Style Types

The default theme possesses these style types for all colors:

  • default: Has both border and fill color

  • flat: No border (actually has a white color)

  • solid: Shape has an outline but no fill

  • dashed: Dashed line, dashed outline

Each style type has variations of weight (line width, font weight) except for flat, which doesn’t have a line:

  • light: Half of default’s line width. Font light.

  • default: Font regular.

  • bold: Double the default’s line width. Font bold.

Remember, the style names follow this syntax: <color>_<type>_<weight>. If the color, type, and weight are default, they may not appear in the style name.

Let’s take a look at a matrix with the blue color as an example:

../../../_images/image_matrix1.png

Style type and width

As you can see, each style has these effects:

  • ShapeStyle: Both style and width work.

  • IconStyle: Line width can be controlled with width; flat style makes it fill.

  • LineStyle: Width has an effect; flat style doesn’t support line.

  • TextStyle: Only the default type is supported; width affects font (light/regular/bold).

Although not shown in the example, other styles have these effects:

  • ImageStyle: Similar to ShapeStyle, but the default has no line and fill.

  • ShapeTextStyle: Similar to TextStyle.

You can check which style supports which style class by calling dtheme.print_style_table(). It will generate a matrix of style names and style classes. If x is checked, it means it is supported.

Let’s take a look at the blue example:

+----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+
| class \ name   | blue | blue_light | blue_bold | blue_flat | blue_solid | blue_solid_light | blue_solid_bold | blue_dashed | blue_dashed_light | blue_dashed_bold |
+----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+
| IconStyle      | x    | x          | x         | x         |            |                  |                 |             |                   |                  |
| ImageStyle     | x    | x          | x         | x         | x          | x                | x               | x           | x                 | x                |
| LineStyle      | x    | x          | x         |           | x          | x                | x               | x           | x                 | x                |
| ShapeStyle     | x    | x          | x         | x         | x          | x                | x               | x           | x                 | x                |
| ShapeTextStyle | x    | x          | x         |           |            |                  |                 |             |                   |                  |
| TextStyle      | x    | x          | x         |           |            |                  |                 |             |                   |                  |
+----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+

As you can see, flat doesn’t have a weight(light, bold). It can be used for only IconStyle, ImageStyle, and ShapeStyle.

Here is a tip for remembering the rule:

  • default type supports all classes.

  • flat supports styles that can be filled.

  • solid and dashed support styles that have a line.

Please remember, this naming rule is common in other official themes as well.

Style Names

Here is a list of style names:

style table
 1from drawlib.apis import *
 2
 3dtheme.print_style_table()
 4
 5# +----------------+---+-------+------+------+-------+-------------+------------+--------+--------------+-------------+
 6# | class \ name   |   | light | bold | flat | solid | solid_light | solid_bold | dashed | dashed_light | dashed_bold |
 7# +----------------+---+-------+------+------+-------+-------------+------------+--------+--------------+-------------+
 8# | IconStyle      | x | x     | x    | x    |       |             |            |        |              |             |
 9# | ImageStyle     | x | x     | x    | x    | x     | x           | x          | x      | x            | x           |
10# | LineStyle      | x | x     | x    |      | x     | x           | x          | x      | x            | x           |
11# | ShapeStyle     | x | x     | x    | x    | x     | x           | x          | x      | x            | x           |
12# | ShapeTextStyle | x | x     | x    |      |       |             |            |        |              |             |
13# | TextStyle      | x | x     | x    |      |       |             |            |        |              |             |
14# +----------------+---+-------+------+------+-------+-------------+------------+--------+--------------+-------------+
15
16# +----------------+-----+-----------+----------+----------+-----------+-----------------+----------------+------------+------------------+-----------------+
17# | class \ name   | red | red_light | red_bold | red_flat | red_solid | red_solid_light | red_solid_bold | red_dashed | red_dashed_light | red_dashed_bold |
18# +----------------+-----+-----------+----------+----------+-----------+-----------------+----------------+------------+------------------+-----------------+
19# | IconStyle      | x   | x         | x        | x        |           |                 |                |            |                  |                 |
20# | ImageStyle     | x   | x         | x        | x        | x         | x               | x              | x          | x                | x               |
21# | LineStyle      | x   | x         | x        |          | x         | x               | x              | x          | x                | x               |
22# | ShapeStyle     | x   | x         | x        | x        | x         | x               | x              | x          | x                | x               |
23# | ShapeTextStyle | x   | x         | x        |          |           |                 |                |            |                  |                 |
24# | TextStyle      | x   | x         | x        |          |           |                 |                |            |                  |                 |
25# +----------------+-----+-----------+----------+----------+-----------+-----------------+----------------+------------+------------------+-----------------+
26
27# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
28# | class \ name   | green | green_light | green_bold | green_flat | green_solid | green_solid_light | green_solid_bold | green_dashed | green_dashed_light | green_dashed_bold |
29# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
30# | IconStyle      | x     | x           | x          | x          |             |                   |                  |              |                    |                   |
31# | ImageStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
32# | LineStyle      | x     | x           | x          |            | x           | x                 | x                | x            | x                  | x                 |
33# | ShapeStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
34# | ShapeTextStyle | x     | x           | x          |            |             |                   |                  |              |                    |                   |
35# | TextStyle      | x     | x           | x          |            |             |                   |                  |              |                    |                   |
36# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
37
38# +----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+
39# | class \ name   | blue | blue_light | blue_bold | blue_flat | blue_solid | blue_solid_light | blue_solid_bold | blue_dashed | blue_dashed_light | blue_dashed_bold |
40# +----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+
41# | IconStyle      | x    | x          | x         | x         |            |                  |                 |             |                   |                  |
42# | ImageStyle     | x    | x          | x         | x         | x          | x                | x               | x           | x                 | x                |
43# | LineStyle      | x    | x          | x         |           | x          | x                | x               | x           | x                 | x                |
44# | ShapeStyle     | x    | x          | x         | x         | x          | x                | x               | x           | x                 | x                |
45# | ShapeTextStyle | x    | x          | x         |           |            |                  |                 |             |                   |                  |
46# | TextStyle      | x    | x          | x         |           |            |                  |                 |             |                   |                  |
47# +----------------+------+------------+-----------+-----------+------------+------------------+-----------------+-------------+-------------------+------------------+
48
49# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
50# | class \ name   | black | black_light | black_bold | black_flat | black_solid | black_solid_light | black_solid_bold | black_dashed | black_dashed_light | black_dashed_bold |
51# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
52# | IconStyle      | x     | x           | x          | x          |             |                   |                  |              |                    |                   |
53# | ImageStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
54# | LineStyle      | x     | x           | x          |            | x           | x                 | x                | x            | x                  | x                 |
55# | ShapeStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
56# | ShapeTextStyle | x     | x           | x          |            |             |                   |                  |              |                    |                   |
57# | TextStyle      | x     | x           | x          |            |             |                   |                  |              |                    |                   |
58# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
59
60# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
61# | class \ name   | white | white_light | white_bold | white_flat | white_solid | white_solid_light | white_solid_bold | white_dashed | white_dashed_light | white_dashed_bold |
62# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+
63# | IconStyle      | x     | x           | x          | x          |             |                   |                  |              |                    |                   |
64# | ImageStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
65# | LineStyle      | x     | x           | x          |            | x           | x                 | x                | x            | x                  | x                 |
66# | ShapeStyle     | x     | x           | x          | x          | x           | x                 | x                | x            | x                  | x                 |
67# | ShapeTextStyle | x     | x           | x          |            |             |                   |                  |              |                    |                   |
68# | TextStyle      | x     | x           | x          |            |             |                   |                  |              |                    |                   |
69# +----------------+-------+-------------+------------+------------+-------------+-------------------+------------------+--------------+--------------------+-------------------+

color: default

../../../_images/image_style.png

color: red.

../../../_images/image_style_red.png

color: green.

../../../_images/image_style_green.png

color: blue.

../../../_images/image_style_blue.png

color: black.

../../../_images/image_style_black.png

color: white.

../../../_images/image_style_white.png