# Styles

Rayon is also about **applying a professional rendering to your drawings** : applying colors, line weights, fonts, text sizes, using hatches and textures, etc.

**All this** can be controlled in Rayon **using** **styles**, located in the property panel.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2F8hImM2TQpq9sv2L8za1F%2FFrame%201786%20(5).png?alt=media&#x26;token=e52c98a9-3b25-4919-aefa-d3135d805792" alt=""><figcaption></figcaption></figure>

### The basics of styles <a href="#h_c0d5ad3f27" id="h_c0d5ad3f27"></a>

In Rayon, **styles document the aspect of all elements** (a text box, a line, a surface, etc.).&#x20;

#### Style types

Styles come in 4 different types; **shape** style, **text** style, **annotation** style and **wall** style. We detail below how each style type works...

{% tabs %}
{% tab title="Shape style" %}
**Shape styles** offer the following options:

* Fill (type, opacity, etc)
* Stroke (tickness, color, dashing, etc)

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2F9COOInPoUbkXgk9m4ARI%2FVincent-F-7%20(15).png?alt=media&#x26;token=e70395ad-2f80-4eb3-a31e-02bb1a85e108" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Text style" %}
**Text styles** offer the following options:

* Text color and size (type, opacity, etc), and text options (units, unit formatting, etc)
* Font family
* Font style (bold, italic, etc)

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2F5DLOBuhPRWzFSOQYxaEF%2FVincent-F-7%20(17).png?alt=media&#x26;token=06971a83-4ad7-460d-9ca2-42738dfd90eb" alt=""><figcaption></figcaption></figure>

**Text options** allow you to further customoze your text's content, with the following options...
{% endtab %}

{% tab title="Annotation style" %}
**Annotation styles** offer the following options:

* Text color and size (type, opacity, etc), and text options (units, unit formatting, etc)
* Font family
* Font style (bold, italic, etc)
* Stroke (tickness, color, dashing, etc)
* Extension lines option (tickness, color, dashing, etc)
* Ends styling (arow head, dot, etc) and size
* Head options (block vs text)

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FFijMZnmdbM0eo9BSq1DE%2FVincent-F-7%20(14).png?alt=media&#x26;token=3057ab0b-8990-4548-b845-930b18874257" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Wall style" %}
**Wall styles** offer the following options:

* Wall thickness
* Fill (type, opacity, etc)
* Stroke (tickness, color, dashing, etc)

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FXD4RSWRwc03nVEBuLuJa%2FVincent-F-7%20(16).png?alt=media&#x26;token=d94569f4-fe50-41fc-ad7b-42eee9ee1f66" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Fill types <a href="#h_aeea2b7ec7" id="h_aeea2b7ec7"></a>

In shape and wall styles, the **fill option** can be of different kinds: **solid**, **gradient**, **texture**, **hatch**, and **image**. We detail below how each one works.

{% tabs %}
{% tab title="Solid" %}
Fills can use a **`solid`** fill. \
A solid fill is made of single color, and opacity.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FwU2wMa5HA3bLyDogmfWJ%2FVincent-F-7%20(3).png?alt=media&#x26;token=9c3b407a-5234-4942-8e6a-52220cfd866b" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Gradients" %}
Fills can use a **`gradient`**. \
Gradients can be **`Linear`**, **`Angular`** or **`Radial`**.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FCNxV2I1oT4uGaK4T2fst%2FVincent-F-7%20(4).png?alt=media&#x26;token=e4eea2e8-4552-44be-8a66-1aef50c2bf82" alt=""><figcaption></figcaption></figure>

For any of those options, controls will be accessible on the canvas to define the position and extents of the gradient. **`Start`** and **`End`** value will allow you to assign a given color to each part of the gradient.
{% endtab %}

{% tab title="Texture & hatches" %}
Fills can use a **`Texture`** or a **`Hatch`**. \
Both types of fill allow **choosing a pattern**. If patterns offered in Rayon's libraries are not what you need, **uploading** a seamless texture or a PAT hatch file is also possible.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FmhwJ51S3tb6CdOBCXj9u%2FVincent-F-7%20(8).png?alt=media&#x26;token=0f9082b6-b85c-4caf-a18d-062f5b0c2006" alt=""><figcaption></figcaption></figure>

For entities carrying a fill using a **hatch** or a **texture**, **the pattern of each element can be edited independently!** To do so, head to the **`Tiling`** field, to enable the option.&#x20;

{% embed url="<https://player.vimeo.com/video/1132144233?autoplay=1&controls=0&loop=1&muted=1>" %}

You can then manually **use the blue dot to rotate and offset** the pattern, or **simply input precise offset/rotation values** in the tiling panel.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2F7bXeauiQ4fGlrJ9uq2cS%2FVincent-F-7%20(2).png?alt=media&#x26;token=d3c1db14-9e53-4dc3-95ba-e622cab1f1de" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Editing, saving & sharing styles

Styles can be either **specific** to a given entity, or **shared** across elements.

Styles can be **edited**, **published**, and **shared** across your drawings.

Let's dive in!

#### Editing a style <a href="#h_f70982897a" id="h_f70982897a"></a>

**Styles' settings** can be found **in the property panel**, on the right.\
Styles can be edited through their **different token fields** (Fill, Stroke, etc), or **swapped**/**saved** through the options of the section header.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FnZBhri8d4bOQDQMyFS0z%2FFrame%201787%20(3).png?alt=media&#x26;token=e96f093f-2597-4b56-a364-da98064c4edd" alt=""><figcaption></figcaption></figure>

#### Saved styles

At any point, **the style of an element can be saved**, in order to apply it to multiple elements at once. Clicking on **`+`** allows saving styles.

{% embed url="<https://player.vimeo.com/video/1028233608?autoplay=1&controls=0&loop=1&muted=1>" %}

Once saved, a style displays different options...

* Editing
* Swapping
* Detaching

... accessible on and above the style itself.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FBnUAzQUj4grLjDt2sj7k%2FFrame%201788%20(2).png?alt=media&#x26;token=95a574ef-5a48-4d6a-a7d4-e7bc921e555c" alt=""><figcaption></figcaption></figure>

**Editing** a saved style allows changing that style across all shapes carrying it. \
That way, an entire drawing can be redesigned **by simply intervening on the few saved styles** carried by the drawing's elements.

{% embed url="<https://player.vimeo.com/video/1028233622?autoplay=1&controls=0&loop=1&muted=1>" %}

**Swapping** allows replacing a saved style by another. \
That action can be triggered by using the **quad button**, or by **clicking on the style itself.**

{% embed url="<https://player.vimeo.com/video/1028233614?autoplay=1&controls=0&loop=1&muted=1>" %}

**Finally, detaching** allows removing a saved style for the current selection. Elements whose style has been detached will go back to having their own specific styling.

### Style libraries & publishing <a href="#h_aeea2b7ec7" id="h_aeea2b7ec7"></a>

At any point, you can **find all the styles contained in your drawing** in the left-side **style panel.**&#x20;

* **`In model styles`** lists all the styles you have in your model
* **`Libraries`** gives you access to extensive libraries

Styles listed under **`In model styles`** can be **curated**, using the panel's options; actions such as...

* **Creating** new styles by clicking on **`+`**
* **Editing/renaming** any given style
* **Deleting** unused styles

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FXlxHcz8On3FcXi4WTUeh%2FFrame%201790.png?alt=media&#x26;token=530d77e9-73a9-4746-b0cb-56cc23dde08c" alt=""><figcaption></figcaption></figure>

More importantly, this list can be **turned into a library**, by being published.

* Publishing can be found in the **`Share`** modal (upper right corner), under the **`Publish styles`** tab.
* A library can be **refreshed** at any time by hitting **`Refresh`** in the modal.
* Published libraries are accessible by users **within your organization.**

More [on libraries here](#h_aeea2b7ec7-1).

{% embed url="<https://player.vimeo.com/video/1028233586?autoplay=1&controls=0&loop=1&muted=1>" %}

### **The&#x20;*****active*****&#x20;style**

Each time a creation command gets used, the **active style appears in the property panel**; that style will be **assigned to the things you draw** with the current command.

{% embed url="<https://player.vimeo.com/video/1028233598?autoplay=1&controls=0&loop=1&muted=1>" %}

### Tutorial

For more step-by-step information, watch our tutorial about how to use styles in Rayon:

{% embed url="<https://www.youtube.com/watch?v=2hbZaSHVr64>" %}

***

### We are always available

Book a demo with our team, [right here](https://b1kzip68v9f.typeform.com/to/Hgr0eQ4k#source=docs).\
To get some support, reach out to us through our **in-app support chat**. \
More about [our support policy right here](https://docs.rayon.design/other-resources/others/support).
